diff options
author | Michał Gołębiowski <m.goleb@gmail.com> | 2014-10-27 18:36:07 +0100 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2014-11-03 18:37:26 +0100 |
commit | 740e190223d19a114d5373758127285d14d6b71e (patch) | |
tree | f449fdea7a436cdabf7d6f764454887791d010a6 /src/css/curCSS.js | |
parent | 758fd6cea9e82f7bfebce07ba6ecf0d107e8a53c (diff) | |
download | jquery-740e190223d19a114d5373758127285d14d6b71e.tar.gz jquery-740e190223d19a114d5373758127285d14d6b71e.zip |
Misc: Drop support for older browsers; update support comments
That includes Opera 12.x, Firefox<29, Safari<6.0 and some hacks
for old Blackberry.
Closes gh-1820
Refs gh-1815
Diffstat (limited to 'src/css/curCSS.js')
-rw-r--r-- | src/css/curCSS.js | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/src/css/curCSS.js b/src/css/curCSS.js index 420d19fa9..260184b47 100644 --- a/src/css/curCSS.js +++ b/src/css/curCSS.js @@ -7,8 +7,7 @@ define([ ], function( jQuery, rnumnonpx, rmargin, getStyles ) { function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - style = elem.style; + var ret; computed = computed || getStyles( elem ); @@ -23,33 +22,10 @@ function curCSS( elem, name, computed ) { if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } - - // Support: iOS < 6 - // A tribute to the "awesome hack by Dean Edwards" - // iOS < 6 (at least) returns percentage for a larger set of values, - // but width seems to be reliably pixels - // this is against the CSSOM draft spec: - // http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } } return ret !== undefined ? - // Support: IE + // Support: IE9-11+ // IE returns zIndex value as an integer. ret + "" : ret; |