var valueIsBorderBox = true,
val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
styles = getStyles( elem ),
- isBorderBox = support.boxSizing() && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+ isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
// some non-html elements return undefined for offsetWidth, so check for null/undefined
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
elem,
name,
extra,
- support.boxSizing() && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
styles
) : 0
);
(function() {
// Minified: var b,c,d,e,f,g, h,i
- var div, style, a, pixelPositionVal, boxSizingVal, boxSizingReliableVal,
+ var div, style, a, pixelPositionVal, boxSizingReliableVal,
reliableHiddenOffsetsVal, reliableMarginRightVal;
// Setup
div.cloneNode( true ).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" ||
+ style.WebkitBoxSizing === "";
+
jQuery.extend(support, {
reliableHiddenOffsets: function() {
if ( reliableHiddenOffsetsVal == null ) {
return reliableHiddenOffsetsVal;
},
- boxSizing: function() {
- if ( boxSizingVal == null ) {
- computeStyleTests();
- }
- return boxSizingVal;
- },
-
boxSizingReliable: function() {
if ( boxSizingReliableVal == null ) {
computeStyleTests();
"box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
"border:1px;padding:1px;width:4px;position:absolute";
- // Workaround failing boxSizing test due to offsetWidth returning wrong value
- // with some non-1 values of body zoom, ticket #13543
- jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
- boxSizingVal = div.offsetWidth === 4;
- });
-
// Support: IE<9
// Assume reasonable values in the absence of getComputedStyle
pixelPositionVal = false;
});
}
-testIframeWithCallback( "A non-1 zoom on body doesn't cause WebKit to fail box-sizing test", "support/boxSizing.html", function( boxSizing ) {
- expect( 1 );
- equal( boxSizing, computedSupport.boxSizing, "box-sizing properly detected on page with non-1 body zoom" );
-});
-
testIframeWithCallback( "A background on the testElement does not cause IE8 to crash (#9823)", "support/testElementCrash.html", function() {
expect( 1 );
ok( true, "IE8 does not crash" );