@@ -94,6 +94,9 @@ jQuery.support = (function() {
9494 pixelMargin : true
9595 } ;
9696
97+ //jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
98+ jQuery . boxModel = support . boxModel = document . compatMode === "CSS1Compat" ;
99+
97100 // Make sure checked status is properly cloned
98101 input . checked = true ;
99102 support . noCloneChecked = input . cloneNode ( true ) . checked ;
@@ -172,7 +175,8 @@ jQuery.support = (function() {
172175 // Run tests that need a body at doc ready
173176 jQuery ( function ( ) {
174177 var container , outer , inner , table , td , offsetSupport ,
175- marginDiv , conMarginTop , ptlm , vb , style , html ,
178+ marginDiv , conMarginTop , style , html , positionTopLeftWidthHeight ,
179+ paddingMarginBorderVisibility , paddingMarginBorder ,
176180 body = document . getElementsByTagName ( "body" ) [ 0 ] ;
177181
178182 if ( ! body ) {
@@ -181,15 +185,16 @@ jQuery.support = (function() {
181185 }
182186
183187 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'>" +
189194 "<tr><td></td></tr></table>" ;
190195
191196 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" ;
193198 body . insertBefore ( container , body . firstChild ) ;
194199
195200 // Construct the test element
@@ -203,8 +208,7 @@ jQuery.support = (function() {
203208 // display:none (it is still safe to use offsets if a parent element is
204209 // hidden; don safety goggles and see bug #4512 for more information).
205210 // (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>" ;
208212 tds = div . getElementsByTagName ( "td" ) ;
209213 isSupported = ( tds [ 0 ] . offsetHeight === 0 ) ;
210214
@@ -241,18 +245,23 @@ jQuery.support = (function() {
241245 // elements when setting their display to 'inline' and giving
242246 // them layout
243247 // (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" ;
244252 div . style . display = "inline" ;
245253 div . style . zoom = 1 ;
246- support . inlineBlockNeedsLayout = ( div . offsetWidth === 2 ) ;
254+ support . inlineBlockNeedsLayout = ( div . offsetWidth === 3 ) ;
247255
248256 // Check if elements with layout shrink-wrap their children
249257 // (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 ) ;
253262 }
254263
255- div . style . cssText = ptlm + vb ;
264+ div . style . cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility ;
256265 div . innerHTML = html ;
257266
258267 outer = div . firstChild ;
0 commit comments