scratch – Diff between revs 58 and 125

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 58 Rev 125
Line 1... Line 1...
1 define( [ 1 define([
2 "../core", 2 "../core",
3 "./var/rnumnonpx", 3 "./var/rnumnonpx",
4 "./var/rmargin", 4 "./var/rmargin",
5 "./var/getStyles", 5 "./var/getStyles",
6 "./support", -  
7 "../selector" // Get jQuery.contains 6 "../selector" // contains
8 ], function( jQuery, rnumnonpx, rmargin, getStyles, support ) { 7 ], function( jQuery, rnumnonpx, rmargin, getStyles ) {
9   -  
10 "use strict"; -  
Line 11... Line 8...
11   8  
12 function curCSS( elem, name, computed ) { 9 function curCSS( elem, name, computed ) {
13 var width, minWidth, maxWidth, ret, 10 var width, minWidth, maxWidth, ret,
Line 14... Line 11...
14 style = elem.style; 11 style = elem.style;
Line 15... Line 12...
15   12  
16 computed = computed || getStyles( elem ); 13 computed = computed || getStyles( elem );
17   14  
18 // Support: IE <=9 only 15 // Support: IE9
-   16 // getPropertyValue is only needed for .css('filter') (#12537)
-   17 if ( computed ) {
-   18 ret = computed.getPropertyValue( name ) || computed[ name ];
Line 19... Line 19...
19 // getPropertyValue is only needed for .css('filter') (#12537) 19 }
20 if ( computed ) { 20  
21 ret = computed.getPropertyValue( name ) || computed[ name ]; 21 if ( computed ) {
Line -... Line 22...
-   22  
22   23 if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
23 if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { 24 ret = jQuery.style( elem, name );
24 ret = jQuery.style( elem, name ); -  
25 } -  
26   25 }
27 // A tribute to the "awesome hack by Dean Edwards" 26  
Line 28... Line 27...
28 // Android Browser returns percentage for some values, 27 // Support: iOS < 6
29 // but width seems to be reliably pixels. 28 // A tribute to the "awesome hack by Dean Edwards"
30 // This is against the CSSOM draft spec: 29 // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
31 // https://drafts.csswg.org/cssom/#resolved-values 30 // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
Line 46... Line 45...
46 style.maxWidth = maxWidth; 45 style.maxWidth = maxWidth;
47 } 46 }
48 } 47 }
Line 49... Line 48...
49   48  
50 return ret !== undefined ? -  
51   49 return ret !== undefined ?
52 // Support: IE <=9 - 11 only 50 // Support: IE
53 // IE returns zIndex value as an integer. 51 // IE returns zIndex value as an integer.
54 ret + "" : 52 ret + "" :
55 ret; 53 ret;
Line 56... Line 54...
56 } 54 }
57   55