invalidate-when-removing-paint-layer.html 918 B

12345678910111213141516171819
  1. <!DOCTYPE html>
  2. <div style="z-index: -1; backface-visibility: hidden; width: 400px; height: 400px"></div>
  3. <div id="target" style="position: absolute; top: 0px; left: 0px; height: 100px; width: 600px; color: red">
  4. Text should disappear. Text should disappear. Text should disappear. Text should disappear.
  5. </div>
  6. <!-- Layers previously squashed together with target.
  7. They cover left and bottom side of the squashed layer, but not the top-right part. -->
  8. <div style="z-index: 1; position: absolute; left: 0; top: 0; width: 200px; height: 500px; background-color: green">
  9. </div>
  10. <div style="z-index: 1; position: absolute; left: 0; top: 400px; height: 100px; width: 700px; background-color: green">
  11. </div>
  12. <script src="../../resources/run-after-layout-and-paint.js"></script>
  13. <script>
  14. onload = function() {
  15. runAfterLayoutAndPaint(function() {
  16. target.style.position = 'static';
  17. }, true);
  18. }
  19. </script>