From 262c32a70e1f14e5addd263af2f868525aab03c8 Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Sun, 6 Nov 2011 15:49:45 -0500 Subject: [PATCH] Streamline getComputedStyle per @JustinDrake's observation. --- src/css.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/css.js b/src/css.js index 3e14e1be3..988a274f6 100644 --- a/src/css.js +++ b/src/css.js @@ -268,11 +268,8 @@ if ( document.defaultView && document.defaultView.getComputedStyle ) { name = name.replace( rupper, "-$1" ).toLowerCase(); - if ( !(defaultView = elem.ownerDocument.defaultView) ) { - return undefined; - } - - if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) { + if ( (defaultView = elem.ownerDocument.defaultView) && + (computedStyle = defaultView.getComputedStyle( elem, null )) ) { ret = computedStyle.getPropertyValue( name ); if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { ret = jQuery.style( elem, name );