11import { jQuery } from "./core.js" ;
22import { access } from "./core/access.js" ;
3+ import { camelCase } from "./core/camelCase.js" ;
34import { nodeName } from "./core/nodeName.js" ;
45import { rcssNum } from "./var/rcssNum.js" ;
5- import { isIE } from "./var/isIE.js" ;
66import { rnumnonpx } from "./css/var/rnumnonpx.js" ;
77import { rcustomProp } from "./css/var/rcustomProp.js" ;
88import { cssExpand } from "./css/var/cssExpand.js" ;
99import { isAutoPx } from "./css/isAutoPx.js" ;
10- import { cssCamelCase } from "./css/cssCamelCase.js" ;
1110import { getStyles } from "./css/var/getStyles.js" ;
1211import { swap } from "./css/var/swap.js" ;
1312import { curCSS } from "./css/curCSS.js" ;
@@ -120,8 +119,7 @@ function getWidthOrHeight( elem, dimension, extra ) {
120119
121120 // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
122121 // Fake content-box until we know it's needed to know the true value.
123- boxSizingNeeded = isIE || extra ,
124- isBorderBox = boxSizingNeeded &&
122+ isBorderBox = extra &&
125123 jQuery . css ( elem , "boxSizing" , false , styles ) === "border-box" ,
126124 valueIsBorderBox = isBorderBox ,
127125
@@ -143,14 +141,6 @@ function getWidthOrHeight( elem, dimension, extra ) {
143141 // This happens for inline elements with no explicit setting (gh-3571)
144142 val === "auto" ||
145143
146- // Support: IE 9 - 11+
147- // Use offsetWidth/offsetHeight for when box sizing is unreliable.
148- // In those cases, the computed value can be trusted to be border-box.
149- ( isIE && isBorderBox ) ||
150-
151- // Support: IE 10 - 11+
152- // IE misreports `getComputedStyle` of table rows with width/height
153- // set in CSS while `offset*` properties report correct values.
154144 // Support: Firefox 70+
155145 // Firefox includes border widths
156146 // in computed dimensions for table rows. (gh-4529)
@@ -204,7 +194,7 @@ jQuery.extend( {
204194
205195 // Make sure that we're working with the right name
206196 var ret , type , hooks ,
207- origName = cssCamelCase ( name ) ,
197+ origName = camelCase ( name ) ,
208198 isCustomProp = rcustomProp . test ( name ) ,
209199 style = elem . style ;
210200
@@ -240,12 +230,6 @@ jQuery.extend( {
240230 value += ret && ret [ 3 ] || ( isAutoPx ( origName ) ? "px" : "" ) ;
241231 }
242232
243- // Support: IE <=9 - 11+
244- // background-* props of a cloned element affect the source element (trac-8908)
245- if ( isIE && value === "" && name . indexOf ( "background" ) === 0 ) {
246- style [ name ] = "inherit" ;
247- }
248-
249233 // If a hook was provided, use that value, otherwise just set the specified value
250234 if ( ! hooks || ! ( "set" in hooks ) ||
251235 ( value = hooks . set ( elem , value , extra ) ) !== undefined ) {
@@ -273,7 +257,7 @@ jQuery.extend( {
273257
274258 css : function ( elem , name , extra , styles ) {
275259 var val , num , hooks ,
276- origName = cssCamelCase ( name ) ,
260+ origName = camelCase ( name ) ,
277261 isCustomProp = rcustomProp . test ( name ) ;
278262
279263 // Make sure that we're working with the right name. We don't
@@ -316,17 +300,14 @@ jQuery.each( [ "height", "width" ], function( _i, dimension ) {
316300 get : function ( elem , computed , extra ) {
317301 if ( computed ) {
318302
319- // Certain elements can have dimension info if we invisibly show them
303+ // Certain elements can have dimension info if we invisibly show them,
320304 // but it must have a current display style that would benefit
321305 return rdisplayswap . test ( jQuery . css ( elem , "display" ) ) &&
322306
323307 // Support: Safari <=8 - 12+, Chrome <=73+
324308 // Table columns in WebKit/Blink have non-zero offsetWidth & zero
325309 // getBoundingClientRect().width unless display is changed.
326- // Support: IE <=11+
327- // Running getBoundingClientRect on a disconnected node
328- // in IE throws an error.
329- ( ! elem . getClientRects ( ) . length || ! elem . getBoundingClientRect ( ) . width ) ?
310+ ! elem . getBoundingClientRect ( ) . width ?
330311 swap ( elem , cssShow , function ( ) {
331312 return getWidthOrHeight ( elem , dimension , extra ) ;
332313 } ) :
0 commit comments