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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/repaint/requestAnimation-translation-leave-traces.html
diff --git a/LayoutTests/fast/repaint/requestAnimation-translation-leave-traces.html b/LayoutTests/fast/repaint/requestAnimation-translation-leave-traces.html
new file mode 100644
index 0000000000000000000000000000000000000000..5436e7a4d28a338b5ff573220188e9ded74fb284
--- /dev/null
+++ b/LayoutTests/fast/repaint/requestAnimation-translation-leave-traces.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<style>
+body {
+ margin: 0px;
+}
+
+#box {
+ background-color: purple;
+ height: 100px;
+ width: 100px;
+}
+</style>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+window.onload = function() {
+ var i = 0;
+ var finalIteration = 6;
+ var startTrackingRectIteration = 3; // We need to put out a few frames before reproducing the bug.
+ var testedLocations = [];
+ function tick(t) {
+ var x = 300 * i;
+ if (i > startTrackingRectIteration) {
+ testedLocations.push(x);
+ if (window.internals)
+ internals.startTrackingRepaints(document);
+ }
+
+ box.style.transform = "translate(" + x + "px, 0px)";
+ if (++i < finalIteration) {
+ requestAnimationFrame(tick);
+ } else {
+ if (window.internals) {
+ var layerTree = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
+ window.internals.stopTrackingRepaints(document);
+ document.getElementById("result").textContent = "Tested locations: " + testedLocations + '\n' + layerTree;
+ }
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ }
+
+ requestAnimationFrame(tick);
+};
+</script>
+<div id="box"></div>
+This test checks that changing the transform on an element triggers a correct invalidation.<br>
+The paint invalidations below should match the transformed element's coordinates.
+<pre id="result"></pre>
« 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