X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fsupport.js;fp=src%2Fsupport.js;h=878db1f0ba401d1986b8dbbc0c705fafb66c50ac;hb=0cdcef5b364fa3c89d7f27935e77b453f4a56efd;hp=299fbd2774fe52bd526a9538a46d68fa4ce1857d;hpb=0229b83f7e5bf64edb2888ab349bedcd1a45e7c1;p=jquery.git diff --git a/src/support.js b/src/support.js index 299fbd2..878db1f 100644 --- a/src/support.js +++ b/src/support.js @@ -66,6 +66,7 @@ scriptEval: false, noCloneEvent: true, boxModel: null, + inlineBlockNeedsLayout: false, reliableHiddenOffsets: true }; @@ -119,6 +120,17 @@ document.body.appendChild( div ); jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2; + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' + // (IE < 8 does this) + if ( 'zoom' in div.style ) { + div.style.display = 'inline'; + + // Layout is necessary to trigger this “feature” + div.style.zoom = 1; + jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2; + } + // Check if table cells still have offsetWidth/Height when they are set // to display:none and there are still other visible table cells in a // table row; if so, offsetWidth/Height are not reliable for use when