Chromium Code Reviews| Index: sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate |
| diff --git a/sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate b/sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate |
| index aa9acfacd7de8e9c9503cb3602970b01e8c63073..f4450eafe59ce35b508ee7a7c1439ee21849dbaf 100644 |
| --- a/sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate |
| +++ b/sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate |
| @@ -2,14 +2,27 @@ |
| // 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 $LIBRARYNAME; |
| -class _AttributeClassSet extends _CssClassSet { |
| - _AttributeClassSet(element) : super(element); |
| +class _AttributeClassSet extends CssClassSet { |
|
Anton Muhin
2012/11/09 13:13:23
why it's now parameterized by library name? canno
blois
2012/11/09 18:21:56
Changed. I had it that way since it's easier to mo
|
| + final Element _element; |
| - String $dom_className() => _element.attributes['class']; |
| + _AttributeClassSet(this._element); |
| - void _write(Set s) { |
| + Set<String> readClasses() { |
| + var classname = _element.attributes['class']; |
| + |
| + Set<String> s = new Set<String>(); |
| + for (String name in classname.split(' ')) { |
| + String trimmed = name.trim(); |
| + if (!trimmed.isEmpty) { |
| + s.add(trimmed); |
| + } |
| + } |
| + return s; |
| + } |
| + |
| + void writeClasses(Set s) { |
| _element.attributes['class'] = _formatSet(s); |
| } |
| } |
| @@ -27,7 +40,7 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| return _cssClassSet; |
| } |
| - List<Element> get elements => new _FilteredElementList(this); |
| + List<Element> get elements => new FilteredElementList(this); |
| void set elements(Collection<Element> value) { |
| final elements = this.elements; |