| OLD | NEW |
| 1 <sky> | 1 <sky> |
| 2 <style> | 2 <style> |
| 3 foo, parent { width: 100px; height: 100px; background: blue; } | 3 foo, parent { width: 100px; height: 100px; background: blue; } |
| 4 bar { width: 100px; height: 100px; background: purple; } | 4 bar { width: 100px; height: 100px; background: purple; } |
| 5 parent { display: paragraph; } | 5 parent { display: paragraph; } |
| 6 child { background: salmon; } | 6 child { background: salmon; } |
| 7 canvas { height: 50px; background-color: pink; } | 7 canvas { height: 50px; background-color: pink; } |
| 8 </style> | 8 </style> |
| 9 <foo /><bar /> | 9 <foo /><bar /> |
| 10 <parent> | 10 <parent> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 expect(document.elementFromPoint(95, 210).tagName, equals('parent')); | 40 expect(document.elementFromPoint(95, 210).tagName, equals('parent')); |
| 41 // Below the <child> inline. | 41 // Below the <child> inline. |
| 42 expect(document.elementFromPoint(50, 275).tagName, equals('parent')); | 42 expect(document.elementFromPoint(50, 275).tagName, equals('parent')); |
| 43 } | 43 } |
| 44 | 44 |
| 45 test("should hit test child and parent", () { | 45 test("should hit test child and parent", () { |
| 46 hitTestWithChildren(); | 46 hitTestWithChildren(); |
| 47 }); | 47 }); |
| 48 | 48 |
| 49 test("should hit test child with layered parent", () { | 49 test("should hit test child with layered parent", () { |
| 50 document.querySelector('parent').style.setProperty("transform", "translate3d
(0, 0, 0)"); | 50 document.querySelector('parent').style["transform"] = "translate3d(0, 0, 0)"
; |
| 51 hitTestWithChildren(); | 51 hitTestWithChildren(); |
| 52 }); | 52 }); |
| 53 | 53 |
| 54 test("should hit test transformed child", () { | 54 test("should hit test transformed child", () { |
| 55 document.querySelector('child').style.setProperty("transform", "translate3d(
100px, 0, 0)"); | 55 document.querySelector('child').style["transform"] = "translate3d(100px, 0,
0)"; |
| 56 expect(document.elementFromPoint(50, 210).tagName, equals('parent')); | 56 expect(document.elementFromPoint(50, 210).tagName, equals('parent')); |
| 57 expect(document.elementFromPoint(150, 210).tagName, equals('child')); | 57 expect(document.elementFromPoint(150, 210).tagName, equals('child')); |
| 58 }); | 58 }); |
| 59 | 59 |
| 60 test("should hit test canvas", () { | 60 test("should hit test canvas", () { |
| 61 expect(document.elementFromPoint(50, 310).tagName, equals('canvas')); | 61 expect(document.elementFromPoint(50, 310).tagName, equals('canvas')); |
| 62 }); | 62 }); |
| 63 } | 63 } |
| 64 </script> | 64 </script> |
| 65 </sky> | 65 </sky> |
| OLD | NEW |