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

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

Issue 1310363006: Patched in Dartium JsInterop (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 2eaafe60beeb37dbb206b741a4307ad38178a88f..b41f7eca2eb7beb0256dd4c7e7b8c02972bcb6f5 100644
--- a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
@@ -58,7 +58,7 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
List<Element> get children => new FilteredElementList(this);
- void set children(List<Element> value) {
+ set children(List<Element> value) {
final children = this.children;
children.clear();
children.addAll(value);
@@ -78,7 +78,7 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
return container.innerHtml;
}
- void set innerHtml(String value) {
+ set innerHtml(String value) {
this.setInnerHtml(value);
}
@@ -143,5 +143,21 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
var e = new $CLASSNAME.tag(tag);
return e is $CLASSNAME && !(e is UnknownElement);
}
+
+$if JSINTEROP
+ set _svgClassName(AnimatedString value) =>
+ _blink.BlinkSVGElement.instance.className_Setter_(unwrap_jso(this), unwrap_jso(value));
+
+ String get className => _svgClassName.baseVal;
+
+ // Unbelievable hack. We can't create an SvgAnimatedString, but we can get
+ // the existing one and change its baseVal. Then we call the blink setter directly
+ // TODO(alanknight): Handle suppressing the SVGAnimated<*> better
+ set className(String s) {
+ var oldClass = _svgClassName;
+ oldClass.baseVal = s;
+ _svgClassName = oldClass;
+ }
+$endif
$!MEMBERS
}
« no previous file with comments | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | tools/dom/templates/html/impl/impl_ShadowRoot.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698