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

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

Issue 1292963003: Fix identity and SVGAnimatedString issues with element_classes_test (Closed) Base URL: git@github.com:dart-lang/sdk.git@integration
Patch Set: Created 5 years, 4 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 378dec8a2a3a4ea5c5ec4c86d0822b4a34e3e6ea..e417a464c81c41b52dbe8ecb7d62c1756bfa5aa3 100644
--- a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
@@ -143,5 +143,18 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
var e = new $CLASSNAME.tag(tag);
return e is $CLASSNAME && !(e is UnknownElement);
}
+
+$if JSINTEROP
+ String get className => _svgClassName.baseVal;
+
+ // Unbelievable hack. We can't create an SvgAnimatedString, but we can get
+ // the existing one and change its baseVal.
+ // TODO(alanknight): Handle suppressing the SVGAnimated<*> better
+ set className(String s) {
+ var oldClass = _svgClassName;
+ oldClass.baseVal = s;
+ super.className = oldClass;
+ }
+$endif
terry 2015/08/17 14:40:29 Is it a bug that we can't create an SvgAnimatedStr
$!MEMBERS
}

Powered by Google App Engine
This is Rietveld 408576698