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

Side by Side Diff: LayoutTests/animations/interpolation/border-image-slice-interpolation.html

Issue 995253002: Web Animations: Split image slice interpolation out of LengthBoxStyleInterpolation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 .target { 4 .target {
5 width: 50px; 5 width: 50px;
6 height: 50px; 6 height: 50px;
7 background-color: black; 7 background-color: black;
8 display: inline-block; 8 display: inline-block;
9 border: 25px; 9 border: 25px;
10 border-image-source: linear-gradient(45deg, red, blue, green); 10 border-image-source: linear-gradient(45deg, red, blue, green);
11 } 11 }
12 .replica { 12 .replica {
13 background-color: green; 13 background-color: green;
14 margin-right: 2px; 14 margin-right: 2px;
15 } 15 }
16 </style> 16 </style>
17 <body> 17 <body>
18 <script src="resources/interpolation-test.js"></script> 18 <script src="resources/interpolation-test.js"></script>
19 <script> 19 <script>
20 assertInterpolation({ 20 assertInterpolation({
21 property: 'border-image-slice', 21 property: 'border-image-slice',
22 from: '0%', 22 from: '0%',
23 to: '50%', 23 to: '50%',
24 }, [ 24 }, [
25 {at: -0.3, is: '0%'}, // CSS border-image-slice can't be negative. 25 {at: -0.3, is: '0%'}, // CSS border-image-slice can't be negative.
26 {at: 0, is: '0%'}, 26 {at: 0, is: '0%'},
27 {at: 0.1, is: '5%'},
28 {at: 0.2, is: '10%'},
29 {at: 0.3, is: '15%'}, 27 {at: 0.3, is: '15%'},
30 {at: 0.4, is: '20%'},
31 {at: 0.5, is: '25%'}, 28 {at: 0.5, is: '25%'},
32 {at: 0.6, is: '30%'}, 29 {at: 0.6, is: '30%'},
33 {at: 0.7, is: '35%'},
34 {at: 0.8, is: '40%'},
35 {at: 0.9, is: '45%'},
36 {at: 1, is: '50%'}, 30 {at: 1, is: '50%'},
37 {at: 1.5, is: '75%'}, 31 {at: 1.5, is: '75%'},
38 {at: 10, is: '500%'}
39 ]); 32 ]);
33
34 assertInterpolation({
35 property: 'border-image-slice',
36 from: '0% fill',
37 to: '50%',
38 }, [
39 {at: -0.3, is: '0% fill'},
40 {at: 0, is: '0% fill'},
41 {at: 0.3, is: '0% fill'},
42 {at: 0.5, is: '50%'},
43 {at: 0.6, is: '50%'},
44 {at: 1, is: '50%'},
45 {at: 1.5, is: '50%'},
46 ]);
47
48 assertInterpolation({
49 property: 'border-image-slice',
50 from: '50%',
51 to: '100',
52 }, [
53 {at: -0.3, is: '50%'},
54 {at: 0, is: '50%'},
55 {at: 0.3, is: '50%'},
56 {at: 0.5, is: '100'},
57 {at: 0.6, is: '100'},
58 {at: 1, is: '100'},
59 {at: 1.5, is: '100'},
60 ]);
61
62 assertInterpolation({
63 property: 'border-image-slice',
64 from: '0% 10% 20% 30%',
65 to: '40% 50% 60% 70%',
66 }, [
67 {at: -0.3, is: '0% 0% 8% 17%'},
68 {at: 0, is: '0% 10% 20% 30%'},
69 {at: 0.3, is: '12% 22% 32% 42%'},
70 {at: 0.5, is: '20% 30% 40% 50%'},
71 {at: 0.6, is: '24% 34% 44% 54%'},
72 {at: 1, is: '40% 50% 60% 70%'},
73 {at: 1.5, is: '60% 70% 80% 90%'},
74 ]);
75
76 assertInterpolation({
77 property: 'border-image-slice',
78 from: '0 10 20 30 fill',
79 to: '40 50 60 70 fill',
80 }, [
81 {at: -0.3, is: '0 0 8 17 fill'}, // CSS border-image-slice can't be negative.
82 {at: 0, is: '0 10 20 30 fill'},
83 {at: 0.3, is: '12 22 32 42 fill'},
84 {at: 0.5, is: '20 30 40 50 fill'},
85 {at: 0.6, is: '24 34 44 54 fill'},
86 {at: 1, is: '40 50 60 70 fill'},
87 {at: 1.5, is: '60 70 80 90 fill'},
88 ]);
89
40 </script> 90 </script>
41 </body> 91 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698