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

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: Update requestAnimation-translation-leave-traces-expected.txt 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 <style>
3 body {
4 margin: 0px;
5 }
6
7 #box {
8 background-color: purple;
9 height: 100px;
10 width: 100px;
11 }
12 </style>
13 <script>
14 if (window.testRunner) {
15 testRunner.dumpAsText();
16 testRunner.waitUntilDone();
17 }
18
19 window.onload = function() {
20 var i = 0;
21 var finalIteration = 6;
22 var startTrackingRectIteration = 3; // We need to put out a few frames befor e reproducing the bug.
23 var testedLocations = [];
24 function tick(t) {
25 var x = 300 * i;
26 if (i > startTrackingRectIteration) {
27 testedLocations.push(x);
28 if (window.internals)
29 internals.startTrackingRepaints(document);
30 }
31
32 box.style.transform = "translate(" + x + "px, 0px)";
33 if (++i < finalIteration) {
34 requestAnimationFrame(tick);
35 } else {
36 if (window.internals) {
37 var layerTree = internals.layerTreeAsText(document, internals.LA YER_TREE_INCLUDES_REPAINT_RECTS);
38 window.internals.stopTrackingRepaints(document);
39 document.getElementById("result").textContent = "Tested location s: " + testedLocations + '\n' + layerTree;
40 }
41 if (window.testRunner)
42 testRunner.notifyDone();
43 }
44 }
45
46 requestAnimationFrame(tick);
47 };
48 </script>
49 <div id="box"></div>
50 This test checks that changing the transform on an element triggers a correct in validation.<br>
51 The paint invalidations below should match the transformed element's coordinates .
52 <pre id="result"></pre>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/repaint/requestAnimation-translation-leave-traces-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698