| <!DOCTYPE html> |
| <style> |
| #box { |
| position: absolute; |
| top: 100px; |
| left: 100px; |
| width: 50px; |
| height: 50px; |
| background-color: blue; |
| } |
| </style> |
| |
| <p id="description"> |
| This test verifies the touch event target rects are updated correctly when |
| an element transfroms without causing layout. |
| </p> |
| |
| <div id="tests"> |
| <div id="box"></div> |
| </div> |
| <div id="console" style="display:none;"></div> |
| |
| <script src="resources/compositor-touch-hit-rects.js"></script> |
| <script> |
| |
| const box = document.getElementById("box"); |
| box.addEventListener("touchstart", () => {}, false); |
| internals.forceCompositingUpdate(document); |
| logRects(box, true); |
| |
| // The box should be able to translate to a new location |
| box.style.transform = "translate(50px,0px)"; |
| internals.forceCompositingUpdate(document); |
| logRects(box, true); |
| |
| document.getElementById("console").style.display = "block"; |
| |
| </script> |