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

Unified Diff: LayoutTests/compositing/squashing/invisible-layers-should-not-affect-geometry.html

Issue 212923005: Do not squash invisible layers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Avoid mucking with canBeComposited Created 6 years, 9 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/squashing/invisible-layers-should-not-affect-geometry.html
diff --git a/LayoutTests/compositing/squashing/invisible-layers-should-not-affect-geometry.html b/LayoutTests/compositing/squashing/invisible-layers-should-not-affect-geometry.html
new file mode 100644
index 0000000000000000000000000000000000000000..cb5a72d321d6745243dc287decc9cff2a0af7aca
--- /dev/null
+++ b/LayoutTests/compositing/squashing/invisible-layers-should-not-affect-geometry.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ .box {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ height: 100px;
+ width: 100px;
+ background-color: green;
+ }
+ .invisible {
+ height: 400px;
+ width: 400px;
+ position: absolute;
+ visibility: hidden;
+ background-color: red;
+ }
+ .composited {
+ -webkit-transform: translateZ(0);
+ }
+ </style>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ internals.settings.setLayerSquashingEnabled(true);
+ }
+ function runTest() {
+ if (window.internals) {
+ var pre = document.createElement('pre');
+ pre.innerHTML = window.internals.layerTreeAsText(document);
+ document.body.appendChild(pre);
+ }
+ }
+ window.onload = runTest;
+ </script>
+</head>
+<body>
+ <!--
+ The invisible layer should have no effect on the geometry of the
+ composited layers. If you see a rect with dimensions 400x400, that means
+ that the invisible layer has been included and things are broken.
+ -->
+ <div class="composited box"></div>
+ <div class="box"></div>
+ <div class="invisible">
+ <div class="box"></div>
+ </div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698