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

Unified Diff: LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer.html

Issue 23523046: Fixed-position repaint invalidations should be sent to the correct composited layer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed null pointer check 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
Index: LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer.html
diff --git a/LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer.html b/LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer.html
new file mode 100644
index 0000000000000000000000000000000000000000..b41f7c6208588f610161badbf5e1bbea1b98f017
--- /dev/null
+++ b/LayoutTests/compositing/repaint/fixed-pos-inside-composited-intermediate-layer.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+<style>
+
+.compositedBehind {
+ width: 500px;
+ height: 500px;
+ -webkit-transform: translatez(0);
+ background-color: cyan;
+}
+
+.containerOverlapsComposited {
+ position: absolute;
+ z-index: 2; /* Creates a stacking context so that the fixed-pos layer is contained instead of a sibling */
+ top: 20px;
+ left: 20px;
+ width: 100px;
+ height: 30000px;
+ background-color: green;
+}
+
+.fixed {
+ position: fixed;
+ top: 45px;
+ left: 45px;
+ background-color: lime;
+ width: 50px;
+ height: 50px;
+}
+
+</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 onload="test()">
+ <!--
+ Among other duplicate bugs: https://code.google.com/p/chromium/issues/detail?id=128375
+ A non-composited fixed-position element can get grouped into a composited container.
+ In this case, repaint invalidations were incorrectly going to the RenderView instead
+ of the composited container. The incorrect result was that the fixed-position element
+ never repainted, and it appeared to scroll along with the composited container.
+ -->
+ <div class="compositedBehind"> </div>
+
+ <div class="containerOverlapsComposited">
+ <div class="fixed"></div>
+ </div>
+
+ <pre id="layers"></pre>
+</body>
+
+</html>

Powered by Google App Engine
This is Rietveld 408576698