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

Side by Side Diff: LayoutTests/animations/interpolation/translate-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 translate: 100px 200px 300px;
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: 'translate',
25 from: '-100px',
26 to: '100px',
27 }, [
28 {at: -1, is: '-300px'},
29 {at: 0, is: '-100px'},
30 {at: 0.25, is: '-50px'},
31 {at: 0.75, is: '50px'},
32 {at: 1, is: '100px'},
33 {at: 2, is: '300px'},
34 ]);
35
36 assertInterpolation({
37 property: 'translate',
38 from: '-100%',
39 to: '100%',
40 }, [
41 {at: -1, is: '-300%'},
42 {at: 0, is: '-100%'},
43 {at: 0.25, is: '-50%'},
44 {at: 0.75, is: '50%'},
45 {at: 1, is: '100%'},
46 {at: 2, is: '300%'},
47 ]);
48
49 assertInterpolation({
50 property: 'translate',
51 from: '-100px -50px',
52 to: '100px 50px',
53 }, [
54 {at: -1, is: '-300px -150px'},
55 {at: 0, is: '-100px -50px'},
56 {at: 0.25, is: '-50px -25px'},
57 {at: 0.75, is: '50px 25px'},
58 {at: 1, is: '100px 50px'},
59 {at: 2, is: '300px 150px'},
60 ]);
61
62 assertInterpolation({
63 property: 'translate',
64 from: '-100px -50px 100px',
65 to: '100px 50px 0px',
66 }, [
67 {at: -1, is: '-300px -150px 200px'},
68 {at: 0, is: '-100px -50px 100px'},
69 {at: 0.25, is: '-50px -25px 75px'},
70 {at: 0.75, is: '50px 25px 25px'},
71 {at: 1, is: '100px 50px 0px'},
72 {at: 2, is: '300px 150px -100px'},
73 ]);
74
75 assertInterpolation({
76 property: 'translate',
77 from: 'inherit',
78 to: '200px 100px 200px',
79 }, [
80 {at: -1, is: '0px 300px 400px'},
81 {at: 0, is: '100px 200px 300px'},
82 {at: 0.25, is: '125px 175px 275px'},
83 {at: 0.75, is: '175px 125px 225px'},
84 {at: 1, is: '200px 100px 200px'},
85 {at: 2, is: '300px 0px 100px'},
86 ]);
87
88 assertInterpolation({
89 property: 'translate',
90 from: '200px 100px 200px',
91 to: 'inherit',
92 }, [
93 {at: -1, is: '300px 0px 100px'},
94 {at: 0, is: '200px 100px 200px'},
95 {at: 0.25, is: '175px 125px 225px'},
96 {at: 0.75, is: '125px 175px 275px'},
97 {at: 1, is: '100px 200px 300px'},
98 {at: 2, is: '0px 300px 400px'},
99 ]);
100
101 assertInterpolation({
102 property: 'translate',
103 from: 'initial',
104 to: '200px 100px 200px',
105 }, [
106 {at: -1, is: '-200px -100px -200px'},
107 {at: 0, is: '0px'},
108 {at: 0.25, is: '50px 25px 50px'},
109 {at: 0.75, is: '150px 75px 150px'},
110 {at: 1, is: '200px 100px 200px'},
111 {at: 2, is: '400px 200px 400px'},
112 ]);
113
114 assertInterpolation({
115 property: 'translate',
116 from: '200px 100px 200px',
117 to: 'initial',
118 }, [
119 {at: -1, is: '400px 200px 400px'},
120 {at: 0, is: '200px 100px 200px'},
121 {at: 0.25, is: '150px 75px 150px'},
122 {at: 0.75, is: '50px 25px 50px'},
123 {at: 1, is: '0px'},
124 {at: 2, is: '-200px -100px -200px'},
125 ]);
126
127 assertInterpolation({
128 property: 'translate',
129 from: 'initial',
130 to: 'inherit',
131 }, [
132 {at: -1, is: '-100px -200px -300px'},
133 {at: 0, is: '0px'},
134 {at: 0.25, is: '25px 50px 75px'},
135 {at: 0.75, is: '75px 150px 225px'},
136 {at: 1, is: '100px 200px 300px'},
137 {at: 2, is: '200px 400px 600px'},
138 ]);
139
140 assertInterpolation({
141 property: 'translate',
142 from: 'inherit',
143 to: 'initial',
144 }, [
145 {at: -1, is: '200px 400px 600px'},
146 {at: 0, is: '100px 200px 300px'},
147 {at: 0.25, is: '75px 150px 225px'},
148 {at: 0.75, is: '25px 50px 75px'},
149 {at: 1, is: '0px'},
150 {at: 2, is: '-100px -200px -300px'},
151 ]);
152 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698