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

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

Issue 1054863002: CssClassSet upgrade (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix webcomponents test, IE toggle. Created 5 years, 9 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 | « tools/dom/src/dart2js_CssClassSet.dart ('k') | tools/dom/templates/html/dart2js/html_dart2js.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/dartium_CssClassSet.dart
diff --git a/tools/dom/src/CssClassSet.dart b/tools/dom/src/dartium_CssClassSet.dart
similarity index 51%
copy from tools/dom/src/CssClassSet.dart
copy to tools/dom/src/dartium_CssClassSet.dart
index 0b22ef7741942959a398083c4d54b78db2ee40b8..cba90253baa025a4d759f2267a472d938d7c217d 100644
--- a/tools/dom/src/CssClassSet.dart
+++ b/tools/dom/src/dartium_CssClassSet.dart
@@ -1,86 +1,9 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// 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;
-/** A Set that stores the CSS class names for an element. */
-abstract class CssClassSet implements Set<String> {
-
- /**
- * Adds the class [value] to the element if it is not on it, removes it if it
- * is.
- *
- * If [shouldAdd] is true, then we always add that [value] to the element. If
- * [shouldAdd] is false then we always remove [value] from the element.
- */
- bool toggle(String value, [bool shouldAdd]);
-
- /**
- * Returns [:true:] if classes cannot be added or removed from this
- * [:CssClassSet:].
- */
- bool get frozen;
-
- /**
- * Determine if this element contains the class [value].
- *
- * This is the Dart equivalent of jQuery's
- * [hasClass](http://api.jquery.com/hasClass/).
- */
- bool contains(String value);
-
- /**
- * Add the class [value] to element.
- *
- * This is the Dart equivalent of jQuery's
- * [addClass](http://api.jquery.com/addClass/).
- *
- * If this corresponds to one element. Returns true if [value] was added to
- * the set, otherwise false.
- *
- * If this corresponds to many elements, null is always returned.
- */
- bool add(String value);
-
- /**
- * Remove the class [value] from element, and return true on successful
- * removal.
- *
- * This is the Dart equivalent of jQuery's
- * [removeClass](http://api.jquery.com/removeClass/).
- */
- bool remove(Object value);
-
- /**
- * Add all classes specified in [iterable] to element.
- *
- * This is the Dart equivalent of jQuery's
- * [addClass](http://api.jquery.com/addClass/).
- */
- void addAll(Iterable<String> iterable);
-
- /**
- * Remove all classes specified in [iterable] from element.
- *
- * This is the Dart equivalent of jQuery's
- * [removeClass](http://api.jquery.com/removeClass/).
- */
- void removeAll(Iterable<String> iterable);
-
- /**
- * Toggles all classes specified in [iterable] on element.
- *
- * Iterate through [iterable]'s items, and add it if it is not on it, or
- * remove it if it is. This is the Dart equivalent of jQuery's
- * [toggleClass](http://api.jquery.com/toggleClass/).
- * If [shouldAdd] is true, then we always add all the classes in [iterable]
- * element. If [shouldAdd] is false then we always remove all the classes in
- * [iterable] from the element.
- */
- void toggleAll(Iterable<String> iterable, [bool shouldAdd]);
-}
-
/**
* A set (union) of the CSS classes that are present in a set of elements.
* Implemented separately from _ElementCssClassSet for performance.
« no previous file with comments | « tools/dom/src/dart2js_CssClassSet.dart ('k') | tools/dom/templates/html/dart2js/html_dart2js.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698