|
define( [ |
|
"../var/support", |
|
"../var/document" |
|
], function( support, document ) { |
|
|
|
( function() { |
|
var shrinkWrapBlocksVal; |
|
|
|
support.shrinkWrapBlocks = function() { |
|
if ( shrinkWrapBlocksVal != null ) { |
|
return shrinkWrapBlocksVal; |
|
} |
|
|
|
|
|
shrinkWrapBlocksVal = false; |
|
|
|
|
|
var div, body, container; |
|
|
|
body = document.getElementsByTagName( "body" )[ 0 ]; |
|
if ( !body || !body.style ) { |
|
|
|
|
|
return; |
|
} |
|
|
|
|
|
div = document.createElement( "div" ); |
|
container = document.createElement( "div" ); |
|
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; |
|
body.appendChild( container ).appendChild( div ); |
|
|
|
|
|
|
|
if ( typeof div.style.zoom !== "undefined" ) { |
|
|
|
|
|
div.style.cssText = |
|
|
|
|
|
|
|
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + |
|
"box-sizing:content-box;display:block;margin:0;border:0;" + |
|
"padding:1px;width:1px;zoom:1"; |
|
div.appendChild( document.createElement( "div" ) ).style.width = "5px"; |
|
shrinkWrapBlocksVal = div.offsetWidth !== 3; |
|
} |
|
|
|
body.removeChild( container ); |
|
|
|
return shrinkWrapBlocksVal; |
|
}; |
|
|
|
} )(); |
|
|
|
return support; |
|
|
|
} ); |
|
|