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

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-opaque-background-will-change.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>
2 <script src="resources/composited-scroll.js"></script>
1 <script> 3 <script>
2 if (window.testRunner) 4 if (window.testRunner)
3 window.testRunner.dumpAsText(); 5 window.testRunner.dumpAsText();
4 6
5 function hasOpaqueCompositedScrollingContentsLayer(layer) {
6 if (layer.name == "Scrolling Contents Layer")
7 return layer.contentsOpaque;
8 if (layer.children) {
9 for (var i = 0; i < layer.children.length; i++) {
10 if (hasOpaqueCompositedScrollingContentsLayer(layer.children[i]))
11 return true;
12 }
13 }
14 return false;
15 }
16
17 onload = function() { 7 onload = function() {
18 if (!window.testRunner || !window.internals) 8 if (!window.testRunner || !window.internals)
19 return; 9 return;
20 10
21 var result = ""; 11 var result = "";
22 result += "Should have opaque composited scrolling contents layer: "; 12 result += "Should have opaque composited scrolling contents layer: ";
23 if (hasOpaqueCompositedScrollingContentsLayer(JSON.parse(window.internals.la yerTreeAsText(document)))) 13 if (hasOpaqueCompositedScrollingContentsLayer(JSON.parse(window.internals.la yerTreeAsText(document))))
24 result += "Pass.\n"; 14 result += "Pass.\n";
25 else 15 else
26 result += "Fail.\n"; 16 result += "Fail.\n";
(...skipping 12 matching lines...) Expand all
39 .spacer { 29 .spacer {
40 height: 300px; 30 height: 300px;
41 } 31 }
42 </style> 32 </style>
43 <!-- The scroller's Scrolling Contents Layer should be opaque due to the opaque 33 <!-- The scroller's Scrolling Contents Layer should be opaque due to the opaque
44 color background. Even though the background has a content-box clip there 34 color background. Even though the background has a content-box clip there
45 is no gap because the scroller has no padding. This means that we will be 35 is no gap because the scroller has no padding. This means that we will be
46 able to draw text with subpixel anti-aliasing. 36 able to draw text with subpixel anti-aliasing.
47 --> 37 -->
48 <div id="scroller"><div class="spacer"></div></div> 38 <div id="scroller"><div class="spacer"></div></div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698