Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: LayoutTests/animations/interpolation/webkit-mask-box-image-slice-interpolation.html

Issue 1262283002: Fix 50% flip handling of CSS Animations using CSS wide keywords (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset="UTF-8"> 2 <meta charset="UTF-8">
3 <style> 3 <style>
4 .parent {
5 -webkit-mask-box-image-slice: 30%;
6 }
4 .target { 7 .target {
5 width: 50px; 8 width: 50px;
6 height: 50px; 9 height: 50px;
7 background-color: black; 10 background-color: black;
8 display: inline-block; 11 display: inline-block;
9 border: 25px; 12 border: 25px;
10 -webkit-mask-box-image-source: linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0 , 0, 0, 1)); 13 -webkit-mask-box-image-source: linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0 , 0, 0, 1));
14 -webkit-mask-box-image-slice: 10%;
11 } 15 }
12 .expected { 16 .expected {
13 background-color: green; 17 background-color: green;
14 margin-right: 2px; 18 margin-right: 2px;
15 } 19 }
16 </style> 20 </style>
17 <body> 21 <body>
18 <script src="resources/interpolation-test.js"></script> 22 <script src="resources/interpolation-test.js"></script>
19 <script> 23 <script>
20 assertInterpolation({ 24 assertInterpolation({
21 property: '-webkit-mask-box-image-slice', 25 property: '-webkit-mask-box-image-slice',
26 from: '',
27 to: '20%',
28 }, [
29 {at: -0.3, is: '7%'},
30 {at: 0, is: '10%'},
31 {at: 0.4, is: '14%'},
32 {at: 0.6, is: '16%'},
33 {at: 1, is: '20%'},
34 {at: 1.5, is: '25%'},
35 {at: 10, is: '110%'},
36 ]);
37
38 assertNoInterpolation({
39 property: '-webkit-mask-box-image-slice',
40 from: 'initial',
41 to: '20%',
42 });
43
44 assertInterpolation({
45 property: '-webkit-mask-box-image-slice',
46 from: 'inherit',
47 to: '20%',
48 }, [
49 {at: -0.3, is: '33%'},
50 {at: 0, is: '30%'},
51 {at: 0.4, is: '26%'},
52 {at: 0.6, is: '24%'},
53 {at: 1, is: '20%'},
54 {at: 1.5, is: '15%'},
55 {at: 10, is: '0%'},
56 ]);
57
58 assertNoInterpolation({
59 property: '-webkit-mask-box-image-slice',
60 from: 'unset',
61 to: '20%',
62 });
63
64
65 assertInterpolation({
66 property: '-webkit-mask-box-image-slice',
22 from: '0%', 67 from: '0%',
23 to: '50%', 68 to: '50%',
24 }, [ 69 }, [
25 {at: -0.3, is: '0%'}, // CSS webkit-mask-box-image-slice can't be negative. 70 {at: -0.3, is: '0%'}, // CSS webkit-mask-box-image-slice can't be negative.
26 {at: 0, is: '0%'}, 71 {at: 0, is: '0%'},
27 {at: 0.4, is: '20%'}, 72 {at: 0.4, is: '20%'},
28 {at: 0.6, is: '30%'}, 73 {at: 0.6, is: '30%'},
29 {at: 1, is: '50%'}, 74 {at: 1, is: '50%'},
30 {at: 1.5, is: '75%'}, 75 {at: 1.5, is: '75%'},
31 {at: 10, is: '500%'}, 76 {at: 10, is: '500%'},
32 ]); 77 ]);
33 78
34 assertNoInterpolation({ 79 assertNoInterpolation({
35 property: '-webkit-mask-box-image-slice', 80 property: '-webkit-mask-box-image-slice',
36 from: '0%', 81 from: '0%',
37 to: '50% fill', 82 to: '50% fill',
38 }); 83 });
39 </script> 84 </script>
40 </body> 85 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698