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

Side by Side Diff: LayoutTests/compositing/overflow/out-of-flow-pos-descendants-should-affect-all-ancestors.html

Issue 14863002: Only update composited-scrolling state once after layout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer comments. Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!-- 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
2 <!DOCTYPE html>
3 <html>
4 <head>
5 <style>
6 div {
7 height: 500px;
8 width: 500px;
9 padding: 3px;
10 border-style: solid;
11 border-color: black;
12 border-width: 1px;
13 overflow: scroll;
14 }
15
16 .filler {
17 position: relative;
18 top: 1000px;
19 }
20
21 button {
22 display: none;
23 }
24 </style>
25 <script>
26 if (window.internals)
27 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnab led(true);
28
29 if (window.testRunner)
30 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.
31
32 function doTest()
33 {
34 if (!window.internals) {
35 document.getElementById('toggle1').style.display = 'block';
36 document.getElementById('toggle2').style.display = 'block';
37 document.body.offsetTop;
38 return;
39 }
40
41 var result = window.internals.layerTreeAsText(document);
42 var oofp1 = document.getElementById('oofp1');
43 var oofp2 = document.getElementById('oofp2');
44
45 oofp1.style.position = 'fixed';
46 document.body.offsetTop;
47 result += window.internals.layerTreeAsText(document);
48
49 oofp2.style.position = 'fixed';
50 document.body.offsetTop;
51 result += window.internals.layerTreeAsText(document);
52
53 oofp1.style.position = 'absolute';
54 document.body.offsetTop;
55 result += window.internals.layerTreeAsText(document);
56
57 oofp2.style.position = 'absolute';
58 document.body.offsetTop;
59 result += window.internals.layerTreeAsText(document);
60
61 document.getElementById('console').innerHTML = result;
62 }
63
64 window.addEventListener('load', doTest, false);
65 </script>
66 </head>
67 <body>
68 <div>
69 <div style="width: 450px; height: 450px">
70 <div style="width: 400px; height: 400px">
71 <div style="width: 350px; height: 350px">
72 <div style="position: relative; width: 300px; height: 150px">
73 <div id="oofp1" style="position: absolute; background-color: red; height: 50px; width: 50px; left: 50px; overflow: hidden">
74 </div>
75 <div class="filler"></div>
76 </div>
77 <div style="position: relative; width: 300px; height: 150px">
78 <div style="width: 250px; height: 100px">
79 <div id="oofp2" style="position: absolute; background-color: red ; height: 50px; width: 50px; left: 50px; overflow: hidden"></div>
80 <div class="filler"></div>
81 </div>
82 <div class="filler"></div>
83 </div>
84 <div class="filler"></div>
85 </div>
86 <div class="filler"></div>
87 </div>
88 <div class="filler"></div>
89 </div>
90 <div class="filler"></div>
91 </div>
92 <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
93
94 <button id='toggle1' onClick="document.getElementById('oofp1').style.positio n = document.getElementById('oofp1').style.position === 'fixed' ? 'absolute' : ' fixed'">toggle 1</button>
95 <button id='toggle2' onClick="document.getElementById('oofp2').style.positio n = document.getElementById('oofp2').style.position === 'fixed' ? 'absolute' : ' fixed'">toggle 2</button>
96 </body>
97 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698