Changeset 200888 in webkit
- Timestamp:
- May 13, 2016 3:40:52 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r200887 r200888 1 2016-05-13 Simon Fraser <simon.fraser@apple.com> 2 3 Unprefix -webkit-cross-fade() 4 https://bugs.webkit.org/show_bug.cgi?id=157632 5 6 Reviewed by Darin Adler. 7 8 * animations/cross-fade-background-image-expected.html: 9 * animations/cross-fade-background-image.html: 10 * animations/cross-fade-border-image-source.html: 11 * animations/cross-fade-list-style-image.html: 12 * animations/cross-fade-webkit-mask-box-image.html: 13 * animations/cross-fade-webkit-mask-image.html: 14 * animations/resources/animation-test-helpers.js: 15 (parseCSSImage): 16 (parseCrossFade): 17 (compareCSSImages): 18 * fast/css/getComputedStyle/computed-style-cross-fade-expected.txt: 19 * fast/css/getComputedStyle/computed-style-cross-fade.html: 20 * transitions/resources/transition-test-helpers.js: 21 (parseCrossFade): 22 1 23 2016-05-13 Yoav Weiss <yoav@yoav.ws> 2 24 -
trunk/LayoutTests/animations/cross-fade-background-image-expected.html
r155100 r200888 15 15 <div id="rect"></div> 16 16 <div id="result"> 17 PASS - "backgroundImage" property for "box" element at 2.5s saw something close to: -webkit-cross-fade(url(blue-100.png), url(green-100.png), 50%)<br>17 PASS - "backgroundImage" property for "box" element at 2.5s saw something close to: cross-fade(url(blue-100.png), url(green-100.png), 50%)<br> 18 18 PASS - "backgroundImage" property for "box" and "boxStatic" elements at 2.5s are close enough to each other<br> 19 19 PASS - "backgroundImage" property for "boxShorthand" and "boxStatic" elements at 2.5s are close enough to each other<br> 20 PASS - "backgroundImage" property for "boxAnim1" element at 2.5s saw something close to: -webkit-cross-fade(url(resources/blue-100.png), url(resources/green-100.png), 0.5)<br>21 PASS - "backgroundImage" property for "boxAnim2" element at 2.5s saw something close to: -webkit-cross-fade(url(resources/green-100.png), url(resources/blue-100.png), 50%)<br>22 PASS - "backgroundImage" property for "boxAnim3" element at 2.5s saw something close to: -webkit-cross-fade(url(resources/blue-100.png), url(resources/green-100.png), 50%)<br>20 PASS - "backgroundImage" property for "boxAnim1" element at 2.5s saw something close to: cross-fade(url(resources/blue-100.png), url(resources/green-100.png), 0.5)<br> 21 PASS - "backgroundImage" property for "boxAnim2" element at 2.5s saw something close to: cross-fade(url(resources/green-100.png), url(resources/blue-100.png), 50%)<br> 22 PASS - "backgroundImage" property for "boxAnim3" element at 2.5s saw something close to: cross-fade(url(resources/blue-100.png), url(resources/green-100.png), 50%)<br> 23 23 </div> 24 24 </body> -
trunk/LayoutTests/animations/cross-fade-background-image.html
r155100 r200888 71 71 /* Image inputs are not identical - no animation.*/ 72 72 from { background-image: -webkit-cross-fade(url(resources/blue-100.png), url(resources/green-100.png), 20%); } 73 to { background-image: -webkit-cross-fade(url(resources/green-100.png), url(resources/blue-100.png), 50%); }73 to { background-image: cross-fade(url(resources/green-100.png), url(resources/blue-100.png), 50%); } 74 74 } 75 75 @-webkit-keyframes animCross3 { … … 83 83 const expectedValues = [ 84 84 // [animation-name, time, element-id, property, expected-value, tolerance] 85 ["anim", 2.5, "box", "backgroundImage", " -webkit-cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05],86 ["anim", 2.5, ["box", "static:boxStatic"], "backgroundImage", " -webkit-cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05],87 ["animShorthand", 2.5, ["boxShorthand", "static:boxStatic"], "backgroundImage", " -webkit-cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05],88 ["animCross1", 2.5, "boxAnim1", "backgroundImage", " -webkit-cross-fade(url(resources/blue-100.png), url(resources/green-100.png), 0.5)", 0.05],89 ["animCross2", 2.5, "boxAnim2", "backgroundImage", " -webkit-cross-fade(url(resources/green-100.png), url(resources/blue-100.png), 50%)", 0],90 ["animCross3", 2.5, "boxAnim3", "backgroundImage", " -webkit-cross-fade(url(resources/blue-100.png), url(resources/green-100.png), 50%)", 0],85 ["anim", 2.5, "box", "backgroundImage", "cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05], 86 ["anim", 2.5, ["box", "static:boxStatic"], "backgroundImage", "cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05], 87 ["animShorthand", 2.5, ["boxShorthand", "static:boxStatic"], "backgroundImage", "cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05], 88 ["animCross1", 2.5, "boxAnim1", "backgroundImage", "cross-fade(url(resources/blue-100.png), url(resources/green-100.png), 0.5)", 0.05], 89 ["animCross2", 2.5, "boxAnim2", "backgroundImage", "cross-fade(url(resources/green-100.png), url(resources/blue-100.png), 50%)", 0], 90 ["animCross3", 2.5, "boxAnim3", "backgroundImage", "cross-fade(url(resources/blue-100.png), url(resources/green-100.png), 50%)", 0], 91 91 ]; 92 92 -
trunk/LayoutTests/animations/cross-fade-border-image-source.html
r192970 r200888 45 45 // FIXME: We can't test reading the borderImage shorthand because of bug #13658. 46 46 ["anim", 2.5, "box", "borderImageSource", "-webkit-cross-fade(url(stripes-100.png), url(green-100.png), 0.5)", 0.05], 47 ["anim", 2.5, ["box", "static:boxStatic"], "borderImageSource", " -webkit-cross-fade(url(stripes-100.png), url(green-100.png), 50%)", 0.05],48 ["animShorthand", 2.5, ["boxShorthand", "static:boxStatic"], "borderImageSource", " -webkit-cross-fade(url(stripes-100), url(green-100.png), 50%)", 0.05],47 ["anim", 2.5, ["box", "static:boxStatic"], "borderImageSource", "cross-fade(url(stripes-100.png), url(green-100.png), 50%)", 0.05], 48 ["animShorthand", 2.5, ["boxShorthand", "static:boxStatic"], "borderImageSource", "cross-fade(url(stripes-100), url(green-100.png), 50%)", 0.05], 49 49 ]; 50 50 -
trunk/LayoutTests/animations/cross-fade-list-style-image.html
r154906 r200888 40 40 // [animation-name, time, element-id, property, expected-value, tolerance] 41 41 ["anim", 2.5, "box", "listStyleImage", "-webkit-cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05], 42 ["anim", 2.5, ["box", "static:boxStatic"], "listStyleImage", " -webkit-cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05],43 ["animShorthand", 2.5, ["boxShorthand", "static:boxStatic"], "listStyleImage", " -webkit-cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05],42 ["anim", 2.5, ["box", "static:boxStatic"], "listStyleImage", "cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05], 43 ["animShorthand", 2.5, ["boxShorthand", "static:boxStatic"], "listStyleImage", "cross-fade(url(blue-100.png), url(green-100.png), 50%)", 0.05], 44 44 ]; 45 45 -
trunk/LayoutTests/animations/cross-fade-webkit-mask-box-image.html
r154906 r200888 30 30 // [animation-name, time, element-id, property, expected-value, tolerance] 31 31 ["anim", 2.25, "box", "webkitMaskBoxImage", "-webkit-cross-fade(url(stripes-100.png), url(green-100.png), 25%)", 0.05], 32 ["anim", 2.25, ["box", "static:boxStatic"], "webkitMaskBoxImage", " -webkit-cross-fade(url(stripes-100.png), url(green-100.png), 25%)", 0.05]32 ["anim", 2.25, ["box", "static:boxStatic"], "webkitMaskBoxImage", "cross-fade(url(stripes-100.png), url(green-100.png), 25%)", 0.05] 33 33 ]; 34 34 -
trunk/LayoutTests/animations/cross-fade-webkit-mask-image.html
r154906 r200888 29 29 const expectedValues = [ 30 30 // [animation-name, time, element-id, property, expected-value, tolerance] 31 ["anim", 2.25, "box", "webkitMaskImage", " -webkit-cross-fade(url(stripes-100.png), url(green-100.png), 25%)", 0.05],31 ["anim", 2.25, "box", "webkitMaskImage", "cross-fade(url(stripes-100.png), url(green-100.png), 25%)", 0.05], 32 32 ["anim", 2.25, ["box", "static:boxStatic"], "webkitMaskImage", "-webkit-cross-fade(url(stripes-100.png), url(green-100.png), 25%)", 0.05] 33 33 ]; -
trunk/LayoutTests/animations/resources/animation-test-helpers.js
r200043 r200888 73 73 case "filter": 74 74 return parseFilterImage(functionValue); 75 case "cross-fade": 75 76 case "-webkit-cross-fade": 76 77 return parseCrossFade(functionValue); … … 89 90 var matches = s.match("(.*)\\s*,\\s*(.*)\\s*,\\s*(.*)\\s*"); 90 91 if (!matches) { 91 console.error("Parsing error on ' -webkit-cross-fade()'.");92 console.error("Parsing error on 'cross-fade()'."); 92 93 return null; 93 94 } … … 96 97 var to = parseCSSImage(matches[2]); 97 98 if (!from || !to) { 98 console.error("Parsing error on images passed to ' -webkit-cross-fade()' ", s);99 console.error("Parsing error on images passed to 'cross-fade()' ", s); 99 100 return null; 100 101 } … … 106 107 // Normalize it to number. 107 108 if (fadeValue.search('%') != fadeValue.length - 1) { 108 console.error("Passed value to ' -webkit-cross-fade()' is not a number or percentage ", fadeValue);109 console.error("Passed value to 'cross-fade()' is not a number or percentage ", fadeValue); 109 110 return null; 110 111 } 111 112 fadeValue = fadeValue.slice(0, fadeValue.length - 1); 112 113 if (isNaN(fadeValue)) { 113 console.error("Passed value to ' -webkit-cross-fade()' is not a number or percentage ", fadeValue);114 console.error("Passed value to 'cross-fade()' is not a number or percentage ", fadeValue); 114 115 return null; 115 116 } … … 118 119 percent = parseFloat(fadeValue); 119 120 120 return [" -webkit-cross-fade", from, to, percent];121 return ["cross-fade", from, to, percent]; 121 122 } 122 123 … … 245 246 return compareCSSImages(actual[1], expected[1], tolerance) 246 247 && compareFilterFunctions(actual[2], expected[2], tolerance); 248 case "cross-fade": 247 249 case "-webkit-cross-fade": 248 250 return compareCSSImages(actual[1], expected[1], tolerance) -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade-expected.txt
r100687 r200888 1 -webkit-cross-fade1 cross-fade 2 2 3 3 4 4 PASS testCrossfade("opacity: 500%", "opacity") is "1" 5 Prefixed 5 6 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 50%)", "background-image") is "-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)" 6 7 PASS testCrossfade("background-image: -webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), url(dummy://example.png), 50%)", "background-image") is "-webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), url(dummy://example.png), 0.5)" … … 12 13 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 700%)", "background-image") is "-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 1)" 13 14 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), -20)", "background-image") is "-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0)" 15 Unprefixed 16 17 18 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png), 50%)", "background-image") is "cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)" 19 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png), 1.0)", "background-image") is "cross-fade(url(dummy://example.png), url(dummy://example.png), 1)" 20 Mixed 21 22 23 PASS testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), url(dummy://example.png), 50%)", "background-image") is "-webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), url(dummy://example.png), 0.5)" 24 PASS testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image") is "-webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)" 25 PASS testCrossfade("background-image: cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image") is "cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)" 26 Invalid values 27 28 14 29 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png))", "background-image") is "none" 15 30 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png),)", "background-image") is "none" 16 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png))", "background-image") is "none" 17 PASS testCrossfade("background-image: -webkit-cross-fade(), url(dummy://example.png))", "background-image") is "none" 18 PASS testCrossfade("background-image: -webkit-cross-fade(url(", "background-image") is "none" 19 PASS testCrossfade("background-image: -webkit-cross-fade(10px 20% 5px #bbb)", "background-image") is "none" 20 PASS testCrossfade("background-image: -webkit-cross-fade(-webkit-cross-fade(-webkit-cross-fade()))", "background-image") is "none" 21 PASS testCrossfade("background-image: -webkit-cross-fade(20%, url(dummy://a.png), url(dummy://b.png))", "background-image") is "none" 22 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://a.png),)", "background-image") is "none" 23 PASS testCrossfade("background-image: -webkit-cross-fade(,)", "background-image") is "none" 24 PASS testCrossfade("background-image: -webkit-cross-fade(,url(dummy://a.png))", "background-image") is "none" 25 PASS testCrossfade("background-image: -webkit-cross-fade(,,,,,)", "background-image") is "none" 31 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png))", "background-image") is "none" 32 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png),)", "background-image") is "none" 33 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png))", "background-image") is "none" 34 PASS testCrossfade("background-image: cross-fade(), url(dummy://example.png))", "background-image") is "none" 35 PASS testCrossfade("background-image: cross-fade(url(", "background-image") is "none" 36 PASS testCrossfade("background-image: cross-fade(10px 20% 5px #bbb)", "background-image") is "none" 37 PASS testCrossfade("background-image: cross-fade(cross-fade(cross-fade()))", "background-image") is "none" 38 PASS testCrossfade("background-image: cross-fade(20%, url(dummy://a.png), url(dummy://b.png))", "background-image") is "none" 39 PASS testCrossfade("background-image: cross-fade(url(dummy://a.png),)", "background-image") is "none" 40 PASS testCrossfade("background-image: cross-fade(,)", "background-image") is "none" 41 PASS testCrossfade("background-image: cross-fade(,url(dummy://a.png))", "background-image") is "none" 42 PASS testCrossfade("background-image: cross-fade(,,,,,)", "background-image") is "none" 26 43 PASS successfullyParsed is true 27 44 -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade.html
r155263 r200888 18 18 } 19 19 20 debug('< p>-webkit-cross-fade</p>');20 debug('<h2>cross-fade</h2>'); 21 21 22 22 // Valid 23 23 24 24 shouldBe('testCrossfade("opacity: 500%", "opacity")', '"1"'); 25 26 debug('Prefixed'); 27 25 28 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 50%)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)"'); 26 29 shouldBe('testCrossfade("background-image: -webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), url(dummy://example.png), 50%)", "background-image")', '"-webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), url(dummy://example.png), 0.5)"'); 27 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://c.png), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image")', '"-webkit-cross-fade(url(dummy://c.png), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)"'); 30 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://c.png), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image")', 31 '"-webkit-cross-fade(url(dummy://c.png), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)"'); 28 32 shouldBe('testCrossfade("background-image: -webkit-cross-fade(-webkit-linear-gradient(black, white), url(dummy://example.png), 10%)", "background-image")', '"-webkit-cross-fade(-webkit-linear-gradient(top, black, white), url(dummy://example.png), 0.1)"'); 29 33 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 1.0)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 1)"'); … … 35 39 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), -20)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0)"'); 36 40 37 // Invalid 41 debug('<h2>Unprefixed</h2>'); 42 43 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png), 50%)", "background-image")', '"cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)"'); 44 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png), 1.0)", "background-image")', '"cross-fade(url(dummy://example.png), url(dummy://example.png), 1)"'); 45 46 debug('<h2>Mixed</h2>'); 47 48 shouldBe('testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), url(dummy://example.png), 50%)", "background-image")', 49 '"-webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), url(dummy://example.png), 0.5)"'); 50 shouldBe('testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image")', 51 '"-webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)"'); 52 shouldBe('testCrossfade("background-image: cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image")', 53 '"cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)"'); 54 55 debug('<h2>Invalid values</h2>'); 38 56 39 57 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png))", "background-image")', '"none"'); 40 58 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png),)", "background-image")', '"none"'); 41 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png))", "background-image")', '"none"'); 42 shouldBe('testCrossfade("background-image: -webkit-cross-fade(), url(dummy://example.png))", "background-image")', '"none"'); 43 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(", "background-image")', '"none"'); 44 shouldBe('testCrossfade("background-image: -webkit-cross-fade(10px 20% 5px #bbb)", "background-image")', '"none"'); 45 shouldBe('testCrossfade("background-image: -webkit-cross-fade(-webkit-cross-fade(-webkit-cross-fade()))", "background-image")', '"none"'); 46 shouldBe('testCrossfade("background-image: -webkit-cross-fade(20%, url(dummy://a.png), url(dummy://b.png))", "background-image")', '"none"'); 47 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://a.png),)", "background-image")', '"none"'); 48 shouldBe('testCrossfade("background-image: -webkit-cross-fade(,)", "background-image")', '"none"'); 49 shouldBe('testCrossfade("background-image: -webkit-cross-fade(,url(dummy://a.png))", "background-image")', '"none"'); 50 shouldBe('testCrossfade("background-image: -webkit-cross-fade(,,,,,)", "background-image")', '"none"'); 59 60 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png))", "background-image")', '"none"'); 61 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png),)", "background-image")', '"none"'); 62 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png))", "background-image")', '"none"'); 63 shouldBe('testCrossfade("background-image: cross-fade(), url(dummy://example.png))", "background-image")', '"none"'); 64 shouldBe('testCrossfade("background-image: cross-fade(url(", "background-image")', '"none"'); 65 shouldBe('testCrossfade("background-image: cross-fade(10px 20% 5px #bbb)", "background-image")', '"none"'); 66 shouldBe('testCrossfade("background-image: cross-fade(cross-fade(cross-fade()))", "background-image")', '"none"'); 67 shouldBe('testCrossfade("background-image: cross-fade(20%, url(dummy://a.png), url(dummy://b.png))", "background-image")', '"none"'); 68 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://a.png),)", "background-image")', '"none"'); 69 shouldBe('testCrossfade("background-image: cross-fade(,)", "background-image")', '"none"'); 70 shouldBe('testCrossfade("background-image: cross-fade(,url(dummy://a.png))", "background-image")', '"none"'); 71 shouldBe('testCrossfade("background-image: cross-fade(,,,,,)", "background-image")', '"none"'); 51 72 52 73 -
trunk/LayoutTests/transitions/resources/transition-test-helpers.js
r191551 r200888 62 62 function parseCrossFade(s) 63 63 { 64 var matches = s.match(" -webkit-cross-fade\\((.*)\\s*,\\s*(.*)\\s*,\\s*(.*)\\)");64 var matches = s.match("(?:-webkit-)?cross-fade\\((.*)\\s*,\\s*(.*)\\s*,\\s*(.*)\\)"); 65 65 66 66 if (!matches) -
trunk/Source/WebCore/ChangeLog
r200887 r200888 1 2016-05-13 Simon Fraser <simon.fraser@apple.com> 2 3 Unprefix -webkit-cross-fade() 4 https://bugs.webkit.org/show_bug.cgi?id=157632 5 6 Reviewed by Darin Adler. 7 8 Support unprefixed cross-fade() in addition to the prefixed value when parsing, 9 and have computed style round-trip the correct one. 10 11 If computed style is queried during an image transition, return an unprefixed 12 cross-fade(). If blending cross-fade values, only return the prefixed function if 13 both inputs are prefixed. 14 15 Tested by modified and existing tests. 16 17 * css/CSSCrossfadeValue.cpp: 18 (WebCore::CSSCrossfadeValue::customCSSText): 19 (WebCore::CSSCrossfadeValue::blend): 20 * css/CSSCrossfadeValue.h: 21 (WebCore::CSSCrossfadeValue::create): 22 (WebCore::CSSCrossfadeValue::isPrefixed): 23 (WebCore::CSSCrossfadeValue::CSSCrossfadeValue): 24 * css/CSSParser.cpp: 25 (WebCore::CSSParser::isGeneratedImageValue): 26 (WebCore::CSSParser::parseGeneratedImage): 27 (WebCore::CSSParser::parseCrossfade): 28 * css/CSSParser.h: 29 1 30 2016-05-13 Yoav Weiss <yoav@yoav.ws> 2 31 -
trunk/Source/WebCore/css/CSSCrossfadeValue.cpp
r199561 r200888 70 70 { 71 71 StringBuilder result; 72 result.appendLiteral("-webkit-cross-fade("); 72 if (m_isPrefixed) 73 result.appendLiteral("-webkit-cross-fade("); 74 else 75 result.appendLiteral("cross-fade("); 73 76 result.append(m_fromValue->cssText()); 74 77 result.appendLiteral(", "); … … 203 206 auto toImageValue = CSSImageValue::create(m_cachedToImage->url(), toStyledImage.get()); 204 207 205 RefPtr<CSSCrossfadeValue> crossfadeValue = CSSCrossfadeValue::create(WTFMove(fromImageValue), WTFMove(toImageValue) );208 RefPtr<CSSCrossfadeValue> crossfadeValue = CSSCrossfadeValue::create(WTFMove(fromImageValue), WTFMove(toImageValue), from.isPrefixed() && isPrefixed()); 206 209 207 210 double fromPercentage = from.m_percentageValue->getDoubleValue(); -
trunk/Source/WebCore/css/CSSCrossfadeValue.h
r197563 r200888 44 44 friend class CrossfadeSubimageObserverProxy; 45 45 public: 46 static Ref<CSSCrossfadeValue> create(PassRefPtr<CSSValue> fromValue, PassRefPtr<CSSValue> toValue )46 static Ref<CSSCrossfadeValue> create(PassRefPtr<CSSValue> fromValue, PassRefPtr<CSSValue> toValue, bool prefixed = false) 47 47 { 48 return adoptRef(*new CSSCrossfadeValue(fromValue, toValue ));48 return adoptRef(*new CSSCrossfadeValue(fromValue, toValue, prefixed)); 49 49 } 50 50 … … 57 57 FloatSize fixedSize(const RenderElement*); 58 58 59 bool isPrefixed() const { return m_isPrefixed; } 59 60 bool isPending() const; 60 61 bool knownToBeOpaque(const RenderElement*) const; … … 73 74 74 75 private: 75 CSSCrossfadeValue(PassRefPtr<CSSValue> fromValue, PassRefPtr<CSSValue> toValue )76 CSSCrossfadeValue(PassRefPtr<CSSValue> fromValue, PassRefPtr<CSSValue> toValue, bool prefixed) 76 77 : CSSImageGeneratorValue(CrossfadeClass) 77 78 , m_fromValue(fromValue) 78 79 , m_toValue(toValue) 79 80 , m_crossfadeSubimageObserver(this) 81 , m_isPrefixed(prefixed) 80 82 { 81 83 } … … 109 111 110 112 CrossfadeSubimageObserverProxy m_crossfadeSubimageObserver; 113 bool m_isPrefixed { false }; 111 114 }; 112 115 -
trunk/Source/WebCore/css/CSSParser.cpp
r200769 r200888 4539 4539 valueList.next(); 4540 4540 } 4541 4541 4542 void CSSParser::parse3ValuesFillPosition(CSSParserValueList& valueList, RefPtr<CSSPrimitiveValue>& value1, RefPtr<CSSPrimitiveValue>& value2, RefPtr<CSSPrimitiveValue>&& parsedValue1, RefPtr<CSSPrimitiveValue>&& parsedValue2) 4542 4543 { … … 9452 9453 || equalLettersIgnoringASCIICase(value.function->name, "repeating-radial-gradient(") 9453 9454 || equalLettersIgnoringASCIICase(value.function->name, "-webkit-canvas(") 9455 || equalLettersIgnoringASCIICase(value.function->name, "cross-fade(") 9454 9456 || equalLettersIgnoringASCIICase(value.function->name, "-webkit-cross-fade(") 9455 9457 || equalLettersIgnoringASCIICase(value.function->name, "filter(") … … 9496 9498 9497 9499 if (equalLettersIgnoringASCIICase(parserValue.function->name, "-webkit-cross-fade(")) 9498 return parseCrossfade(valueList, value); 9500 return parseCrossfade(valueList, value, true); 9501 9502 if (equalLettersIgnoringASCIICase(parserValue.function->name, "cross-fade(")) 9503 return parseCrossfade(valueList, value, false); 9499 9504 9500 9505 if (equalLettersIgnoringASCIICase(parserValue.function->name, "filter(") || equalLettersIgnoringASCIICase(parserValue.function->name, "-webkit-filter(")) … … 9548 9553 } 9549 9554 9550 bool CSSParser::parseCrossfade(CSSParserValueList& valueList, RefPtr<CSSValue>& crossfade )9555 bool CSSParser::parseCrossfade(CSSParserValueList& valueList, RefPtr<CSSValue>& crossfade, bool prefixed) 9551 9556 { 9552 9557 RefPtr<CSSCrossfadeValue> result; … … 9592 9597 return false; 9593 9598 9594 result = CSSCrossfadeValue::create(fromImageValue, toImageValue );9599 result = CSSCrossfadeValue::create(fromImageValue, toImageValue, prefixed); 9595 9600 result->setPercentage(percentage); 9596 9601 -
trunk/Source/WebCore/css/CSSParser.h
r200769 r200888 305 305 bool parseGradientColorStops(CSSParserValueList&, CSSGradientValue&, bool expectComma); 306 306 307 bool parseCrossfade(CSSParserValueList&, RefPtr<CSSValue>& );307 bool parseCrossfade(CSSParserValueList&, RefPtr<CSSValue>&, bool prefixed); 308 308 309 309 #if ENABLE(CSS_IMAGE_RESOLUTION) -
trunk/Source/WebInspectorUI/ChangeLog
r200886 r200888 1 2016-05-13 Simon Fraser <simon.fraser@apple.com> 2 3 Unprefix -webkit-cross-fade() 4 https://bugs.webkit.org/show_bug.cgi?id=157632 5 6 Reviewed by Darin Adler. 7 8 * UserInterface/Models/CSSKeywordCompletions.js: 9 1 10 2016-05-13 Matt Baker <mattbaker@apple.com> 2 11 -
trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js
r200575 r200888 163 163 ], 164 164 "content": [ 165 "list-item", "close-quote", "no-close-quote", "no-open-quote", "open-quote", "attr()", "counter()", "counters()", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", " -webkit-cross-fade()", "-webkit-image-set()"165 "list-item", "close-quote", "no-close-quote", "no-open-quote", "open-quote", "attr()", "counter()", "counters()", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", "cross-fade()", "-webkit-image-set()" 166 166 ], 167 167 "list-style-image": [ 168 "none", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", " -webkit-cross-fade()", "-webkit-image-set()"168 "none", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", "cross-fade()", "-webkit-image-set()" 169 169 ], 170 170 "clear": [ … … 244 244 ], 245 245 "background": [ 246 "none", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", " -webkit-cross-fade()", "-webkit-image-set()",246 "none", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", "cross-fade()", "-webkit-image-set()", 247 247 "repeat", "repeat-x", "repeat-y", "no-repeat", "space", "round", 248 248 "scroll", "fixed", "local", … … 252 252 ], 253 253 "background-image": [ 254 "none", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", " -webkit-cross-fade()", "-webkit-image-set()"254 "none", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", "cross-fade()", "-webkit-image-set()" 255 255 ], 256 256 "background-size": [ … … 475 475 ], 476 476 "border-image": [ 477 "repeat", "stretch", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", " -webkit-cross-fade()", "-webkit-image-set()"477 "repeat", "stretch", "url()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()", "-webkit-canvas()", "cross-fade()", "-webkit-image-set()" 478 478 ], 479 479 "border-image-repeat": [
Note: See TracChangeset
for help on using the changeset viewer.