diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2020-09-22 17:49:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-22 17:49:28 +0200 |
commit | e35fb62db4fb46f031056bb53e393982c03972a1 (patch) | |
tree | ae55e7e05133da5637d188d73c312c4538d8b5b4 /src/css.js | |
parent | 15ae361485056b236a9484a185238f992806e1ff (diff) | |
download | jquery-e35fb62db4fb46f031056bb53e393982c03972a1.tar.gz jquery-e35fb62db4fb46f031056bb53e393982c03972a1.zip |
Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge)
Drop support for Edge Legacy: the non-Chromium, EdgeHTML-based Microsoft
Edge version. Also, restrict some workarounds that were applied
unconditionally in all browsers to run only in IE now. This slightly
increases the size but reduces the performance burden on modern browsers
that don't need the workarounds.
Also, clean up some comments & remove some obsolete workarounds.
Fixes gh-4568
Closes gh-4792
Diffstat (limited to 'src/css.js')
-rw-r--r-- | src/css.js | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/css.js b/src/css.js index 8c4070c71..126d12a17 100644 --- a/src/css.js +++ b/src/css.js @@ -11,7 +11,6 @@ import getStyles from "./css/var/getStyles.js"; import swap from "./css/var/swap.js"; import curCSS from "./css/curCSS.js"; import adjustCSS from "./css/adjustCSS.js"; -import support from "./css/support.js"; import finalPropName from "./css/finalPropName.js"; import "./core/init.js"; @@ -135,15 +134,19 @@ function getWidthOrHeight( elem, dimension, extra ) { } - // Support: IE 9 - 11+ - // Use offsetWidth/offsetHeight for when box sizing is unreliable. - // In those cases, the computed value can be trusted to be border-box. - if ( ( isIE && isBorderBox || + if ( ( isIE && + ( - // Support: IE 10 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + // Support: IE 9 - 11+ + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + isBorderBox || + + // Support: IE 10 - 11+ + // IE misreports `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + nodeName( elem, "tr" ) + ) || // Fall back to offsetWidth/offsetHeight when value is "auto" // This happens for inline elements with no explicit setting (gh-3571) |