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 7315823d2852fbea9711932b57598191c64e57d3..077a8077cae10f650bf2cd971fbae57613e2a7e7 100644 |
| --- a/sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate |
| +++ b/sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate |
| @@ -13,6 +13,9 @@ class _AttributeClassSet extends CssClassSet { |
| var classname = _element.attributes['class']; |
| Set<String> s = new Set<String>(); |
| + if (classname == null) { |
| + return s; |
| + } |
| for (String name in classname.split(' ')) { |
| String trimmed = name.trim(); |
| if (!trimmed.isEmpty) { |
| @@ -23,7 +26,8 @@ class _AttributeClassSet extends CssClassSet { |
| } |
| void writeClasses(Set s) { |
| - _element.attributes['class'] = _formatSet(s); |
|
Emily Fortuna
2012/11/14 23:33:24
wow, did this just not work before? I can't find _
blois
2012/11/14 23:37:19
I would have broken this with some refactoring tha
|
| + List list = new List.from(s); |
| + _element.attributes['class'] = Strings.join(list, ' '); |
| } |
| } |
| @@ -33,9 +37,10 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| factory $CLASSNAME.svg(String svg) => |
| _$(CLASSNAME)FactoryProvider.create$(CLASSNAME)_svg(svg); |
| + _AttributeClassSet _cssClassSet; |
| CssClassSet get classes { |
| if (_cssClassSet == null) { |
| - _cssClassSet = new _AttributeClassSet(_ptr); |
| + _cssClassSet = new _AttributeClassSet(this); |
| } |
| return _cssClassSet; |
| } |