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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/zoom-responsive-transform-animation.html

Issue 2702483002: Paint some content for animated elements in composited animation tests. (Closed)
Patch Set: 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 <style> 2 <style>
3 #container { 3 #container {
4 position: absolute; 4 position: absolute;
5 top: 0; 5 top: 0;
6 font-size: 10px; 6 font-size: 10px;
7 } 7 }
8 .target { 8 .target {
9 width: 40px; 9 width: 40px;
10 height: 40px; 10 height: 40px;
(...skipping 20 matching lines...) Expand all
31 '0.707106781186547, 0.000000000000000, 0.707106781186548, -0.003535533905933 ,' + 31 '0.707106781186547, 0.000000000000000, 0.707106781186548, -0.003535533905933 ,' +
32 '0.000000000000000, 0.000000000000000, 0.000000000000000, 1.000000000000000) ', 32 '0.000000000000000, 0.000000000000000, 0.000000000000000, 1.000000000000000) ',
33 'perspective(200px) rotateY(45deg)', 33 'perspective(200px) rotateY(45deg)',
34 'none', 34 'none',
35 ].forEach(transform => { 35 ].forEach(transform => {
36 var text = document.createElement('div'); 36 var text = document.createElement('div');
37 text.textContent = transform; 37 text.textContent = transform;
38 container.appendChild(text); 38 container.appendChild(text);
39 39
40 var target = document.createElement('div'); 40 var target = document.createElement('div');
41 // The element must have some painted content in order to be composited.
42 target.textContent = 'x';
41 target.classList.add('target'); 43 target.classList.add('target');
42 container.appendChild(target); 44 container.appendChild(target);
43 target.animate([ 45 target.animate([
44 {transform: transform}, 46 {transform: transform},
45 {transform: transform}, 47 {transform: transform},
46 ], 1e8); 48 ], 1e8);
47 }); 49 });
48 50
49 if (window.testRunner) 51 if (window.testRunner)
50 testRunner.waitUntilDone(); 52 testRunner.waitUntilDone();
51 53
52 function waitForCompositor() { 54 function waitForCompositor() {
53 return footer.animate({opacity: ['1', '1']}, 1).ready; 55 return footer.animate({opacity: ['1', '1']}, 1).ready;
alancutter (OOO until 2018) 2017/02/16 01:12:30 Does the footer not need content as well? We use c
wkorman 2017/02/17 21:42:31 Ah, yes, but, weird. I think there's something els
alancutter (OOO until 2018) 2017/02/20 00:18:30 I suspect the test is just flaky on the side of pa
54 } 56 }
55 57
56 requestAnimationFrame(() => { 58 requestAnimationFrame(() => {
57 requestAnimationFrame(() => { 59 requestAnimationFrame(() => {
58 internals.setZoomFactor(2); 60 internals.setZoomFactor(2);
59 requestAnimationFrame(() => { 61 requestAnimationFrame(() => {
60 waitForCompositor().then(() => { 62 waitForCompositor().then(() => {
61 if (window.testRunner) 63 if (window.testRunner)
62 testRunner.notifyDone(); 64 testRunner.notifyDone();
63 }); 65 });
64 }); 66 });
65 }); 67 });
66 }); 68 });
67 </script> 69 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698