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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/interpolation/scale-interpolation.html

Issue 2650163002: Animations: Smooth interpolation for scale none (Closed)
Patch Set: reviewFeedback Created 3 years, 10 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 <meta charset="UTF-8"> 2 <meta charset="UTF-8">
3 <style> 3 <style>
4 .parent { 4 .parent {
5 scale: 0.5 1 2 5 scale: 0.5 1 2
6 } 6 }
7 .target { 7 .target {
8 width: 10px; 8 width: 10px;
9 height: 10px; 9 height: 10px;
10 background-color: black; 10 background-color: black;
11 scale: 1.1; 11 scale: 1.1;
12 } 12 }
13 .expected { 13 .expected {
14 background-color: green; 14 background-color: green;
15 } 15 }
16 </style> 16 </style>
17 <template id="target-template"> 17 <template id="target-template">
18 <div class="parent"> 18 <div class="parent">
19 <div class="target"></div> 19 <div class="target"></div>
20 </div> 20 </div>
21 </template> 21 </template>
22 <script src="resources/interpolation-test.js"></script> 22 <script src="resources/interpolation-test.js"></script>
23 <script> 23 <script>
24 assertInterpolation({ 24 assertInterpolation({
25 property: 'scale', 25 property: 'scale',
26 from: 'none',
27 to: '1.5',
28 }, [
29 {at: -1, is: '0.5'},
30 {at: 0, is: 'none'},
31 {at: 0.25, is: '1.125'},
32 {at: 0.75, is: '1.375'},
33 {at: 1, is: '1.5'},
34 {at: 2, is: '2'},
35 ]);
36
37 assertInterpolation({
38 property: 'scale',
26 from: neutralKeyframe, 39 from: neutralKeyframe,
27 to: '1.5', 40 to: '1.5',
28 }, [ 41 }, [
29 {at: -1, is: '0.7'}, 42 {at: -1, is: '0.7'},
30 {at: 0, is: '1.1'}, 43 {at: 0, is: '1.1'},
31 {at: 0.25, is: '1.2'}, 44 {at: 0.25, is: '1.2'},
32 {at: 0.75, is: '1.4'}, 45 {at: 0.75, is: '1.4'},
33 {at: 1, is: '1.5'}, 46 {at: 1, is: '1.5'},
34 {at: 2, is: '1.9'}, 47 {at: 2, is: '1.9'},
35 ]); 48 ]);
36 49
37 assertInterpolation({ 50 assertInterpolation({
38 property: 'scale', 51 property: 'scale',
39 from: 'unset', 52 from: 'unset',
40 to: '1.5', 53 to: '1.5',
41 }, [ 54 }, [
42 {at: -1, is: '0.5'}, 55 {at: -1, is: '0.5'},
43 {at: 0, is: '1'}, 56 {at: 0, is: 'none'},
44 {at: 0.25, is: '1.125'}, 57 {at: 0.25, is: '1.125'},
45 {at: 0.75, is: '1.375'}, 58 {at: 0.75, is: '1.375'},
46 {at: 1, is: '1.5'}, 59 {at: 1, is: '1.5'},
47 {at: 2, is: '2'}, 60 {at: 2, is: '2'},
48 ]); 61 ]);
49 62
50 assertInterpolation({ 63 assertInterpolation({
51 property: 'scale', 64 property: 'scale',
52 from: '-10', 65 from: '-10',
53 to: '10', 66 to: '10',
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 {at: 1, is: '0.5 1 2'}, 150 {at: 1, is: '0.5 1 2'},
138 {at: 2, is: '-1 1.5 3'}, 151 {at: 2, is: '-1 1.5 3'},
139 ]); 152 ]);
140 153
141 assertInterpolation({ 154 assertInterpolation({
142 property: 'scale', 155 property: 'scale',
143 from: 'initial', 156 from: 'initial',
144 to: '2 0.5 1', 157 to: '2 0.5 1',
145 }, [ 158 }, [
146 {at: -1, is: '0 1.5'}, 159 {at: -1, is: '0 1.5'},
147 {at: 0, is: '1'}, 160 {at: 0, is: 'none'},
148 {at: 0.25, is: '1.25 0.875'}, 161 {at: 0.25, is: '1.25 0.875'},
149 {at: 0.75, is: '1.75 0.625'}, 162 {at: 0.75, is: '1.75 0.625'},
150 {at: 1, is: '2 0.5'}, 163 {at: 1, is: '2 0.5'},
151 {at: 2, is: '3 0'}, 164 {at: 2, is: '3 0'},
152 ]); 165 ]);
153 166
154 assertInterpolation({ 167 assertInterpolation({
155 property: 'scale', 168 property: 'scale',
156 from: '2 0.5 1', 169 from: '2 0.5 1',
157 to: 'initial', 170 to: 'initial',
158 }, [ 171 }, [
159 {at: -1, is: '3 0'}, 172 {at: -1, is: '3 0'},
160 {at: 0, is: '2 0.5 1'}, 173 {at: 0, is: '2 0.5 1'},
161 {at: 0.25, is: '1.75 0.6251'}, 174 {at: 0.25, is: '1.75 0.6251'},
162 {at: 0.75, is: '1.25 0.875'}, 175 {at: 0.75, is: '1.25 0.875'},
163 {at: 1, is: '1 1 1'}, 176 {at: 1, is: 'none'},
164 {at: 2, is: '0 1.5'}, 177 {at: 2, is: '0 1.5'},
165 ]); 178 ]);
166 179
167 assertInterpolation({ 180 assertInterpolation({
168 property: 'scale', 181 property: 'scale',
169 from: 'initial', 182 from: 'initial',
170 to: 'inherit', 183 to: 'inherit',
171 }, [ 184 }, [
172 {at: -1, is: '1.5 1 0'}, 185 {at: -1, is: '1.5 1 0'},
173 {at: 0, is: '1'}, 186 {at: 0, is: 'none'},
174 {at: 0.25, is: '0.875 1 1.25'}, 187 {at: 0.25, is: '0.875 1 1.25'},
175 {at: 0.75, is: '0.625 1 1.75'}, 188 {at: 0.75, is: '0.625 1 1.75'},
176 {at: 1, is: '0.5 1 2'}, 189 {at: 1, is: '0.5 1 2'},
177 {at: 2, is: '0 1 3'}, 190 {at: 2, is: '0 1 3'},
178 ]); 191 ]);
179 192
180 assertInterpolation({ 193 assertInterpolation({
181 property: 'scale', 194 property: 'scale',
182 from: 'inherit', 195 from: 'inherit',
183 to: 'initial', 196 to: 'initial',
184 }, [ 197 }, [
185 {at: -1, is: '0 1 3'}, 198 {at: -1, is: '0 1 3'},
186 {at: 0, is: '0.5 1 2'}, 199 {at: 0, is: '0.5 1 2'},
187 {at: 0.25, is: '0.625 1 1.75'}, 200 {at: 0.25, is: '0.625 1 1.75'},
188 {at: 0.75, is: '0.875 1 1.25'}, 201 {at: 0.75, is: '0.875 1 1.25'},
189 {at: 1, is: '1 1 1'}, 202 {at: 1, is: 'none'},
190 {at: 2, is: '1.5 1 0'}, 203 {at: 2, is: '1.5 1 0'},
191 ]); 204 ]);
192 </script> 205 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698