| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'dart:mirrors'; | 7 import 'dart:mirrors'; |
| 8 import 'dart:sky' as sky; | 8 import 'dart:sky' as sky; |
| 9 | 9 |
| 10 import '../app/view.dart'; | 10 import '../app/view.dart'; |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 | 751 |
| 752 void dispatchEvent(sky.Event event, HitTestResult result) { | 752 void dispatchEvent(sky.Event event, HitTestResult result) { |
| 753 assert(_appView == this); | 753 assert(_appView == this); |
| 754 super.dispatchEvent(event, result); | 754 super.dispatchEvent(event, result); |
| 755 for (HitTestEntry entry in result.path.reversed) { | 755 for (HitTestEntry entry in result.path.reversed) { |
| 756 Widget target = RenderObjectWrapper._getMounted(entry.target); | 756 Widget target = RenderObjectWrapper._getMounted(entry.target); |
| 757 if (target == null) | 757 if (target == null) |
| 758 continue; | 758 continue; |
| 759 RenderObject targetRoot = target.root; | 759 RenderObject targetRoot = target.root; |
| 760 while (target != null && target.root == targetRoot) { | 760 while (target != null && target.root == targetRoot) { |
| 761 if (target is EventListener) | 761 if (target is Listener) |
| 762 target._handleEvent(event); | 762 target._handleEvent(event); |
| 763 target = target._parent; | 763 target = target._parent; |
| 764 } | 764 } |
| 765 } | 765 } |
| 766 } | 766 } |
| 767 | 767 |
| 768 } | 768 } |
| 769 | 769 |
| 770 abstract class AbstractWidgetRoot extends Component { | 770 abstract class AbstractWidgetRoot extends Component { |
| 771 | 771 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 if (root.parent == null) { | 840 if (root.parent == null) { |
| 841 // we haven't attached it yet | 841 // we haven't attached it yet |
| 842 assert(_container.child == null); | 842 assert(_container.child == null); |
| 843 _container.child = root; | 843 _container.child = root; |
| 844 } | 844 } |
| 845 assert(root.parent == _container); | 845 assert(root.parent == _container); |
| 846 } | 846 } |
| 847 | 847 |
| 848 Widget build() => builder(); | 848 Widget build() => builder(); |
| 849 } | 849 } |
| OLD | NEW |