| <!DOCTYPE html> |
| <style> |
| #subframe { |
| width: 400px; |
| height: 500px; |
| background-color: blue; |
| position: relative; |
| } |
| |
| #scroller { |
| height: 200px; |
| width: 300px; |
| position: absolute; |
| overflow: scroll; |
| } |
| |
| #clip { |
| position: absolute; |
| clip: rect(0px, 100px, 100px, 0px); |
| } |
| </style> |
| <script> |
| onload = function() { |
| // Render one frame with clipping, then remove the clip. |
| window.requestAnimationFrame(function() { |
| window.requestAnimationFrame(function() { |
| document.getElementById("clip").style.clip = "auto"; |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }); |
| }); |
| } |
| |
| if (window.testRunner && window.internals) { |
| testRunner.waitUntilDone(); |
| internals.settings.setPreferCompositingToLCDTextEnabled(true); |
| } |
| |
| </script> |
| |
| <div id="scroller"> |
| <div id="clip"> |
| <iframe id="subframe"></iframe> |
| </div> |
| </div> |