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

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

Issue 288103003: Change Set.toSet to always return a set with the same behavior. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change .clone() to use .toSet(). Update docs. Created 6 years, 7 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
Index: sdk/lib/html/html_common/css_class_set.dart
diff --git a/sdk/lib/html/html_common/css_class_set.dart b/sdk/lib/html/html_common/css_class_set.dart
index a81497e401f08207a316f332de3962bba0dc4049..ef6f9680073cf24a2893cdb224287f00d02cf12a 100644
--- a/sdk/lib/html/html_common/css_class_set.dart
+++ b/sdk/lib/html/html_common/css_class_set.dart
@@ -172,6 +172,10 @@ abstract class CssClassSetImpl implements CssClassSet {
Set<String> difference(Set<String> other) =>
readClasses().difference(other);
+ // Do overwrite this method in subclasses if it is not the type of set
+ // returned by readClasses.
+ Set<String> cloneEmpty() => new LinkedHashSet<String>();
+
String get first => readClasses().first;
String get last => readClasses().last;
String get single => readClasses().single;

Powered by Google App Engine
This is Rietveld 408576698