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

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

Issue 16335012: Fixing some of the tests disabled from the chrome IDL roll. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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_DocumentFragment.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate b/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate
index e1a77e7b1d6e03579ffaaf8de49200528eccd533..0f8a72b4248e5c02e39f6e10ea9da53ab6b1741a 100644
--- a/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate
+++ b/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate
@@ -5,11 +5,24 @@
part of $LIBRARYNAME;
$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- factory $CLASSNAME.html(String html) =>
- _$(CLASSNAME)FactoryProvider.createDocumentFragment_html(html);
+ factory $CLASSNAME() => document.createDocumentFragment();
- factory $CLASSNAME.svg(String svgContent) =>
- _$(CLASSNAME)FactoryProvider.createDocumentFragment_svg(svgContent);
+ factory $CLASSNAME.html(String html) {
+ final fragment = new DocumentFragment();
+ fragment.innerHtml = html;
+ return fragment;
+ }
+
+ factory $CLASSNAME.svg(String svgContent) {
+ final fragment = new DocumentFragment();
+ final e = new svg.SvgSvgElement();
+ e.innerHtml = svgContent;
+
+ // Copy list first since we don't want liveness during iteration.
+ final List nodes = new List.from(e.nodes);
+ fragment.nodes.addAll(nodes);
+ return fragment;
+ }
$if DART2JS
// Native field is used only by Dart code so does not lead to instantiation

Powered by Google App Engine
This is Rietveld 408576698