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

Unified Diff: client/html/src/CssClassSet.dart

Issue 9107047: Fix SVGElement#classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | « client/html/release/htmlimpl.dart ('k') | client/html/src/SVGElementWrappingImplementation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/html/src/CssClassSet.dart
diff --git a/client/html/src/CssClassSet.dart b/client/html/src/CssClassSet.dart
index 00a8aa2422277870b20f2425be68949ef9ad22be..6fc3451b7a828587cb0f0363502ef05cf9d0bb2d 100644
--- a/client/html/src/CssClassSet.dart
+++ b/client/html/src/CssClassSet.dart
@@ -117,7 +117,7 @@ class _CssClassSet implements Set<String> {
Set<String> _read() {
// TODO(mattsh) simplify this once split can take regex.
Set<String> s = new Set<String>();
- for (String name in _element.className.split(' ')) {
+ for (String name in _className().split(' ')) {
String trimmed = name.trim();
if (!trimmed.isEmpty()) {
s.add(trimmed);
@@ -127,6 +127,12 @@ class _CssClassSet implements Set<String> {
}
/**
+ * Read the class names as a space-separated string. This is meant to be
+ * overridden by subclasses.
+ */
+ String _className() => _element.className;
+
+ /**
* Join all the elements of a set into one string and write
* back to the element.
*/
« no previous file with comments | « client/html/release/htmlimpl.dart ('k') | client/html/src/SVGElementWrappingImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698