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

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

Issue 1196913005: Implement animations for Independent CSS Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove Compositor Animations and add tests for inherit and initial Created 5 years, 6 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
(Empty)
1 <!DOCTYPE html>
2 <meta charset="UTF-8">
3 <style>
4 .parent {
5 scale: 0.5 1 2
6 }
7 .target {
8 width: 100px;
9 height: 100px;
10 background-color: black;
11 }
12 .expected {
13 background-color: green;
14 }
15 </style>
16 <template id="target-template">
17 <div class="parent">
18 <div class="target"></div>
19 </div>
20 </template>
21 <script src="resources/interpolation-test.js"></script>
22 <script>
23 assertInterpolation({
24 property: 'scale',
25 from: '-10',
26 to: '10',
27 }, [
28 {at: -1, is: '-30'},
29 {at: 0, is: '-10'},
30 {at: 0.25, is: '-5'},
31 {at: 0.75, is: '5'},
32 {at: 1, is: '10'},
33 {at: 2, is: '30'},
34 ]);
35
36 assertInterpolation({
37 property: 'scale',
38 from: '-10 5',
39 to: '10 -5',
40 }, [
41 {at: -1, is: '-30 15'},
42 {at: 0, is: '-10 5'},
43 {at: 0.25, is: '-5 2.5'},
44 {at: 0.75, is: '5 -2.5'},
45 {at: 1, is: '10 -5'},
46 {at: 2, is: '30 -15'},
47 ]);
48
49 assertInterpolation({
50 property: 'scale',
51 from: '-10 5 1',
52 to: '10 -5 0',
53 }, [
54 {at: -1, is: '-30 15 2'},
55 {at: 0, is: '-10 5 1'},
56 {at: 0.25, is: '-5 2.5 0.75'},
57 {at: 0.75, is: '5 -2.5 0.25'},
58 {at: 1, is: '10 -5 0'},
59 {at: 2, is: '30 -15 -1'},
60 ]);
61
62 assertInterpolation({
63 property: 'scale',
64 from: 'inherit',
65 to: '2 0.5 1',
66 }, [
67 {at: -1, is: '-1 1.5 3'},
68 {at: 0, is: '0.5 1 2'},
69 {at: 0.25, is: '0.875 0.875 1.75'},
70 {at: 0.75, is: '1.625 0.625 1.25'},
71 {at: 1, is: '2 0.5 1'},
72 {at: 2, is: '3.5 0 0'},
73 ]);
74
75 assertInterpolation({
76 property: 'scale',
77 from: '2 0.5 1',
78 to: 'inherit',
79 }, [
80 {at: -1, is: '3.5 0 0'},
81 {at: 0, is: '2 0.5 1'},
82 {at: 0.25, is: '1.625 0.625 1.25'},
83 {at: 0.75, is: '0.875 0.875 1.75'},
84 {at: 1, is: '0.5 1 2'},
85 {at: 2, is: '-1 1.5 3'},
86 ]);
87
88 assertInterpolation({
89 property: 'scale',
90 from: 'initial',
91 to: '2 0.5 1',
92 }, [
93 {at: -1, is: '0 1.5'},
94 {at: 0, is: '1'},
95 {at: 0.25, is: '1.25 0.875'},
96 {at: 0.75, is: '1.75 0.625'},
97 {at: 1, is: '2 0.5'},
98 {at: 2, is: '3 0'},
99 ]);
100
101 assertInterpolation({
102 property: 'scale',
103 from: '2 0.5 1',
104 to: 'initial',
105 }, [
106 {at: -1, is: '3 0'},
107 {at: 0, is: '2 0.5 1'},
108 {at: 0.25, is: '1.75 0.6251'},
109 {at: 0.75, is: '1.25 0.875'},
110 {at: 1, is: '1 1 1'},
111 {at: 2, is: '0 1.5'},
112 ]);
113
114 assertInterpolation({
115 property: 'scale',
116 from: 'initial',
117 to: 'inherit',
118 }, [
119 {at: -1, is: '1.5 1 0'},
120 {at: 0, is: '1'},
121 {at: 0.25, is: '0.875 1 1.25'},
122 {at: 0.75, is: '0.625 1 1.75'},
123 {at: 1, is: '0.5 1 2'},
124 {at: 2, is: '0 1 3'},
125 ]);
126
127 assertInterpolation({
128 property: 'scale',
129 from: 'inherit',
130 to: 'initial',
131 }, [
132 {at: -1, is: '0 1 3'},
133 {at: 0, is: '0.5 1 2'},
134 {at: 0.25, is: '0.625 1 1.75'},
135 {at: 0.75, is: '0.875 1 1.25'},
136 {at: 1, is: '1 1 1'},
137 {at: 2, is: '1.5 1 0'},
138 ]);
139 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698