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

Unified Diff: sdk/lib/html/html_common/filtered_element_list.dart

Issue 14246008: Allow Object when doing lookups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot to upload before committing Created 7 years, 6 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 | « sdk/lib/html/html_common/css_class_set.dart ('k') | sdk/lib/io/platform_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/html_common/filtered_element_list.dart
diff --git a/sdk/lib/html/html_common/filtered_element_list.dart b/sdk/lib/html/html_common/filtered_element_list.dart
index 61954e6b2ea19e421cbbc46c4698b0d0520d01b1..64326a47df1a2ba87de7b9b046f41bb7f886f5a7 100644
--- a/sdk/lib/html/html_common/filtered_element_list.dart
+++ b/sdk/lib/html/html_common/filtered_element_list.dart
@@ -59,8 +59,10 @@ class FilteredElementList<T extends Element> extends ListBase<T> {
}
}
- bool contains(Element element) {
- return (element != null) && (element.parentNode == _node);
+ bool contains(Object needle) {
+ if (needle is! Element) return false;
+ Element element = needle;
+ return element.parentNode == _node;
}
Iterable<Element> get reversed => _filtered.reversed;
« no previous file with comments | « sdk/lib/html/html_common/css_class_set.dart ('k') | sdk/lib/io/platform_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698