| <!-- Based on fast/repaint/reflection-invalidation-after-display.html --> |
| <!DOCTYPE html> |
| <style> |
| .green { |
| background-color: green; |
| } |
| .box { |
| width: 200px; |
| height: 200px; |
| position: absolute; |
| left: 300px; |
| } |
| .reflected { |
| -webkit-box-reflect: right 50px; |
| } |
| </style> |
| <!-- |
| This test checks that we correctly invalidate reflection when they are removed. |
| There should be only one green box below. |
| --> |
| <div class="green reflected box" id="box"></div> |
| <script src="resources/paint-invalidation-test.js"></script> |
| <script> |
| window.expectedPaintInvalidationObjects = [ |
| "LayoutBlockFlow (positioned) DIV id='box' class='green box'", |
| "LayoutBlockFlow (positioned) DIV id='box' class='green box'", |
| ]; |
| function paintInvalidationTest() { |
| var box = document.getElementById('box'); |
| box.classList.toggle('reflected'); |
| } |
| window.onload = runPaintInvalidationTest; |
| </script> |