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

Unified Diff: tools/dom/templates/html/impl/impl_SVGElement.darttemplate

Issue 2875773003: Roll 50: Updated for push to origin/master. (Closed)
Patch Set: Roll 50: Updated to latest Created 3 years, 7 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
Index: tools/dom/templates/html/impl/impl_SVGElement.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
index 886d783376fee336dd16049b44910c1ccdf9516c..384aac70fab5c844332cb3e603eb4e9f661403e0 100644
--- a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
@@ -4,13 +4,16 @@
part of $LIBRARYNAME;
-class _AttributeClassSet extends CssClassSetImpl {
+class AttributeClassSet extends CssClassSetImpl {
final Element _element;
- _AttributeClassSet(this._element);
+ AttributeClassSet(this._element);
Set<String> readClasses() {
var classname = _element.attributes['class'];
+ if (classname is AnimatedString) {
+ classname = classname.baseVal;
+ }
Set<String> s = new LinkedHashSet<String>();
if (classname == null) {
@@ -26,7 +29,7 @@ class _AttributeClassSet extends CssClassSetImpl {
}
void writeClasses(Set s) {
- _element.attributes['class'] = s.join(' ');
+ _element.setAttribute('class', s.join(' '));
}
}
@@ -54,7 +57,7 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
return fragment.nodes.where((e) => e is SvgElement).single;
}
- CssClassSet get classes => new _AttributeClassSet(this);
+ CssClassSet get classes => new AttributeClassSet(this);
List<Element> get children => new FilteredElementList(this);

Powered by Google App Engine
This is Rietveld 408576698