2
schangxiang@126.com
2024-08-16 b47c50a2a514def7374b32d7194b2c599cba5625
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
define([
    "../var/strundefined",
    "../var/support"
], function( strundefined, support ) {
 
(function() {
    var shrinkWrapBlocksVal;
 
    support.shrinkWrapBlocks = function() {
        if ( shrinkWrapBlocksVal != null ) {
            return shrinkWrapBlocksVal;
        }
 
        // Will be changed later if needed.
        shrinkWrapBlocksVal = false;
 
        // Minified: var b,c,d
        var div, body, container;
 
        body = document.getElementsByTagName( "body" )[ 0 ];
        if ( !body || !body.style ) {
            // Test fired too early or in an unsupported environment, exit.
            return;
        }
 
        // Setup
        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 );
 
        // Support: IE6
        // Check if elements with layout shrink-wrap their children
        if ( typeof div.style.zoom !== strundefined ) {
            // Reset CSS: box-sizing; display; margin; border
            div.style.cssText =
                // Support: Firefox<29, Android 2.3
                // Vendor-prefix box-sizing
                "-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;
 
});