@@ -94,6 +94,9 @@ jQuery.support = (function() {
94
94
pixelMargin : true
95
95
} ;
96
96
97
+ //jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
98
+ jQuery . boxModel = support . boxModel = document . compatMode === "CSS1Compat" ;
99
+
97
100
// Make sure checked status is properly cloned
98
101
input . checked = true ;
99
102
support . noCloneChecked = input . cloneNode ( true ) . checked ;
@@ -172,7 +175,8 @@ jQuery.support = (function() {
172
175
// Run tests that need a body at doc ready
173
176
jQuery ( function ( ) {
174
177
var container , outer , inner , table , td , offsetSupport ,
175
- marginDiv , conMarginTop , ptlm , vb , style , html ,
178
+ marginDiv , conMarginTop , style , html , positionTopLeftWidthHeight ,
179
+ paddingMarginBorderVisibility , paddingMarginBorder ,
176
180
body = document . getElementsByTagName ( "body" ) [ 0 ] ;
177
181
178
182
if ( ! body ) {
@@ -181,15 +185,16 @@ jQuery.support = (function() {
181
185
}
182
186
183
187
conMarginTop = 1 ;
184
- ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;" ;
185
- vb = "visibility:hidden;border:0;" ;
186
- style = "style='" + ptlm + "border:5px solid #000;padding:0;'" ;
187
- html = "<div " + style + "><div></div></div>" +
188
- "<table " + style + " cellpadding='0' cellspacing='0'>" +
188
+ paddingMarginBorder = "padding:0;margin:0;border:" ;
189
+ positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;" ;
190
+ paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;" ;
191
+ style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;" ;
192
+ html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
193
+ "<table " + style + "' cellpadding='0' cellspacing='0'>" +
189
194
"<tr><td></td></tr></table>" ;
190
195
191
196
container = document . createElement ( "div" ) ;
192
- container . style . cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px" ;
197
+ container . style . cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px" ;
193
198
body . insertBefore ( container , body . firstChild ) ;
194
199
195
200
// Construct the test element
@@ -203,8 +208,7 @@ jQuery.support = (function() {
203
208
// display:none (it is still safe to use offsets if a parent element is
204
209
// hidden; don safety goggles and see bug #4512 for more information).
205
210
// (only IE 8 fails this test)
206
- div . innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>" ;
207
-
211
+ div . innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>" ;
208
212
tds = div . getElementsByTagName ( "td" ) ;
209
213
isSupported = ( tds [ 0 ] . offsetHeight === 0 ) ;
210
214
@@ -241,18 +245,23 @@ jQuery.support = (function() {
241
245
// elements when setting their display to 'inline' and giving
242
246
// them layout
243
247
// (IE < 8 does this)
248
+ div . innerHTML = "" ;
249
+ div . style . width = div . style . padding = "1px" ;
250
+ div . style . border = 0 ;
251
+ div . style . overflow = "hidden" ;
244
252
div . style . display = "inline" ;
245
253
div . style . zoom = 1 ;
246
- support . inlineBlockNeedsLayout = ( div . offsetWidth === 2 ) ;
254
+ support . inlineBlockNeedsLayout = ( div . offsetWidth === 3 ) ;
247
255
248
256
// Check if elements with layout shrink-wrap their children
249
257
// (IE 6 does this)
250
- div . style . display = "" ;
251
- div . innerHTML = "<div style='width:4px;'></div>" ;
252
- support . shrinkWrapBlocks = ( div . offsetWidth !== 2 ) ;
258
+ div . style . display = "block" ;
259
+ div . style . overflow = "visible" ;
260
+ div . innerHTML = "<div style='width:5px;'></div>" ;
261
+ support . shrinkWrapBlocks = ( div . offsetWidth !== 3 ) ;
253
262
}
254
263
255
- div . style . cssText = ptlm + vb ;
264
+ div . style . cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility ;
256
265
div . innerHTML = html ;
257
266
258
267
outer = div . firstChild ;
0 commit comments