diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/css/curCSS.js | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/css/curCSS.js b/src/css/curCSS.js index 0b8f25997..c3210f186 100644 --- a/src/css/curCSS.js +++ b/src/css/curCSS.js @@ -72,7 +72,7 @@ if ( window.getComputedStyle ) { }; curCSS = function( elem, name, computed ) { - var left, rs, rsLeft, ret, + var left, ret, style = elem.style; computed = computed || getStyles( elem ); @@ -84,7 +84,7 @@ if ( window.getComputedStyle ) { ret = style[ name ]; } - // From the awesome hack by Dean Edwards + // Simplified hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number @@ -97,21 +97,13 @@ if ( window.getComputedStyle ) { // Remember the original values left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } style.left = name === "fontSize" ? "1em" : ret; ret = style.pixelLeft + "px"; // Revert the changed values style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } } // Support: IE<9 |