float-offscreen.html 746 B

12345678910111213141516171819202122232425262728
  1. <!DOCTYPE html>
  2. <style>
  3. #target::-webkit-scrollbar {
  4. display: none;
  5. }
  6. </style>
  7. <script src="resources/text-based-repaint.js"></script>
  8. <!-- Tests that a floating descendant gets correctly re-painted after
  9. being scrolled offscreen and back. -->
  10. <div id="target" style="height:300px; overflow:scroll; isolation: isolate;">
  11. <table>
  12. <td>
  13. <input size="8" style="float: left;">
  14. </td>
  15. </table>
  16. <div style="width: 100px; height: 1000px"></div>
  17. </div>
  18. <script>
  19. testIsAsync = true;
  20. function repaintTest() {
  21. target.scrollTop = 300;
  22. requestAnimationFrame(() => requestAnimationFrame(() => {
  23. target.scrollTop = 0;
  24. finishRepaintTest();
  25. }));
  26. }
  27. onload = runRepaintAndPixelTest;
  28. </script>