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

Unified Diff: LayoutTests/compositing/squashing/repaint-squashed-layer-in-rect.html

Issue 328533003: Fix RenderObject::repaintRectangle in situations when the render object is not a layer and is squas… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added test result. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/compositing/squashing/repaint-squashed-layer-in-rect-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/compositing/squashing/repaint-squashed-layer-in-rect.html
diff --git a/LayoutTests/compositing/squashing/repaint-squashed-layer-in-rect.html b/LayoutTests/compositing/squashing/repaint-squashed-layer-in-rect.html
new file mode 100644
index 0000000000000000000000000000000000000000..2ddcc06bf681d1b6458194b1f58f43d2b5d3a8b4
--- /dev/null
+++ b/LayoutTests/compositing/squashing/repaint-squashed-layer-in-rect.html
@@ -0,0 +1,44 @@
+<!doctype html>
+<div style="height: 800px; width: 800px; background-color: lightgray; -webkit-transform:translateZ(0)">
+</div>
+<div style="position:absolute; top: 0px; height: 200px; width: 200px">
+</div>
+<div style="position:absolute; top: 400px; left: 400px; height: 200px; width: 200px; background-color: lightblue">
+ <div id="imgElement" style="height: 200px; width: 200px; background-color: lightblue">
+ <div>
+</div>
+<pre id="output" style="display:none">
+<pre>
+<script src="../../resources/run-after-display.js"></script>
+<script>
+// Test that a repaint for the rect containing the changed background image is issued in the coordinate space of the
+// squashing layer, *not* local to the div with the background image on it.
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+if (window.internals)
+ internals.settings.setLayerSquashingEnabled(true);
+
+var imgElement = document.querySelector("#imgElement");
+var output = document.querySelector("#output");
+
+runAfterDisplay(function() {
+ if (window.internals)
+ window.internals.startTrackingRepaints(document);
+
+ imgElement.style.backgroundImage = "url('data:image/gif;base64,R0lGODdhAgACAIABAAAAAP///ywAAAAAAgACAAACA0QCBQA7')";
+
+ if (window.internals) {
+ output.textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
+ window.internals.stopTrackingRepaints(document);
+ }
+
+ output.style.display = 'block';
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+});
+</script>
« no previous file with comments | « no previous file | LayoutTests/compositing/squashing/repaint-squashed-layer-in-rect-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698