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

Unified Diff: LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body.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.html
diff --git a/LayoutTests/compositing/layer-creation/fixed-position-no-content.html b/LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body.html
similarity index 55%
copy from LayoutTests/compositing/layer-creation/fixed-position-no-content.html
copy to LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body.html
index 122f90af3f13e8bf4975f350d80274dfd9d5a49a..a884dbcf463c3b85226d379234832d42199265b5 100644
--- a/LayoutTests/compositing/layer-creation/fixed-position-no-content.html
+++ b/LayoutTests/compositing/layer-creation/fixed-position-nonscrollable-body.html
@@ -5,17 +5,35 @@
<style>
.fixed {
position: fixed;
- width: 50px;
- height: 50px;
+ z-index: 1;
}
-
+
.absolute {
position: absolute;
- top: 40px;
- left: 40px;
- height: 100px;
+ }
+
+ .unscrollable {
+ overflow-x: hidden;
+ overflow-y: hidden;
+ }
+
+ .box {
+ top: 100px;
+ left: 10px;
width: 100px;
- background-color: gray;
+ height: 100px;
+ }
+
+ .red {
+ background-color: red;
+ }
+
+ .lime {
+ background-color: lime;
+ }
+
+ .composited {
+ -webkit-transform: translatez(0);
}
</style>
@@ -33,16 +51,15 @@
</script>
</head>
-<body>
- <div style="height: 1000px">
- <p>There should be no layers.</p>
+<body class="unscrollable">
+ <div style="height: 4000px">
+ <p>There should be no layers, because the body is unscrollable and there is
+ no need to composite the fixed-position layer.</p>
<pre id="layertree"></pre>
</div>
<!-- This should not be composited -->
- <div class="fixed" style="top: 10px; left: 10px"></div>
- <!-- And this should not be promoted into a layer -->
- <div class="absolute"></div>
+ <div class="fixed lime box"></div>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698