| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| .transformedParent { -webkit-transform: scale3d(1, 1, 1); } |
| |
| #red { position: absolute; top: 150px; left: 150px; width: 50px; height: 50px; background-color: red; } |
| #parent { -webkit-flow-into: flow; position: absolute; top: 100px; left: 100px; width: 150px; height: 150px; } |
| #fixed { position: fixed; top: 50px; left: 50px; width: 50px; height: 50px; background-color: green; } |
| /* The region is requires because otherwise the fixed positioned element is not displayed */ |
| #region { -webkit-flow-from: flow; position: absolute; top: 0px; left: 0px; } |
| </style> |
| <script> |
| if (window.internals) |
| window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(true); |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| window.addEventListener("load", function() { |
| document.getElementById("parent").className = "transformedParent"; |
| if (window.internals) |
| document.getElementById("layerTree").innerText = window.internals.layerTreeAsText(document); |
| }, false); |
| </script> |
| </head> |
| <body> |
| <p>Test that a fixed positioned element in a named flow whose parent is dynamically transformed is positioned relative to the parent instead of viewport.</p> |
| <p>The fixed positioned element should NOT be composited.</p> |
| <p>On success you should not see red below.</p> |
| <div id="red"></div> |
| <div id="parent"> |
| <div id="fixed"></div> |
| </div> |
| <div id="region"></div> |
| <pre id="layerTree"></pre> |
| </body> |
| </html> |