Chromium Code Reviews| Index: LayoutTests/compositing/overflow/out-of-flow-pos-descendants-should-affect-all-ancestors.html |
| diff --git a/LayoutTests/compositing/overflow/out-of-flow-pos-descendants-should-affect-all-ancestors.html b/LayoutTests/compositing/overflow/out-of-flow-pos-descendants-should-affect-all-ancestors.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fae30309782f9beb162cc7743f25b50b23e6256f |
| --- /dev/null |
| +++ b/LayoutTests/compositing/overflow/out-of-flow-pos-descendants-should-affect-all-ancestors.html |
| @@ -0,0 +1,97 @@ |
| +<!-- PATCH 2 --> |
|
Julien - ping for review
2013/05/06 22:38:26
???
Ian Vollick
2013/05/08 16:00:07
Whoops! This was leftover from when I was planning
|
| +<!DOCTYPE html> |
| +<html> |
| + <head> |
| + <style> |
| + div { |
| + height: 500px; |
| + width: 500px; |
| + padding: 3px; |
| + border-style: solid; |
| + border-color: black; |
| + border-width: 1px; |
| + overflow: scroll; |
| + } |
| + |
| + .filler { |
| + position: relative; |
| + top: 1000px; |
| + } |
| + |
| + button { |
| + display: none; |
| + } |
| + </style> |
| + <script> |
| + if (window.internals) |
| + window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true); |
| + |
| + if (window.testRunner) |
| + window.testRunner.dumpAsText(); |
|
Julien - ping for review
2013/05/06 22:38:26
The indentiation is fairly inconsistent (sometimes
Ian Vollick
2013/05/08 16:00:07
I've switched this test to Blink style.
|
| + |
| + function doTest() |
| + { |
| + if (!window.internals) { |
| + document.getElementById('toggle1').style.display = 'block'; |
| + document.getElementById('toggle2').style.display = 'block'; |
| + document.body.offsetTop; |
| + return; |
| + } |
| + |
| + var result = window.internals.layerTreeAsText(document); |
| + var oofp1 = document.getElementById('oofp1'); |
| + var oofp2 = document.getElementById('oofp2'); |
| + |
| + oofp1.style.position = 'fixed'; |
| + document.body.offsetTop; |
| + result += window.internals.layerTreeAsText(document); |
| + |
| + oofp2.style.position = 'fixed'; |
| + document.body.offsetTop; |
| + result += window.internals.layerTreeAsText(document); |
| + |
| + oofp1.style.position = 'absolute'; |
| + document.body.offsetTop; |
| + result += window.internals.layerTreeAsText(document); |
| + |
| + oofp2.style.position = 'absolute'; |
| + document.body.offsetTop; |
| + result += window.internals.layerTreeAsText(document); |
| + |
| + document.getElementById('console').innerHTML = result; |
| + } |
| + |
| + window.addEventListener('load', doTest, false); |
| + </script> |
| + </head> |
| + <body> |
| + <div> |
| + <div style="width: 450px; height: 450px"> |
| + <div style="width: 400px; height: 400px"> |
| + <div style="width: 350px; height: 350px"> |
| + <div style="position: relative; width: 300px; height: 150px"> |
| + <div id="oofp1" style="position: absolute; background-color: red; height: 50px; width: 50px; left: 50px; overflow: hidden"> |
| + </div> |
| + <div class="filler"></div> |
| + </div> |
| + <div style="position: relative; width: 300px; height: 150px"> |
| + <div style="width: 250px; height: 100px"> |
| + <div id="oofp2" style="position: absolute; background-color: red; height: 50px; width: 50px; left: 50px; overflow: hidden"></div> |
| + <div class="filler"></div> |
| + </div> |
| + <div class="filler"></div> |
| + </div> |
| + <div class="filler"></div> |
| + </div> |
| + <div class="filler"></div> |
| + </div> |
| + <div class="filler"></div> |
| + </div> |
| + <div class="filler"></div> |
| + </div> |
| + <pre id='console'>This test requires window.internals</pre> |
|
Julien - ping for review
2013/05/06 22:38:26
We really should have a description of this test.
Ian Vollick
2013/05/08 16:00:07
I've added a description in a comment above. Shoul
|
| + |
| + <button id='toggle1' onClick="document.getElementById('oofp1').style.position = document.getElementById('oofp1').style.position === 'fixed' ? 'absolute' : 'fixed'">toggle 1</button> |
| + <button id='toggle2' onClick="document.getElementById('oofp2').style.position = document.getElementById('oofp2').style.position === 'fixed' ? 'absolute' : 'fixed'">toggle 2</button> |
| + </body> |
| +</html> |