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

Unified Diff: LayoutTests/compositing/repaint/fixed-pos-with-composited-child.html

Issue 25110005: Composited fixed-pos element should still cause repaints if it paintsIntoCompositedAncestor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/repaint/fixed-pos-with-composited-child-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/compositing/repaint/fixed-pos-with-composited-child.html
diff --git a/LayoutTests/compositing/repaint/fixed-pos-with-composited-child.html b/LayoutTests/compositing/repaint/fixed-pos-with-composited-child.html
new file mode 100644
index 0000000000000000000000000000000000000000..89eccbcab806b75c9e4616b67584e930174f1942
--- /dev/null
+++ b/LayoutTests/compositing/repaint/fixed-pos-with-composited-child.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+<style>
+
+.fixedContainer {
+ position: fixed;
+ overflow:hidden;
+ background-color: #a0a0a0;
+ bottom: 0px;
+ left: 0px;
+ width:400px;
+ height: 100px;
+}
+
+#foo {
+ width:200px;
+ height: 100px;
+ background-color: #00a0a0;
+ -webkit-transform:translateZ(0);
+}
+</style>
+
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ if (window.internals) {
+ /* Note carefully, compositing for fixed position is _disabled_ here */
+ internals.settings.setAcceleratedCompositingForFixedPositionEnabled(false);
+ internals.settings.setFixedPositionCreatesStackingContext(true);
+ }
+
+ function test()
+ {
+ document.body.offsetHeight;
+ if (window.internals)
+ window.internals.startTrackingRepaints(document);
+
+ window.scrollTo(0, 100);
+
+ if (window.internals)
+ document.getElementById('layers').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
+ }
+</script>
+</head>
+
+<body style="height:4000px;" onload="test()">
+ <!--
+ Among other duplicate bugs: https://code.google.com/p/chromium/issues/detail?id=151734
+
+ In the current code, a layer may actually be composited, but not have its own backing.
+ In these cases, the layer paints into its composited ancestor with a backing.
+ For fixed-position elements, however, this goes wrong because no other code
+ realizes that there is a software-painted fixed-position element. As a result,
+ the composited parent does not receive repaint invalidations, and the fixed-position
+ element incorrectly appears to be fixed to the composited element rather than the viewport.
+
+ The scenario that reproduces this: A fixed position element that has an overflow-clip with
+ a composited child. In this case, the fixed-position element needs to be composited.
+ However, this is one of the few reasons that does not require that the composited layer needs
+ its own backing.
+ -->
+
+ <!-- Scrolling should not cause either div to move around on the viewport. -->
+ <div class="fixedContainer">
+ <div id="foo"></div>
+ </div>
+
+ <pre id="layers"></pre>
+</body>
+
+</html>
« no previous file with comments | « no previous file | LayoutTests/compositing/repaint/fixed-pos-with-composited-child-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698