| Index: sdk/lib/html/html_common/css_class_set.dart
|
| diff --git a/tools/dom/src/CssClassSet.dart b/sdk/lib/html/html_common/css_class_set.dart
|
| similarity index 93%
|
| copy from tools/dom/src/CssClassSet.dart
|
| copy to sdk/lib/html/html_common/css_class_set.dart
|
| index acae69c9743377cc71300c1e4ce0b8f54e550a5e..df50d622f1ff5b7dd3d1afe39f5dbb0296726748 100644
|
| --- a/tools/dom/src/CssClassSet.dart
|
| +++ b/sdk/lib/html/html_common/css_class_set.dart
|
| @@ -2,9 +2,9 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -part of html;
|
| +part of html_common;
|
|
|
| -abstract class CssClassSet implements Set<String> {
|
| +abstract class CssClassSetImpl implements CssClassSet {
|
|
|
| String toString() {
|
| return readClasses().join(' ');
|
| @@ -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)) {
|
| Set<String> s = readClasses();
|
| f(s);
|
| writeClasses(s);
|
|
|