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

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/overflow/opt-in-if-composited.html

Issue 2397333002: Change layerTreeAsText to default to layer lists. (Closed)
Patch Set: none Created 4 years, 2 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
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <script src="resources/composited-scroll.js"></script> 2 <script src="resources/composited-scroll.js"></script>
3 <script> 3 <script>
4 if (window.internals) 4 if (window.internals)
5 window.internals.settings.setPreferCompositingToLCDTextEnabled(false); 5 window.internals.settings.setPreferCompositingToLCDTextEnabled(false);
6 6
7 if (window.testRunner) { 7 if (window.testRunner) {
8 window.testRunner.dumpAsText(); 8 window.testRunner.dumpAsText();
9 window.testRunner.waitUntilDone(); 9 window.testRunner.waitUntilDone();
10 } 10 }
11 11
12 var result = ""; 12 var result = "";
13 onload = function() { 13 onload = function() {
14 14
15 if (window.internals) { 15 if (window.internals) {
16 result += "Should not be using composited scrolling: "; 16 result += "Should not be using composited scrolling: ";
17 if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsT ext(document, window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST)))) 17 if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsT ext(document))))
18 result += "Pass.\n"; 18 result += "Pass.\n";
19 else 19 else
20 result += "Fail.\n" 20 result += "Fail.\n"
21 } 21 }
22 22
23 document.getElementById("scroller").style.webkitTransform = "translateZ(0)"; 23 document.getElementById("scroller").style.webkitTransform = "translateZ(0)";
24 requestAnimationFrame(function() { 24 requestAnimationFrame(function() {
25 if (window.internals) { 25 if (window.internals) {
26 result += "Should be using composited scrolling (since we're composi ting anyhow): "; 26 result += "Should be using composited scrolling (since we're composi ting anyhow): ";
27 if (isUsingCompositedScrolling(JSON.parse(window.internals.layerTree AsText(document, window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST)))) 27 if (isUsingCompositedScrolling(JSON.parse(window.internals.layerTree AsText(document))))
28 result += "Pass.\n"; 28 result += "Pass.\n";
29 else 29 else
30 result += "Fail.\n" 30 result += "Fail.\n"
31 } 31 }
32 32
33 document.getElementById("scroller").style.webkitTransform = ""; 33 document.getElementById("scroller").style.webkitTransform = "";
34 requestAnimationFrame(function() { 34 requestAnimationFrame(function() {
35 if (window.internals) { 35 if (window.internals) {
36 result += "Should not be using composited scrolling (since we've lost our direct reason): "; 36 result += "Should not be using composited scrolling (since we've lost our direct reason): ";
37 if (!isUsingCompositedScrolling(JSON.parse(window.internals.laye rTreeAsText(document, window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST)))) 37 if (!isUsingCompositedScrolling(JSON.parse(window.internals.laye rTreeAsText(document))))
38 result += "Pass.\n"; 38 result += "Pass.\n";
39 else 39 else
40 result += "Fail.\n" 40 result += "Fail.\n"
41 } 41 }
42 42
43 if (window.testRunner) { 43 if (window.testRunner) {
44 window.testRunner.setCustomTextOutput(result); 44 window.testRunner.setCustomTextOutput(result);
45 window.testRunner.notifyDone(); 45 window.testRunner.notifyDone();
46 } 46 }
47 }); 47 });
48 }); 48 });
49 } 49 }
50 </script> 50 </script>
51 <div id="scroller" style="overflow:scroll; width:100px; height:100px"> 51 <div id="scroller" style="overflow:scroll; width:100px; height:100px">
52 <div id="tall" style="background: green; width:50px; height: 1000px"></div> 52 <div id="tall" style="background: green; width:50px; height: 1000px"></div>
53 </div> 53 </div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698