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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-dx-dy-number-composition.html

Issue 1587533002: Add composition support for SVG Web Animation of x, y, dx, dy attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review changes Created 4 years, 11 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <template id="target-template"> 4 <template id="target-template">
5 <svg width="0" height="0"> 5 <svg width="0" height="0">
6 <feSpotLight class="target" /> 6 <feOffset class="target"></feOffset>
7 </svg> 7 </svg>
8 </template> 8 </template>
9 <script src="../svg-attribute-interpolation/resources/interpolation-test.js"></s cript> 9 <script src="../svg-attribute-interpolation/resources/interpolation-test.js"></s cript>
10 <script> 10 <script>
11 'use strict'; 11 'use strict';
12 assertAttributeInterpolation({ 12 assertAttributeInterpolation({
13 property: 'pointsAtX', 13 property: 'dx',
14 underlying: '3', 14 underlying: '3',
15 from: '1', 15 from: '1',
16 fromComposite: 'add', 16 fromComposite: 'add',
17 to: '6', 17 to: '6',
18 toComposite: 'add', 18 toComposite: 'add',
19 }, [ 19 }, [
20 {at: -0.4, is: 2}, 20 {at: -0.4, is: 2},
21 {at: 0, is: 4}, 21 {at: 0, is: 4},
22 {at: 0.2, is: 5}, 22 {at: 0.2, is: 5},
23 {at: 0.6, is: 7}, 23 {at: 0.6, is: 7},
24 {at: 1, is: 9}, 24 {at: 1, is: 9},
25 {at: 1.4, is: 11}, 25 {at: 1.4, is: 11},
26 ]); 26 ]);
27
28 assertAttributeInterpolation({ 27 assertAttributeInterpolation({
29 property: 'pointsAtX', 28 property: 'dy',
30 underlying: '5',
31 from: '1',
32 fromComposite: 'replace',
33 to: '6',
34 toComposite: 'add',
35 }, [
36 {at: -0.4, is: -3},
37 {at: 0, is: 1},
38 {at: 0.2, is: 3},
39 {at: 0.6, is: 7},
40 {at: 1, is: 11},
41 {at: 1.4, is: 15},
42 ]);
43
44 assertAttributeInterpolation({
45 property: 'pointsAtX',
46 underlying: '5',
47 from: neutralKeyframe,
48 to: '10',
49 toComposite: 'replace',
50 }, [
51 {at: -0.4, is: 3},
52 {at: 0, is: 5},
53 {at: 0.2, is: 6},
54 {at: 0.6, is: 8},
55 {at: 1, is: 10},
56 {at: 1.4, is: 12},
57 ]);
58
59 assertAttributeInterpolation({
60 property: 'pointsAtY',
61 underlying: '3', 29 underlying: '3',
62 from: '1', 30 from: '1',
63 fromComposite: 'add', 31 fromComposite: 'add',
64 to: '6', 32 to: '6',
65 toComposite: 'add', 33 toComposite: 'add',
66 }, [ 34 }, [
67 {at: -0.4, is: 2}, 35 {at: -0.4, is: 2},
68 {at: 0, is: 4}, 36 {at: 0, is: 4},
69 {at: 0.2, is: 5}, 37 {at: 0.2, is: 5},
70 {at: 0.6, is: 7}, 38 {at: 0.6, is: 7},
71 {at: 1, is: 9}, 39 {at: 1, is: 9},
72 {at: 1.4, is: 11}, 40 {at: 1.4, is: 11},
73 ]); 41 ]);
74 42
75 assertAttributeInterpolation({ 43 assertAttributeInterpolation({
76 property: 'pointsAtY', 44 property: 'dx',
77 underlying: '5', 45 underlying: '5',
78 from: '1', 46 from: '1',
79 fromComposite: 'replace', 47 fromComposite: 'replace',
80 to: '6', 48 to: '6',
81 toComposite: 'add', 49 toComposite: 'add',
82 }, [ 50 }, [
83 {at: -0.4, is: -3}, 51 {at: -0.4, is: -3},
84 {at: 0, is: 1}, 52 {at: 0, is: 1},
85 {at: 0.2, is: 3}, 53 {at: 0.2, is: 3},
86 {at: 0.6, is: 7}, 54 {at: 0.6, is: 7},
87 {at: 1, is: 11}, 55 {at: 1, is: 11},
88 {at: 1.4, is: 15}, 56 {at: 1.4, is: 15},
89 ]); 57 ]);
90
91 assertAttributeInterpolation({ 58 assertAttributeInterpolation({
92 property: 'pointsAtY', 59 property: 'dy',
93 underlying: '5',
94 from: neutralKeyframe,
95 to: '10',
96 toComposite: 'replace',
97 }, [
98 {at: -0.4, is: 3},
99 {at: 0, is: 5},
100 {at: 0.2, is: 6},
101 {at: 0.6, is: 8},
102 {at: 1, is: 10},
103 {at: 1.4, is: 12},
104 ]);
105
106 assertAttributeInterpolation({
107 property: 'pointsAtZ',
108 underlying: '3',
109 from: '1',
110 fromComposite: 'add',
111 to: '6',
112 toComposite: 'add',
113 }, [
114 {at: -0.4, is: 2},
115 {at: 0, is: 4},
116 {at: 0.2, is: 5},
117 {at: 0.6, is: 7},
118 {at: 1, is: 9},
119 {at: 1.4, is: 11},
120 ]);
121
122 assertAttributeInterpolation({
123 property: 'pointsAtZ',
124 underlying: '5', 60 underlying: '5',
125 from: '1', 61 from: '1',
126 fromComposite: 'replace', 62 fromComposite: 'replace',
127 to: '6', 63 to: '6',
128 toComposite: 'add', 64 toComposite: 'add',
129 }, [ 65 }, [
130 {at: -0.4, is: -3}, 66 {at: -0.4, is: -3},
131 {at: 0, is: 1}, 67 {at: 0, is: 1},
132 {at: 0.2, is: 3}, 68 {at: 0.2, is: 3},
133 {at: 0.6, is: 7}, 69 {at: 0.6, is: 7},
134 {at: 1, is: 11}, 70 {at: 1, is: 11},
135 {at: 1.4, is: 15}, 71 {at: 1.4, is: 15},
136 ]); 72 ]);
137 73
138 assertAttributeInterpolation({ 74 assertAttributeInterpolation({
139 property: 'pointsAtZ', 75 property: 'dx',
140 underlying: '5', 76 underlying: '5',
141 from: neutralKeyframe, 77 from: neutralKeyframe,
142 to: '10', 78 to: '10',
79 toComposite: 'replace',
80 }, [
81 {at: -0.4, is: 3},
82 {at: 0, is: 5},
83 {at: 0.2, is: 6},
84 {at: 0.6, is: 8},
85 {at: 1, is: 10},
86 {at: 1.4, is: 12},
87 ]);
88 assertAttributeInterpolation({
89 property: 'dy',
90 underlying: '5',
91 from: neutralKeyframe,
92 to: '10',
143 toComposite: 'replace', 93 toComposite: 'replace',
144 }, [ 94 }, [
145 {at: -0.4, is: 3}, 95 {at: -0.4, is: 3},
146 {at: 0, is: 5}, 96 {at: 0, is: 5},
147 {at: 0.2, is: 6}, 97 {at: 0.2, is: 6},
148 {at: 0.6, is: 8}, 98 {at: 0.6, is: 8},
149 {at: 1, is: 10}, 99 {at: 1, is: 10},
150 {at: 1.4, is: 12}, 100 {at: 1.4, is: 12},
151 ]); 101 ]);
152 </script> 102 </script>
153 </body> 103 </body>
154 </html> 104 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698