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

Side by Side Diff: LayoutTests/animations/interpolation/rotate-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 rotate: 90deg;
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: 'rotate',
25 from: '100deg',
26 to: '-100deg',
27 }, [
28 {at: -1, is: '300deg'},
29 {at: 0, is: '100deg'},
30 {at: 0.25, is: '50deg'},
31 {at: 0.75, is: '-50deg'},
32 {at: 1, is: '-100deg'},
33 {at: 2, is: '-300deg'},
34 ]);
35
36 assertInterpolation({
37 property: 'rotate',
38 from: '100deg',
39 to: '-100deg',
40 }, [
41 {at: -1, is: '300deg'},
42 {at: 0, is: '100deg'},
43 {at: 0.25, is: '50deg'},
44 {at: 0.75, is: '-50deg'},
45 {at: 1, is: '-100deg'},
46 {at: 2, is: '-300deg'},
47 ]);
48
49 assertInterpolation({
50 property: 'rotate',
51 from: '100deg 0 1 0',
52 to: '-100deg 0 1 0',
53 }, [
54 {at: -1, is: '300deg 0 1 0'},
55 {at: 0, is: '100deg 0 1 0'},
56 {at: 0.25, is: '50deg 0 1 0'},
57 {at: 0.75, is: '-50deg 0 1 0'},
58 {at: 1, is: '-100deg 0 1 0'},
59 {at: 2, is: '-300deg 0 1 0'},
60 ]);
61
62 assertInterpolation({
63 property: 'rotate',
64 from: '100deg 1 -2.5 3.64',
65 to: '-100deg 1 -2.5 3.64',
66 }, [
67 {at: -1, is: '300deg 1 -2.5 3.64'},
68 {at: 0, is: '100deg 1 -2.5 3.64'},
69 {at: 0.25, is: '50deg 1 -2.5 3.64'},
70 {at: 0.75, is: '-50deg 1 -2.5 3.64'},
71 {at: 1, is: '-100deg 1 -2.5 3.64'},
72 {at: 2, is: '-300deg 1 -2.5 3.64'},
73 ]);
74
75 assertInterpolation({
76 property: 'rotate',
77 from: '0deg 1 0 0',
78 to: '10deg 0 1 0',
79 }, [
80 {at: -1, is: '-10deg 1 0 0'},
81 {at: 0, is: '0deg 1 0 0'},
82 {at: 0.25, is: '2.5deg 1 0 0'},
83 {at: 0.75, is: '7.5deg 1 0 0'},
84 {at: 1, is: '10deg 0 1 0'},
85 {at: 2, is: '20deg 1 0 0'},
86 ]);
87
88 assertInterpolation({
89 property: 'rotate',
90 from: '90deg 1 1 0',
91 to: '180deg 0 1 1',
92 }, [
93 {at: -1, is: '120deg 0.41 -0.41 -0.82'},
94 {at: 0, is: '90deg 1 1 0'},
95 {at: 0.25, is: '82.76deg 0.8 0.27 -0.53'},
96 {at: 0.75, is: '138.89deg 0.27 -0.54 -0.8'},
97 {at: 1, is: '180deg 0 1 1'},
98 {at: 2, is: '90deg 0.71 0 -0.71'},
99 ]);
100
101 assertInterpolation({
102 property: 'rotate',
103 from: 'inherit',
104 to: '0deg'
alancutter (OOO until 2018) 2015/06/24 01:17:09 Trailing comma for consistency.
soonm 2015/06/24 02:53:19 Done - added comma
105 }, [
106 {at: -1, is: '180deg'},
107 {at: 0, is: '90deg'},
108 {at: 0.25, is: '67.5deg'},
109 {at: 0.75, is: '22.5deg'},
110 {at: 1, is: '0deg'},
111 {at: 2, is: '-90deg'},
112 ]);
113
114 assertInterpolation({
115 property: 'rotate',
116 from: '0deg',
117 to: 'inherit',
118 }, [
119 {at: -1, is: '-90deg'},
120 {at: 0, is: '0deg'},
121 {at: 0.25, is: '22.5deg'},
122 {at: 0.75, is: '67.5deg'},
123 {at: 1, is: '90deg'},
124 {at: 2, is: '180deg'},
125 ]);
126
127 assertInterpolation({
128 property: 'rotate',
129 from: 'initial',
130 to: '90deg',
131 }, [
132 {at: -1, is: '-90deg'},
133 {at: 0, is: '0deg'},
134 {at: 0.25, is: '22.5deg'},
135 {at: 0.75, is: '67.5deg'},
136 {at: 1, is: '90deg'},
137 {at: 2, is: '180deg'},
138 ]);
139
140 assertInterpolation({
141 property: 'rotate',
142 from: '90deg',
143 to: 'initial',
144 }, [
145 {at: -1, is: '180deg'},
146 {at: 0, is: '90deg'},
147 {at: 0.25, is: '67.5deg'},
148 {at: 0.75, is: '22.5deg'},
149 {at: 1, is: '0deg'},
150 {at: 2, is: '-90deg'},
151 ]);
152
153 assertInterpolation({
154 property: 'rotate',
155 from: 'initial',
156 to: 'inherit',
157 }, [
158 {at: -1, is: '-90deg'},
159 {at: 0, is: '0deg'},
160 {at: 0.25, is: '22.5deg'},
161 {at: 0.75, is: '67.5deg'},
162 {at: 1, is: '90deg'},
163 {at: 2, is: '180deg'},
164 ]);
165
166 assertInterpolation({
167 property: 'rotate',
168 from: 'inherit',
169 to: 'initial',
170 }, [
171 {at: -1, is: '180deg'},
172 {at: 0, is: '90deg'},
173 {at: 0.25, is: '67.5deg'},
174 {at: 0.75, is: '22.5deg'},
175 {at: 1, is: '0deg'},
176 {at: 2, is: '-90deg'},
177 ]);
178
179 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698