| Index: tools/dom/templates/html/impl/impl_Element.darttemplate
|
| diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| index 1b6b23f1946ad8d5468a7307bf75f4ad8dcca552..b2b4188691dbb051b438e5a74241751b72eb9c6d 100644
|
| --- a/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| @@ -1037,7 +1037,7 @@ $endif
|
| if (treeSanitizer is _TrustedHtmlTreeSanitizer) {
|
| _insertAdjacentHtml(where, html);
|
| } else {
|
| - _insertAdjacentNode(where, createFragment(html,
|
| + _insertAdjacentNode(where, new DocumentFragment.html(html,
|
| validator: validator, treeSanitizer: treeSanitizer));
|
| }
|
| }
|
| @@ -1335,9 +1335,7 @@ $endif
|
| _parseDocument.head.append(base);
|
| }
|
| var contextElement;
|
| - // Head and Area elements can't be used to create document fragments.
|
| - // Use the body instead.
|
| - if (this is BodyElement || _cannotBeUsedToCreateContextualFragment) {
|
| + if (this is BodyElement) {
|
| contextElement = _parseDocument.body;
|
| } else {
|
| contextElement = _parseDocument.createElement(tagName);
|
| @@ -1366,20 +1364,6 @@ $endif
|
| return fragment;
|
| }
|
|
|
| - /** Test if createContextualFragment is supported for this element types */
|
| - bool get _cannotBeUsedToCreateContextualFragment =>
|
| - _tagsForWhichCreateContextualFragmentIsNotSupported.contains(tagName);
|
| -
|
| - /**
|
| - * A hard-coded list of the tag names for which createContextualFragment
|
| - * isn't supported.
|
| - */
|
| - static const _tagsForWhichCreateContextualFragmentIsNotSupported =
|
| - const ['HEAD', 'AREA',
|
| - 'BASE', 'BASEFONT', 'BR', 'COL', 'COLGROUP', 'EMBED', 'FRAME', 'FRAMESET',
|
| - 'HR', 'IMAGE', 'IMG', 'INPUT', 'ISINDEX', 'LINK', 'META', 'PARAM',
|
| - 'SOURCE', 'STYLE', 'TITLE', 'WBR'];
|
| -
|
| /**
|
| * Parses the HTML fragment and sets it as the contents of this element.
|
| *
|
|
|