| 3014 | // Executing both pixelPosition & boxSizingReliable tests require only one layout |
| 3015 | // so they're executed at the same time to save the second computation. |
| 3016 | function computePixelPositionAndBoxSizingReliable() { |
| 3017 | div.style.cssText = |
| 3018 | // Support: Firefox<29, Android 2.3 |
| 3019 | // Vendor-prefix box-sizing |
| 3020 | "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + |
| 3021 | "box-sizing:border-box;display:block;margin-top:1%;top:1%;" + |
| 3022 | "border:1px;padding:1px;width:4px;position:absolute"; |
| 3023 | div.innerHTML = ""; |
| 3024 | docElem.appendChild( container ); |
| 3025 | |
| 3026 | var divStyle = window.getComputedStyle( div, null ); |
| 3027 | pixelPositionVal = divStyle.top !== "1%"; |
| 3028 | boxSizingReliableVal = divStyle.width === "4px"; |
| 3029 | |
| 3030 | docElem.removeChild( container ); |
| 3031 | } |
| 3032 | |
| 3033 | // Support: node.js jsdom |
| 3034 | // Don't assume that getComputedStyle is a property of the global object |