@@ -46,61 +46,57 @@ define([
4646 documentElement . removeChild ( container ) ;
4747 }
4848
49- // Support: node.js jsdom
50- // Don't assume that getComputedStyle is a property of the global object
51- if ( window . getComputedStyle ) {
52- jQuery . extend ( support , {
53- pixelPosition : function ( ) {
54- // This test is executed only once but we still do memoizing
55- // since we can use the boxSizingReliable pre-computing.
56- // No need to check if the test was already performed, though.
49+ jQuery . extend ( support , {
50+ pixelPosition : function ( ) {
51+ // This test is executed only once but we still do memoizing
52+ // since we can use the boxSizingReliable pre-computing.
53+ // No need to check if the test was already performed, though.
54+ computeStyleTests ( ) ;
55+ return pixelPositionVal ;
56+ } ,
57+ boxSizingReliable : function ( ) {
58+ if ( boxSizingReliableVal == null ) {
5759 computeStyleTests ( ) ;
58- return pixelPositionVal ;
59- } ,
60- boxSizingReliable : function ( ) {
61- if ( boxSizingReliableVal == null ) {
62- computeStyleTests ( ) ;
63- }
64- return boxSizingReliableVal ;
65- } ,
66- pixelMarginRight : function ( ) {
67- // Support: Android 4.0-4.3
68- // We're checking for boxSizingReliableVal here instead of pixelMarginRightVal
69- // since that compresses better and they're computed together anyway.
70- if ( boxSizingReliableVal == null ) {
71- computeStyleTests ( ) ;
72- }
73- return pixelMarginRightVal ;
74- } ,
75- reliableMarginRight : function ( ) {
60+ }
61+ return boxSizingReliableVal ;
62+ } ,
63+ pixelMarginRight : function ( ) {
64+ // Support: Android 4.0-4.3
65+ // We're checking for boxSizingReliableVal here instead of pixelMarginRightVal
66+ // since that compresses better and they're computed together anyway.
67+ if ( boxSizingReliableVal == null ) {
68+ computeStyleTests ( ) ;
69+ }
70+ return pixelMarginRightVal ;
71+ } ,
72+ reliableMarginRight : function ( ) {
7673
77- // Support: Android 2.3
78- // Check if div with explicit width and no margin-right incorrectly
79- // gets computed margin-right based on width of container. (#3333)
80- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
81- // This support function is only executed once so no memoizing is needed.
82- var ret ,
83- marginDiv = div . appendChild ( document . createElement ( "div" ) ) ;
74+ // Support: Android 2.3
75+ // Check if div with explicit width and no margin-right incorrectly
76+ // gets computed margin-right based on width of container. (#3333)
77+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
78+ // This support function is only executed once so no memoizing is needed.
79+ var ret ,
80+ marginDiv = div . appendChild ( document . createElement ( "div" ) ) ;
8481
85- // Reset CSS: box-sizing; display; margin; border; padding
86- marginDiv . style . cssText = div . style . cssText =
87- // Support: Android 2.3
88- // Vendor-prefix box-sizing
89- "-webkit-box-sizing:content-box;box-sizing:content-box;" +
90- "display:block;margin:0;border:0;padding:0" ;
91- marginDiv . style . marginRight = marginDiv . style . width = "0" ;
92- div . style . width = "1px" ;
93- documentElement . appendChild ( container ) ;
82+ // Reset CSS: box-sizing; display; margin; border; padding
83+ marginDiv . style . cssText = div . style . cssText =
84+ // Support: Android 2.3
85+ // Vendor-prefix box-sizing
86+ "-webkit-box-sizing:content-box;box-sizing:content-box;" +
87+ "display:block;margin:0;border:0;padding:0" ;
88+ marginDiv . style . marginRight = marginDiv . style . width = "0" ;
89+ div . style . width = "1px" ;
90+ documentElement . appendChild ( container ) ;
9491
95- ret = ! parseFloat ( window . getComputedStyle ( marginDiv , null ) . marginRight ) ;
92+ ret = ! parseFloat ( window . getComputedStyle ( marginDiv , null ) . marginRight ) ;
9693
97- documentElement . removeChild ( container ) ;
98- div . removeChild ( marginDiv ) ;
94+ documentElement . removeChild ( container ) ;
95+ div . removeChild ( marginDiv ) ;
9996
100- return ret ;
101- }
102- } ) ;
103- }
97+ return ret ;
98+ }
99+ } ) ;
104100} ) ( ) ;
105101
106102return support ;
0 commit comments