| OLD | NEW | 
|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> | 
| 2 | 2 | 
| 3 <html> | 3 <html> | 
| 4 <head> | 4 <head> | 
| 5   <style> | 5   <style> | 
| 6     #target { | 6     #target { | 
| 7       position: absolute; | 7       position: absolute; | 
| 8       left: 0px; | 8       left: 0px; | 
| 9       height: 200px; | 9       height: 200px; | 
| 10       width: 200px; | 10       width: 200px; | 
| 11       background-color: red; | 11       background-color: red; | 
| 12       -webkit-transform: translateX(100px); | 12       -webkit-transform: translateX(100px); | 
| 13       -webkit-transition-property: -webkit-transform; | 13       -webkit-transition-property: -webkit-transform; | 
| 14       -webkit-transition-duration: 4s; | 14       -webkit-transition-duration: 4s; | 
| 15       -webkit-transition-timing-function: linear; | 15       -webkit-transition-timing-function: linear; | 
| 16     } | 16     } | 
| 17 | 17 | 
| 18     .dot { | 18     .dot { | 
| 19         width: 10px; | 19         width: 10px; | 
| 20         height: 10px; | 20         height: 10px; | 
| 21         top: 100px; | 21         top: 100px; | 
| 22         background-color: yellow; | 22         background-color: yellow; | 
| 23         position:absolute; | 23         position:absolute; | 
| 24     } | 24     } | 
| 25      </style> | 25      </style> | 
| 26    <script src="resources/transition-test-helpers.js"></script> | 26    <script src="../animations/resources/animation-test-helpers.js"></script> | 
| 27    <script type="text/javascript"> | 27    <script type="text/javascript"> | 
| 28         function checkResult(pos, isIn) | 28         function checkResult(pos, isIn) | 
| 29         { | 29         { | 
| 30             var elt = document.elementFromPoint(pos, 150); | 30             var elt = document.elementFromPoint(pos, 150); | 
| 31             var good = isIn ? "inside" : "outside"; | 31             var good = isIn ? "inside" : "outside"; | 
| 32             var bad = isIn ? "outside" : "inside"; | 32             var bad = isIn ? "outside" : "inside"; | 
| 33             return (isIn == (elt.id == "target")) ? | 33             return (isIn == (elt.id == "target")) ? | 
| 34                 "<span style='color:green'>PASS</span> - " + pos + "px was " + g
    ood + " as it should be" + "<br>" : | 34                 "<span style='color:green'>PASS</span> - " + pos + "px was " + g
    ood + " as it should be" + "<br>" : | 
| 35                 "<span style='color:red'>FAIL</span> - " + pos + "px was " + bad
     + " and should have been " + good + "<br>"; | 35                 "<span style='color:red'>FAIL</span> - " + pos + "px was " + bad
     + " and should have been " + good + "<br>"; | 
| 36         } | 36         } | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
| 60         } | 60         } | 
| 61 | 61 | 
| 62         function startTest() | 62         function startTest() | 
| 63         { | 63         { | 
| 64             if (window.testRunner) { | 64             if (window.testRunner) { | 
| 65                 testRunner.dumpAsText(); | 65                 testRunner.dumpAsText(); | 
| 66                 testRunner.waitUntilDone(); | 66                 testRunner.waitUntilDone(); | 
| 67             } | 67             } | 
| 68 | 68 | 
| 69             document.getElementById("target").style.webkitTransform = "translate
    X(300px)"; | 69             document.getElementById("target").style.webkitTransform = "translate
    X(300px)"; | 
| 70             waitForAnimationStart(doTest); | 70             requestAnimationFrame(doTest); | 
| 71         } | 71         } | 
| 72    </script> | 72    </script> | 
| 73 </head> | 73 </head> | 
| 74 <body onload="startTest()"> | 74 <body onload="startTest()"> | 
| 75     <div> | 75     <div> | 
| 76         This test starts a transition of the '-webkit-transform' property and th
    en does elementFromPoint calls | 76         This test starts a transition of the '-webkit-transform' property and th
    en does elementFromPoint calls | 
| 77         at the shown yellow dots to see if hit testing works | 77         at the shown yellow dots to see if hit testing works | 
| 78     </div> | 78     </div> | 
| 79     <div id="target"></div> | 79     <div id="target"></div> | 
| 80     <div class="dot" style="left:150px"></div> | 80     <div class="dot" style="left:150px"></div> | 
| 81     <div class="dot" style="left:300px"></div> | 81     <div class="dot" style="left:300px"></div> | 
| 82     <div class="dot" style="left:450px"></div> | 82     <div class="dot" style="left:450px"></div> | 
| 83     <div id="result"></div> | 83     <div id="result"></div> | 
| 84 </body> | 84 </body> | 
| 85 </html> | 85 </html> | 
| OLD | NEW | 
|---|