| <!DOCTYPE html> |
| <html> |
| <head> |
| <link rel="stylesheet" href="resources/compositor-touch-hit-rects.css"> |
| <style> |
| iframe { |
| height: 25px; |
| width: 400px; |
| overflow-x: hidden; |
| } |
| #iframe-nested { |
| height: 35px; |
| } |
| #iframe-transform { |
| transform: scale(1.1) rotate(1grad); |
| margin: 10px 30px; |
| } |
| </style> |
| </head> |
| <body> |
| <p id="description"> |
| This tests verifies the hit test regions given to the compositor when non-composited iframes are involved. |
| It can only be run in DumpRenderTree. The outputted rects should cover the hit test regions of all the listed elements. Enable visualize mode to quickly validate graphically.</p> |
| |
| <div id="tests"> |
| <iframe id="iframe" src="resources/compositor-touch-hit-rects-iframe.html"></iframe> |
| <iframe id="iframe-nested" src="resources/compositor-touch-hit-rects-iframe-nested.html"></iframe> |
| <iframe id="iframe-transform" src="resources/compositor-touch-hit-rects-iframe.html"></iframe> |
| <iframe id="iframe-fixed" src="resources/compositor-touch-hit-rects-iframe-fixed.html"></iframe> |
| <iframe id="iframe-doc" src="resources/compositor-touch-hit-rects-iframe-doc.html"></iframe> |
| </div> |
| |
| <div id="console"></div> |
| <script src="resources/compositor-touch-hit-rects.js"></script> |
| <script> |
| function runIFrameTest(id) { |
| var elem = document.getElementById(id); |
| if (!elem.addHandlers) { |
| log('FAIL - child iframe has not setup handlers in parent.'); |
| return; |
| } |
| |
| elem.addHandlers(); |
| if (window.internals) |
| internals.forceCompositingUpdate(document); |
| logRects(id); |
| elem.removeHandlers(); |
| } |
| function additionalTests() { |
| runIFrameTest('iframe'); |
| runIFrameTest('iframe-nested'); |
| runIFrameTest('iframe-transform'); |
| runIFrameTest('iframe-fixed'); |
| runIFrameTest('iframe-doc'); |
| } |
| </script> |
| </body> |