Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Unified Diff: sky/sdk/lib/widgets/widget.dart

Issue 1224133002: Remove dart:mirrors from Sky framework (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/lib/widgets/basic.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/widget.dart
diff --git a/sky/sdk/lib/widgets/widget.dart b/sky/sdk/lib/widgets/widget.dart
index 7bfc3077a34da2f3e083db8794f47f8a1c0e6bb6..5fda7d0522cef638f2b53d5034883b18caafeb3b 100644
--- a/sky/sdk/lib/widgets/widget.dart
+++ b/sky/sdk/lib/widgets/widget.dart
@@ -4,7 +4,6 @@
import 'dart:async';
import 'dart:collection';
-import 'dart:mirrors';
import 'dart:sky' as sky;
import 'package:sky/mojo/activity.dart' as activity;
@@ -132,9 +131,9 @@ abstract class Widget {
// where to put this descendant. If you just defer to a child, then make sure
// to pass them the slot.
- Widget findAncestor(Type targetType) {
+ Widget findAncestorRenderObjectWrapper() {
var ancestor = _parent;
- while (ancestor != null && !reflectClass(ancestor.runtimeType).isSubtypeOf(reflectClass(targetType)))
+ while (ancestor != null && ancestor is! RenderObjectWrapper)
ancestor = ancestor._parent;
return ancestor;
}
@@ -664,7 +663,7 @@ abstract class RenderObjectWrapper extends Widget {
assert(parent != null || this is RenderViewWrapper);
if (old == null) {
_root = createNode();
- _ancestor = findAncestor(RenderObjectWrapper);
+ _ancestor = findAncestorRenderObjectWrapper();
if (_ancestor is RenderObjectWrapper)
_ancestor.insertChildRoot(this, slot);
} else {
« no previous file with comments | « sky/sdk/lib/widgets/basic.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698