Streamline getComputedStyle per @JustinDrake's observation.

This commit is contained in:
Dave Methvin 2011-11-06 15:49:45 -05:00
parent f35ba5e699
commit 262c32a70e

View File

@ -268,11 +268,8 @@ if ( document.defaultView && document.defaultView.getComputedStyle ) {
name = name.replace( rupper, "-$1" ).toLowerCase(); name = name.replace( rupper, "-$1" ).toLowerCase();
if ( !(defaultView = elem.ownerDocument.defaultView) ) { if ( (defaultView = elem.ownerDocument.defaultView) &&
return undefined; (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
}
if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
ret = computedStyle.getPropertyValue( name ); ret = computedStyle.getPropertyValue( name );
if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
ret = jQuery.style( elem, name ); ret = jQuery.style( elem, name );