corrade-nucleus-nucleons – Blame information for rev 20
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
20 | office | 1 | define([ |
2 | "../core", |
||
3 | "../var/support" |
||
4 | ], function( jQuery, support ) { |
||
5 | |||
6 | (function() { |
||
7 | var pixelPositionVal, boxSizingReliableVal, |
||
8 | // Support: Firefox, Android 2.3 (Prefixed box-sizing versions). |
||
9 | divReset = "padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;" + |
||
10 | "-moz-box-sizing:content-box;box-sizing:content-box", |
||
11 | docElem = document.documentElement, |
||
12 | container = document.createElement( "div" ), |
||
13 | div = document.createElement( "div" ); |
||
14 | |||
15 | div.style.backgroundClip = "content-box"; |
||
16 | div.cloneNode( true ).style.backgroundClip = ""; |
||
17 | support.clearCloneStyle = div.style.backgroundClip === "content-box"; |
||
18 | |||
19 | container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;" + |
||
20 | "margin-top:1px"; |
||
21 | container.appendChild( div ); |
||
22 | |||
23 | // Executing both pixelPosition & boxSizingReliable tests require only one layout |
||
24 | // so they're executed at the same time to save the second computation. |
||
25 | function computePixelPositionAndBoxSizingReliable() { |
||
26 | // Support: Firefox, Android 2.3 (Prefixed box-sizing versions). |
||
27 | div.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + |
||
28 | "box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;" + |
||
29 | "position:absolute;top:1%"; |
||
30 | docElem.appendChild( container ); |
||
31 | |||
32 | var divStyle = window.getComputedStyle( div, null ); |
||
33 | pixelPositionVal = divStyle.top !== "1%"; |
||
34 | boxSizingReliableVal = divStyle.width === "4px"; |
||
35 | |||
36 | docElem.removeChild( container ); |
||
37 | } |
||
38 | |||
39 | // Use window.getComputedStyle because jsdom on node.js will break without it. |
||
40 | if ( window.getComputedStyle ) { |
||
41 | jQuery.extend(support, { |
||
42 | pixelPosition: function() { |
||
43 | // This test is executed only once but we still do memoizing |
||
44 | // since we can use the boxSizingReliable pre-computing. |
||
45 | // No need to check if the test was already performed, though. |
||
46 | computePixelPositionAndBoxSizingReliable(); |
||
47 | return pixelPositionVal; |
||
48 | }, |
||
49 | boxSizingReliable: function() { |
||
50 | if ( boxSizingReliableVal == null ) { |
||
51 | computePixelPositionAndBoxSizingReliable(); |
||
52 | } |
||
53 | return boxSizingReliableVal; |
||
54 | }, |
||
55 | reliableMarginRight: function() { |
||
56 | // Support: Android 2.3 |
||
57 | // Check if div with explicit width and no margin-right incorrectly |
||
58 | // gets computed margin-right based on width of container. (#3333) |
||
59 | // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right |
||
60 | // This support function is only executed once so no memoizing is needed. |
||
61 | var ret, |
||
62 | marginDiv = div.appendChild( document.createElement( "div" ) ); |
||
63 | marginDiv.style.cssText = div.style.cssText = divReset; |
||
64 | marginDiv.style.marginRight = marginDiv.style.width = "0"; |
||
65 | div.style.width = "1px"; |
||
66 | docElem.appendChild( container ); |
||
67 | |||
68 | ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight ); |
||
69 | |||
70 | docElem.removeChild( container ); |
||
71 | |||
72 | // Clean up the div for other support tests. |
||
73 | div.innerHTML = ""; |
||
74 | |||
75 | return ret; |
||
76 | } |
||
77 | }); |
||
78 | } |
||
79 | })(); |
||
80 | |||
81 | return support; |
||
82 | |||
83 | }); |