| <!DOCTYPE html> |
| <script src="resources/composited-scroll.js"></script> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| onload = function() { |
| if (!window.testRunner || !window.internals) |
| return; |
| |
| var result = ""; |
| result += "Should not have opaque composited scrolling contents layer: "; |
| if (elementSubtreeHasNotOpaqueCompositedScrollingContentsLayer(document.getElementById('scroller'))) |
| result += "Pass.\n"; |
| else |
| result += "Fail.\n"; |
| testRunner.setCustomTextOutput(result); |
| } |
| </script> |
| <style> |
| #scroller { |
| background: white local content-box; |
| border: 10px solid rgba(0, 255, 0, 0.5); |
| overflow: scroll; |
| padding: 10px; |
| width: 180px; |
| height: 180px; |
| will-change: transform; |
| } |
| .spacer { |
| height: 280px; |
| } |
| </style> |
| <!-- The scroller's Scrolling Contents Layer should be transparent due to the |
| content-box clip with a 10px padding leaving a transparent gap between. |
| --> |
| <div id="scroller"><div class="spacer"></div></div> |
| <pre id="layertree"></pre> |