| 6315 | }); |
| 6316 | |
| 6317 | function computeStyleTests() { |
| 6318 | // Minified: var b,c,d,j |
| 6319 | var div, body, container, contents; |
| 6320 | |
| 6321 | body = document.getElementsByTagName( "body" )[ 0 ]; |
| 6322 | if ( !body || !body.style ) { |
| 6323 | // Test fired too early or in an unsupported environment, exit. |
| 6324 | return; |
| 6325 | } |
| 6326 | |
| 6327 | // Setup |
| 6328 | div = document.createElement( "div" ); |
| 6329 | container = document.createElement( "div" ); |
| 6330 | container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; |
| 6331 | body.appendChild( container ).appendChild( div ); |
| 6332 | |
| 6333 | div.style.cssText = |
| 6334 | // Support: Firefox<29, Android 2.3 |
| 6335 | // Vendor-prefix box-sizing |
| 6336 | "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + |
| 6337 | "box-sizing:border-box;display:block;margin-top:1%;top:1%;" + |
| 6338 | "border:1px;padding:1px;width:4px;position:absolute"; |
| 6339 | |
| 6340 | // Support: IE<9 |
| 6341 | // Assume reasonable values in the absence of getComputedStyle |
| 6342 | pixelPositionVal = boxSizingReliableVal = false; |
| 6343 | reliableMarginRightVal = true; |
| 6344 | |
| 6345 | // Check for getComputedStyle so that this code is not run in IE<9. |
| 6346 | if ( window.getComputedStyle ) { |
| 6347 | pixelPositionVal = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; |
| 6348 | boxSizingReliableVal = |
| 6349 | ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; |
| 6350 | |
| 6351 | // Support: Android 2.3 |
| 6352 | // Div with explicit width and no margin-right incorrectly |
| 6353 | // gets computed margin-right based on width of container (#3333) |
| 6354 | // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right |
| 6355 | contents = div.appendChild( document.createElement( "div" ) ); |
| 6356 | |
| 6357 | // Reset CSS: box-sizing; display; margin; border; padding |
| 6358 | contents.style.cssText = div.style.cssText = |
| 6359 | // Support: Firefox<29, Android 2.3 |
| 6360 | // Vendor-prefix box-sizing |
| 6361 | "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + |
| 6362 | "box-sizing:content-box;display:block;margin:0;border:0;padding:0"; |
| 6363 | contents.style.marginRight = contents.style.width = "0"; |
| 6364 | div.style.width = "1px"; |
| 6365 | |
| 6366 | reliableMarginRightVal = |
| 6367 | !parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight ); |
| 6368 | } |
| 6369 | |
| 6370 | // Support: IE8 |
| 6371 | // Check if table cells still have offsetWidth/Height when they are set |
| 6372 | // to display:none and there are still other visible table cells in a |
| 6373 | // table row; if so, offsetWidth/Height are not reliable for use when |
| 6374 | // determining if an element has been hidden directly using |