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

Unified Diff: sdk/lib/svg/dart2js/svg_dart2js.dart

Issue 11413071: Deprecating Element.elements for Element.children. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review feedback. Created 8 years, 1 month 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
« no previous file with comments | « sdk/lib/html/templates/html/impl/impl_SvgElement.darttemplate ('k') | sdk/lib/svg/dartium/svg_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/svg/dart2js/svg_dart2js.dart
diff --git a/sdk/lib/svg/dart2js/svg_dart2js.dart b/sdk/lib/svg/dart2js/svg_dart2js.dart
index 54cd28dc64ba11f0d8000c74e24eb96d32b811a5..6638fde0711399f97b6794e132dbf3b1650da1b2 100644
--- a/sdk/lib/svg/dart2js/svg_dart2js.dart
+++ b/sdk/lib/svg/dart2js/svg_dart2js.dart
@@ -5018,17 +5018,25 @@ class SvgElement extends Element native "*SVGElement" {
elements.addAll(value);
}
+ List<Element> get children => new FilteredElementList(this);
+
+ void set children(Collection<Element> value) {
+ final children = this.children;
+ children.clear();
+ children.addAll(value);
+ }
+
String get outerHTML {
final container = new Element.tag("div");
final SvgElement cloned = this.clone(true);
- container.elements.add(cloned);
+ container.children.add(cloned);
return container.innerHTML;
}
String get innerHTML {
final container = new Element.tag("div");
final SvgElement cloned = this.clone(true);
- container.elements.addAll(cloned.elements);
+ container.children.addAll(cloned.children);
return container.innerHTML;
}
@@ -5037,7 +5045,7 @@ class SvgElement extends Element native "*SVGElement" {
// Wrap the SVG string in <svg> so that SvgElements are created, rather than
// HTMLElements.
container.innerHTML = '<svg version="1.1">$svg</svg>';
- this.elements = container.elements[0].elements;
+ this.children = container.children[0].children;
}
« no previous file with comments | « sdk/lib/html/templates/html/impl/impl_SvgElement.darttemplate ('k') | sdk/lib/svg/dartium/svg_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698