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

Side by Side Diff: LayoutTests/animations/insert-composited-animation.html

Issue 1196163003: Fix animations not starting on detached elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 div { 3 div {
4 position: absolute; 4 position: absolute;
5 width: 100px; 5 width: 100px;
6 height: 100px; 6 height: 100px;
7 } 7 }
8 8
9 #expectation { 9 #expectation {
10 font-size: 50px;
11 background: red; 10 background: red;
12 transform: translate(1em, 1em); 11 transform: translate(50px, 50px);
13 }
14
15 #target {
16 font-size: 1px;
17 background: green;
18 } 12 }
19 </style> 13 </style>
20 <div id="expectation"></div> 14 <div id="expectation"></div>
21 <div id="target"></div>
22 <script> 15 <script>
23 target.style.fontSize = "50px"; 16 var target = document.createElement('div');
17 target.style.background = 'green';
24 target.animate([ 18 target.animate([
25 {transform: "translate(1em, 1em)"}, 19 {transform: "translate(50px, 50px)"},
26 {transform: "translate(1em, 1em)"}, 20 {transform: "translate(50px, 50px)"},
27 ], { 21 ], {
28 duration: 1000, 22 duration: 1000,
29 iterations: Infinity, 23 iterations: Infinity,
30 }); 24 });
25 document.body.appendChild(target);
31 </script> 26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698