| 5697 | // Executing both pixelPosition & boxSizingReliable tests require only one layout |
| 5698 | // so they're executed at the same time to save the second computation. |
| 5699 | function computeStyleTests() { |
| 5700 | div.style.cssText = |
| 5701 | |
| 5702 | // Support: Firefox<29, Android 2.3 |
| 5703 | // Vendor-prefix box-sizing |
| 5704 | "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;" + |
| 5705 | "position:relative;display:block;" + |
| 5706 | "margin:auto;border:1px;padding:1px;" + |
| 5707 | "top:1%;width:50%"; |
| 5708 | div.innerHTML = ""; |
| 5709 | documentElement.appendChild( container ); |
| 5710 | |
| 5711 | var divStyle = window.getComputedStyle( div ); |
| 5712 | pixelPositionVal = divStyle.top !== "1%"; |
| 5713 | reliableMarginLeftVal = divStyle.marginLeft === "2px"; |
| 5714 | boxSizingReliableVal = divStyle.width === "4px"; |
| 5715 | |
| 5716 | // Support: Android 4.0 - 4.3 only |
| 5717 | // Some styles come back with percentage values, even though they shouldn't |
| 5718 | div.style.marginRight = "50%"; |
| 5719 | pixelMarginRightVal = divStyle.marginRight === "4px"; |
| 5720 | |
| 5721 | documentElement.removeChild( container ); |
| 5722 | } |
| 5723 | |
| 5724 | jQuery.extend( support, { |
| 5725 | pixelPosition: function() { |