| OLD | NEW | 
| (Empty) |  | 
 |   1 <script> | 
 |   2 if (window.testRunner) | 
 |   3     window.testRunner.dumpAsText(); | 
 |   4  | 
 |   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() { | 
 |  18     if (!window.testRunner || !window.internals) | 
 |  19         return; | 
 |  20  | 
 |  21     var result = ""; | 
 |  22     result += "Should have opaque composited scrolling contents layer: "; | 
 |  23     if (hasOpaqueCompositedScrollingContentsLayer(JSON.parse(window.internals.la
    yerTreeAsText(document)))) | 
 |  24         result += "Pass.\n"; | 
 |  25     else | 
 |  26         result += "Fail.\n"; | 
 |  27     window.testRunner.setCustomTextOutput(result); | 
 |  28 } | 
 |  29 </script> | 
 |  30 <style> | 
 |  31 #scroller { | 
 |  32     background: white local content-box; | 
 |  33     border: 10px solid rgba(0, 255, 0, 0.5); | 
 |  34     overflow: scroll; | 
 |  35     width: 200px; | 
 |  36     height: 200px; | 
 |  37     will-change: transform; | 
 |  38 } | 
 |  39 .spacer { | 
 |  40     height: 300px; | 
 |  41 } | 
 |  42 </style> | 
 |  43 <!-- 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 | 
 |  45     is no gap because the scroller has no padding. This means that we will be | 
 |  46     able to draw text with subpixel anti-aliasing. | 
 |  47 --> | 
 |  48 <div id="scroller"><div class="spacer"></div></div> | 
| OLD | NEW |