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

Side by Side Diff: LayoutTests/compositing/overflow/build-paint-order-list-where-opt-in-decisions-can-affect-each-other.html

Issue 14858004: Clean up the way layout tests force elements to opt in/out of composited scrolling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html><head> 3 <html><head>
4 <style> 4 <style>
5 .filler { 5 .filler {
6 background-color: #CC9900; 6 background-color: #CC9900;
7 border-style: solid; 7 border-style: solid;
8 border-width: 1px; 8 border-width: 1px;
9 width: 400px; 9 width: 400px;
10 height: 100px; 10 height: 100px;
(...skipping 17 matching lines...) Expand all
28 height: 200px; 28 height: 200px;
29 width: 300px; 29 width: 300px;
30 overflow-x: scroll; 30 overflow-x: scroll;
31 } 31 }
32 </style> 32 </style>
33 33
34 <script src="resources/build-paint-order-lists.js"></script> 34 <script src="resources/build-paint-order-lists.js"></script>
35 <script> 35 <script>
36 var debugMode = false; 36 var debugMode = false;
37 37
38 if (window.internals)
39 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnable dMode(
40 window.internals.settings.AcceleratedCompositingForOverflowScrollEnabl ed);
41
38 if (window.testRunner) 42 if (window.testRunner)
39 testRunner.dumpAsText(); 43 testRunner.dumpAsText();
40 44
41 function write(str) 45 function write(str)
42 { 46 {
43 var pre = document.getElementById('console'); 47 var pre = document.getElementById('console');
44 var text = document.createTextNode(str + '\n'); 48 var text = document.createTextNode(str + '\n');
45 pre.appendChild(text); 49 pre.appendChild(text);
46 } 50 }
47 51
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // first force the element not to promote, then compute its paint and 111 // first force the element not to promote, then compute its paint and
108 // stacking order lists. We then force the element to opt in, and 112 // stacking order lists. We then force the element to opt in, and
109 // generate the paint and stacking order lists after opt-in. 113 // generate the paint and stacking order lists after opt-in.
110 // 114 //
111 // The paint order lists should exactly match the stacking order lists 115 // The paint order lists should exactly match the stacking order lists
112 // (modulo children that fall outside of the hit-testing area 116 // (modulo children that fall outside of the hit-testing area
113 // on-screen), both before and after promotion. 117 // on-screen), both before and after promotion.
114 parentscrollinglayer.style.webkitTransform = 'translateZ(0px)'; 118 parentscrollinglayer.style.webkitTransform = 'translateZ(0px)';
115 document.body.offsetTop; 119 document.body.offsetTop;
116 120
117 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnab led(false); 121 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnab ledMode(
122 window.internals.settings.AcceleratedCompositingForOverflowScrollDis abled);
118 parentscrollinglayer.style.webkitTransform = ''; 123 parentscrollinglayer.style.webkitTransform = '';
119 124
120 var oldStackingOrder = getStackingOrder(); 125 var oldStackingOrder = getStackingOrder();
121 var oldPaintOrder = getPaintOrder(childscrollinglayer); 126 var oldPaintOrder = getPaintOrder(childscrollinglayer);
122 127
123 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnab led(true); 128 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnab ledMode(
129 window.internals.settings.AcceleratedCompositingForOverflowScrollAlw aysOn);
Julien - ping for review 2013/05/13 20:48:56 Same comment.
124 parentscrollinglayer.style.webkitTransform = 'translateZ(0px)'; 130 parentscrollinglayer.style.webkitTransform = 'translateZ(0px)';
125 131
126 var newStackingOrder = getStackingOrder(); 132 var newStackingOrder = getStackingOrder();
127 var newPaintOrder = getPaintOrder(childscrollinglayer); 133 var newPaintOrder = getPaintOrder(childscrollinglayer);
128 134
135 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnab ledMode(
136 window.internals.settings.AcceleratedCompositingForOverflowScrollEna bled);
137
129 // The getPaintOrder() function should return a pair of paint orders. 138 // The getPaintOrder() function should return a pair of paint orders.
130 // One before promotion and one after. This pair of lists should remain 139 // One before promotion and one after. This pair of lists should remain
131 // identical whether the element is actually currently promoted or not, 140 // identical whether the element is actually currently promoted or not,
132 // its purpose is to generate hypothetical pre- and post-lists to 141 // its purpose is to generate hypothetical pre- and post-lists to
133 // determine if the element is promotable. 142 // determine if the element is promotable.
134 if (!comparePaintOrderLists(oldPaintOrder, newPaintOrder)) { 143 if (!comparePaintOrderLists(oldPaintOrder, newPaintOrder)) {
135 failure = true; 144 failure = true;
136 write("FAIL - paint order lists not identical before/after promotion") ; 145 write("FAIL - paint order lists not identical before/after promotion") ;
137 } 146 }
138 147
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 <div class="filler"></div> 184 <div class="filler"></div>
176 <div class="filler"></div> 185 <div class="filler"></div>
177 </div> 186 </div>
178 <div id="fillerchild1" class="filler negativechild"></div> 187 <div id="fillerchild1" class="filler negativechild"></div>
179 <div id="fillerchild2" class="filler negativechild"></div> 188 <div id="fillerchild2" class="filler negativechild"></div>
180 <div id="fillerchild3" class="filler negativechild"></div> 189 <div id="fillerchild3" class="filler negativechild"></div>
181 <div id="fillerchild4" class="filler negativechild"></div> 190 <div id="fillerchild4" class="filler negativechild"></div>
182 <pre id="console"></pre> 191 <pre id="console"></pre>
183 </body> 192 </body>
184 </html> 193 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698