1
1
import { jQuery } from "./core.js" ;
2
2
import { access } from "./core/access.js" ;
3
+ import { camelCase } from "./core/camelCase.js" ;
3
4
import { nodeName } from "./core/nodeName.js" ;
4
5
import { rcssNum } from "./var/rcssNum.js" ;
5
- import { isIE } from "./var/isIE.js" ;
6
6
import { rnumnonpx } from "./css/var/rnumnonpx.js" ;
7
7
import { rcustomProp } from "./css/var/rcustomProp.js" ;
8
8
import { cssExpand } from "./css/var/cssExpand.js" ;
9
9
import { isAutoPx } from "./css/isAutoPx.js" ;
10
- import { cssCamelCase } from "./css/cssCamelCase.js" ;
11
10
import { getStyles } from "./css/var/getStyles.js" ;
12
11
import { swap } from "./css/var/swap.js" ;
13
12
import { curCSS } from "./css/curCSS.js" ;
@@ -120,8 +119,7 @@ function getWidthOrHeight( elem, dimension, extra ) {
120
119
121
120
// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
122
121
// Fake content-box until we know it's needed to know the true value.
123
- boxSizingNeeded = isIE || extra ,
124
- isBorderBox = boxSizingNeeded &&
122
+ isBorderBox = extra &&
125
123
jQuery . css ( elem , "boxSizing" , false , styles ) === "border-box" ,
126
124
valueIsBorderBox = isBorderBox ,
127
125
@@ -143,14 +141,6 @@ function getWidthOrHeight( elem, dimension, extra ) {
143
141
// This happens for inline elements with no explicit setting (gh-3571)
144
142
val === "auto" ||
145
143
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.
154
144
// Support: Firefox 70+
155
145
// Firefox includes border widths
156
146
// in computed dimensions for table rows. (gh-4529)
@@ -204,7 +194,7 @@ jQuery.extend( {
204
194
205
195
// Make sure that we're working with the right name
206
196
var ret , type , hooks ,
207
- origName = cssCamelCase ( name ) ,
197
+ origName = camelCase ( name ) ,
208
198
isCustomProp = rcustomProp . test ( name ) ,
209
199
style = elem . style ;
210
200
@@ -240,12 +230,6 @@ jQuery.extend( {
240
230
value += ret && ret [ 3 ] || ( isAutoPx ( origName ) ? "px" : "" ) ;
241
231
}
242
232
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
-
249
233
// If a hook was provided, use that value, otherwise just set the specified value
250
234
if ( ! hooks || ! ( "set" in hooks ) ||
251
235
( value = hooks . set ( elem , value , extra ) ) !== undefined ) {
@@ -273,7 +257,7 @@ jQuery.extend( {
273
257
274
258
css : function ( elem , name , extra , styles ) {
275
259
var val , num , hooks ,
276
- origName = cssCamelCase ( name ) ,
260
+ origName = camelCase ( name ) ,
277
261
isCustomProp = rcustomProp . test ( name ) ;
278
262
279
263
// Make sure that we're working with the right name. We don't
@@ -316,17 +300,14 @@ jQuery.each( [ "height", "width" ], function( _i, dimension ) {
316
300
get : function ( elem , computed , extra ) {
317
301
if ( computed ) {
318
302
319
- // Certain elements can have dimension info if we invisibly show them
303
+ // Certain elements can have dimension info if we invisibly show them,
320
304
// but it must have a current display style that would benefit
321
305
return rdisplayswap . test ( jQuery . css ( elem , "display" ) ) &&
322
306
323
307
// Support: Safari <=8 - 12+, Chrome <=73+
324
308
// Table columns in WebKit/Blink have non-zero offsetWidth & zero
325
309
// 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 ?
330
311
swap ( elem , cssShow , function ( ) {
331
312
return getWidthOrHeight ( elem , dimension , extra ) ;
332
313
} ) :
0 commit comments