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

Unified Diff: tools/dom/src/CssClassSet.dart

Issue 14941002: Aggregate CSS manipulation functions in html lib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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: tools/dom/src/CssClassSet.dart
diff --git a/tools/dom/src/CssClassSet.dart b/tools/dom/src/CssClassSet.dart
index acae69c9743377cc71300c1e4ce0b8f54e550a5e..9153834efaa37faf2a153107e03233b5112d3d10 100644
--- a/tools/dom/src/CssClassSet.dart
+++ b/tools/dom/src/CssClassSet.dart
@@ -86,7 +86,7 @@ abstract class CssClassSet implements Set<String> {
void add(String value) {
// TODO - figure out if we need to do any validation here
// or if the browser natively does enough.
- _modify((s) => s.add(value));
+ modify((s) => s.add(value));
}
/**
@@ -112,7 +112,7 @@ abstract class CssClassSet implements Set<String> {
*/
void addAll(Iterable<String> iterable) {
// TODO - see comment above about validation.
- _modify((s) => s.addAll(iterable));
+ modify((s) => s.addAll(iterable));
}
/**
@@ -122,7 +122,7 @@ abstract class CssClassSet implements Set<String> {
* [removeClass](http://api.jquery.com/removeClass/).
*/
void removeAll(Iterable<String> iterable) {
- _modify((s) => s.removeAll(iterable));
+ modify((s) => s.removeAll(iterable));
}
/**
@@ -137,15 +137,15 @@ abstract class CssClassSet implements Set<String> {
}
void retainAll(Iterable<String> iterable) {
- _modify((s) => s.retainAll(iterable));
+ modify((s) => s.retainAll(iterable));
}
void removeWhere(bool test(String name)) {
- _modify((s) => s.removeWhere(test));
+ modify((s) => s.removeWhere(test));
}
void retainWhere(bool test(String name)) {
- _modify((s) => s.retainWhere(test));
+ modify((s) => s.retainWhere(test));
}
bool containsAll(Iterable<String> collection) =>
@@ -181,7 +181,7 @@ abstract class CssClassSet implements Set<String> {
String elementAt(int index) => readClasses().elementAt(index);
void clear() {
- _modify((s) => s.clear());
+ modify((s) => s.clear());
}
// interface Set - END
@@ -194,7 +194,7 @@ abstract class CssClassSet implements Set<String> {
* After f returns, the modified set is written to the
* className property of this element.
*/
- void _modify( f(Set<String> s)) {
+ void modify( f(Set<String> s)) {
Emily Fortuna 2013/05/03 20:03:50 The alternative here is to make _MultiElementCssCl
blois 2013/05/03 20:13:37 Can we actually refactor this so CssClassSet is ju
Set<String> s = readClasses();
f(s);
writeClasses(s);

Powered by Google App Engine
This is Rietveld 408576698