define( [ "../core", "../var/document", "../var/documentElement", "../var/support" ], function( jQuery, document, documentElement, support ) { "use strict"; ( function() { var boxSizingReliableVal, container = document.createElement( "div" ), div = document.createElement( "div" ); // Finish early in limited (non-browser) environments if ( !div.style ) { return; } // Support: IE <=9 - 11+ // Style of cloned element affects source element cloned (#8908) div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; jQuery.extend( support, { boxSizingReliable: function() { // This is a singleton, we need to execute it only once if ( div ) { container.style.cssText = "position:absolute;left:-11111px;width:60px;" + "margin-top:1px;padding:0;border:0"; div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + "margin:auto;border:1px;padding:1px;" + "width:60%;top:1%"; documentElement.appendChild( container ).appendChild( div ); var divStyle = window.getComputedStyle( div ); // Support: IE 9 - 11+ // Detect misreporting of content dimensions for box-sizing:border-box elements boxSizingReliableVal = Math.round( parseFloat( divStyle.width ) ) === 36; documentElement.removeChild( container ); // Nullify the div so it wouldn't be stored in the memory and // it will also be a sign that checks already performed div = null; } return boxSizingReliableVal; } } ); } )(); return support; } );