| OLD | NEW |
| (Empty) |
| 1 <style> | |
| 2 toolbar { | |
| 3 background: yellow; | |
| 4 width: 50px; | |
| 5 height: 50px; | |
| 6 } | |
| 7 scrollable { | |
| 8 overflow: hidden; | |
| 9 height: 400px; | |
| 10 background: red; | |
| 11 } | |
| 12 content { | |
| 13 height: 400px; | |
| 14 background-color: pink; | |
| 15 transform: translateY(-100px); | |
| 16 } | |
| 17 </style> | |
| 18 <toolbar>toolbar</toolbar> | |
| 19 <scrollable><content>content</content></scrollable> | |
| 20 <script> | |
| 21 import "../resources/third_party/unittest/unittest.dart"; | |
| 22 import "../resources/unit.dart"; | |
| 23 | |
| 24 import "dart:async"; | |
| 25 import "dart:sky"; | |
| 26 | |
| 27 void main() { | |
| 28 initUnit(); | |
| 29 | |
| 30 test("should hit test toolbar", () { | |
| 31 expect(document.elementFromPoint(10, 10).textContent, equals("toolbar")); | |
| 32 }); | |
| 33 | |
| 34 test("should hit test toolbar when transformed, but clipped element overlaps",
() { | |
| 35 document.querySelector("scrollable").style["transform"] = "translate(0, 0)"; | |
| 36 expect(document.elementFromPoint(10, 10).textContent, equals("toolbar")); | |
| 37 }); | |
| 38 } | |
| 39 </script> | |
| OLD | NEW |