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

Unified Diff: LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers.html

Issue 13828004: Avoid compositing fixed-position elements if they cannot scroll (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased and addressed feedback Created 7 years, 8 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/layer-creation/fixed-position-nonscrollable-body-mismatch-containers.html
diff --git a/LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers.html b/LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers.html
new file mode 100644
index 0000000000000000000000000000000000000000..9a64e7f8e079ff5eac5b1efd5f897c0f13a35533
--- /dev/null
+++ b/LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body-mismatch-containers.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .fixed {
+ position: fixed;
+ z-index: 1;
+ }
+
+ .absolute {
+ position: absolute;
+ }
+
+ .unscrollable {
+ overflow-x: hidden;
+ overflow-y: hidden;
+ }
+
+ .box {
+ top: 100px;
+ left: 10px;
+ width: 100px;
+ height: 100px;
+ }
+
+ .bigBox {
+ width: 300px;
+ height: 300px;
+ }
+
+ .red {
+ background-color: red;
+ }
+
+ .lime {
+ background-color: lime;
+ }
+
+ .composited {
+ -webkit-transform: translatez(0);
+ }
+
+ .scrollable {
+ border: solid black 1px;
+ overflow: scroll;
+ }
+ </style>
+
+ <script type="text/javascript">
+ if (window.internals)
+ window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(true);
+
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+
+ window.addEventListener("load", function() {
+ document.getElementById("layertree").innerText = window.internals.layerTreeAsText(document);
+ }, false);
+ }
+ </script>
+</head>
+
+<body class="unscrollable">
+ <p>Even though the fixed-position element's container is nonscrollable, it
+ should still be composited because one of its ancestors is scrolling.</p>
+ <pre id="layertree"></pre>
+
+ <div class="scrollable bigBox">
+ <div style="height: 800px;"></div>
+ <div class="fixed lime box"></div>
+ </div>
+</body>
+</html>
+

Powered by Google App Engine
This is Rietveld 408576698