| OLD | NEW |
| 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 hasNotOpaqueCompositedScrollingContentsLayer(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 (hasNotOpaqueCompositedScrollingContentsLayer(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 not have opaque composited scrolling contents layer: "; | 12 result += "Should not have opaque composited scrolling contents layer: "; |
| 23 if (hasNotOpaqueCompositedScrollingContentsLayer(JSON.parse(window.internals
.layerTreeAsText(document)))) | 13 if (hasNotOpaqueCompositedScrollingContentsLayer(JSON.parse(window.internals
.layerTreeAsText(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 Loading... |
| 39 } | 29 } |
| 40 .spacer { | 30 .spacer { |
| 41 height: 280px; | 31 height: 280px; |
| 42 } | 32 } |
| 43 </style> | 33 </style> |
| 44 <!-- The scroller's Scrolling Contents Layer should be transparent due to the | 34 <!-- The scroller's Scrolling Contents Layer should be transparent due to the |
| 45 content-box clip with a 10px padding leaving a transparent gap between. | 35 content-box clip with a 10px padding leaving a transparent gap between. |
| 46 --> | 36 --> |
| 47 <div id="scroller"><div class="spacer"></div></div> | 37 <div id="scroller"><div class="spacer"></div></div> |
| 48 <pre id="layertree"></pre> | 38 <pre id="layertree"></pre> |
| OLD | NEW |