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

Unified Diff: LayoutTests/compositing/change-from-paints-into-ancestor-to-paints-into-own-backing-for-ancestor-reason.html

Issue 512293002: Fix paint invalidation when composited layers change from paints-into-ancestor to self-painting. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test. 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/compositing/change-from-paints-into-ancestor-to-paints-into-own-backing-for-ancestor-reason.html
diff --git a/LayoutTests/compositing/change-from-paints-into-ancestor-to-paints-into-own-backing-for-ancestor-reason.html b/LayoutTests/compositing/change-from-paints-into-ancestor-to-paints-into-own-backing-for-ancestor-reason.html
new file mode 100644
index 0000000000000000000000000000000000000000..a18a75f9f6536fd154c27cc44dcbfe4e78aebd20
--- /dev/null
+++ b/LayoutTests/compositing/change-from-paints-into-ancestor-to-paints-into-own-backing-for-ancestor-reason.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<div id="target" style="transform: translateZ(0); width: 100px; height: 100px; background-color: lightblue">
+ <div style="perspective: 20px; width: 100px; height: 100px; background-color: lightgray">
+ <div style="width: 50px; height: 50px; transform: translateZ(1px); background-color: yellow">
+ </div>
+ </div>
+</div>
+<script src="../fast/repaint/resources/text-based-repaint.js"></script>
+<script>
+// Tests that transitioning the container div from "composited but paints into ancestor" into "composited into own backing"
+// for ancestor reasons (in this case due to opacity change) correctly invalidates the old paint invalidation backing (document)
+// before the change. In this case, the reason it can no longer paint into its ancestor is because the ancestor has no visible content
+// (since the background color is removed).
+function repaintTest() {
+ target.style.backgroundColor = '';
+}
+runRepaintTest()
+</script>

Powered by Google App Engine
This is Rietveld 408576698