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> |