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

Side by Side Diff: LayoutTests/fast/repaint/requestAnimation-translation-leave-traces.html

Issue 448793002: Unified invalidation for repaint-only style change of layers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test expectations Created 6 years, 4 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
(Empty)
1 <!DOCTYPE html>
2 <html>
dsinclair 2014/08/07 18:14:13 nit: Don't need html, head and body
Xianzhu 2014/08/07 18:32:40 Done.
3 <head>
4 <style>
5 body {
6 margin: 0px;
7 }
8
9 #box {
10 background-color: purple;
11 height: 100px;
12 width: 100px;
13 }
14 </style>
15 <script src="resources/text-based-repaint.js" type="text/javascript"></script>
16 <script>
17 if (window.testRunner) {
18 testRunner.dumpAsText();
19 testRunner.waitUntilDone();
20 }
21
22 window.onload=function(){
23 var i = 0;
dsinclair 2014/08/07 18:14:13 nit: indenting?
Xianzhu 2014/08/07 18:32:40 Done.
24 var finalIteration = 6;
25 var startTrackingRectIteration = 3; // We need to put out a few frames before re producing the bug.
26 function tick(t) {
27 if ((i > startTrackingRectIteration) && window.internals)
28 internals.startTrackingRepaints(document);
29
30 var x = 300 * i;
31 box.style.transform = "translate(" + x + "px, 0px)";
32 if (++i < finalIteration) {
33 requestAnimationFrame(tick);
34 } else {
35 if (window.internals) {
36 var layerTree = internals.layerTreeAsText(document, internals.LAYER_ TREE_INCLUDES_REPAINT_RECTS);
37 window.internals.stopTrackingRepaints(document);
38 document.getElementById("result").innerHTML = layerTree;
39 }
40 if (window.testRunner)
41 testRunner.notifyDone();
42 }
43
44
45 };
46
47 requestAnimationFrame(tick);
48 }
49 </script>
50 </head>
51 <body>
52 <div id="box"></div>
53 This test checks that changing the transform on an element triggers a correc t invalidation.<br>
54 The paint invalidations below should match the transformed element's coordin ates.
dsinclair 2014/08/07 18:14:12 Should we spit out the transform coordinates (if p
Xianzhu 2014/08/07 18:32:40 Done.
55 <pre id="result"></pre>
56 </body>
57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698