change-clip-composited-layer.html 789 B

12345678910111213141516171819
  1. <!doctype HTML>
  2. <script src="resources/text-based-repaint.js" type="text/javascript"></script>
  3. <div id=target style="will-change: transform; overflow:hidden; height: 10px; width: 100px;">
  4. <div>
  5. <!-- A grandchild stacking context. Should disappear if the test passes. -->
  6. <div style="isolation: isolate; width: 50px; height: 50px; background: red">
  7. </div>
  8. </div>
  9. </div>
  10. <script>
  11. function repaintTest() {
  12. // Change the clip to be zero-height, and add a transparent border of the same height.
  13. // This results in a composited layer of exactly the same size but a chnaged clip
  14. // to apply to children.
  15. target.style.height = "0px";
  16. target.style.borderBottom = "10px solid transparent";
  17. }
  18. onload = runRepaintAndPixelTest();
  19. </script>