<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[160182] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/160182">160182</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2013-12-05 11:45:29 -0800 (Thu, 05 Dec 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Change how the form element pointer affects parsing template elements, to reduce weirdness in templates
https://bugs.webkit.org/show_bug.cgi?id=125279
Reviewed by Antti Koivisto.
Source/WebCore:
Faithfully update the HTML5 parser after http://html5.org/tools/web-apps-tracker?from=8330&to=8331.
Test: fast/dom/HTMLTemplateElement/no-form-association-2.html
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertHTMLFormElement): Don't the form element pointer if the context
element or its ancestor is a template element.
(WebCore::HTMLConstructionSite::insideTemplateElement): Added.
(WebCore::HTMLConstructionSite::createHTMLElement): Renamed openElementsContainTemplateElement to
insideTemplateElement to reflect the true semantics of the boolean.
* html/parser/HTMLConstructionSite.h:
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): Ignore the form element pointer if there
is a template element on the stack of open elements. This faithfully reflects what's being said in the
specification. We should probably make isParsingTemplateContents more efficient by storing a boolean
and then wrap from() in some helper function but that should probbaly happen in a separate patch.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInBody): Don't unset or rely on the form element pointer
when there is a template element on the stack of open elements.
* html/parser/HTMLTreeBuilder.h:
(WebCore::HTMLTreeBuilder::isParsingTemplateContents): Added a trivial implementation for when
TEMPLATE_ELEMENT is disabled.
(WebCore::HTMLTreeBuilder::isParsingFragmentOrTemplateContents): Merged two implementations.
LayoutTests:
Added a regression test. Someone should port this test into web-platform-tests once the latest spec.
change has been refelcted to a working draft version of the HTML5 specification.
* fast/dom/HTMLTemplateElement/no-form-association-2-expected.txt: Added.
* fast/dom/HTMLTemplateElement/no-form-association-2.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLConstructionSitecpp">trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLConstructionSiteh">trunk/Source/WebCore/html/parser/HTMLConstructionSite.h</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLTreeBuildercpp">trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLTreeBuilderh">trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomHTMLTemplateElementnoformassociation2expectedtxt">trunk/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLTemplateElementnoformassociation2html">trunk/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association-2.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (160181 => 160182)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2013-12-05 19:23:03 UTC (rev 160181)
+++ trunk/LayoutTests/ChangeLog        2013-12-05 19:45:29 UTC (rev 160182)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2013-12-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ Change how the form element pointer affects parsing template elements, to reduce weirdness in templates
+ https://bugs.webkit.org/show_bug.cgi?id=125279
+
+ Reviewed by Antti Koivisto.
+
+ Added a regression test. Someone should port this test into web-platform-tests once the latest spec.
+ change has been refelcted to a working draft version of the HTML5 specification.
+
+ * fast/dom/HTMLTemplateElement/no-form-association-2-expected.txt: Added.
+ * fast/dom/HTMLTemplateElement/no-form-association-2.html: Added.
+
</ins><span class="cx"> 2013-12-05 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
</span><span class="cx">
</span><span class="cx"> [MediaStream] Firing negotiationneeded event upon track add/remove on MediaStream
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLTemplateElementnoformassociation2expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association-2-expected.txt (0 => 160182)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association-2-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association-2-expected.txt        2013-12-05 19:45:29 UTC (rev 160182)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+PASS templateWithIsindex.innerHTML is containerWithIsindex.innerHTML
+PASS templateWithFormInsideForm.innerHTML is '<form><input></form>'
+PASS formInsideTemplate = templateWithFormInsideForm.content.firstChild; formInsideTemplate.localName is 'form'
+PASS inputInsideTemplate = templateWithFormInsideForm.content.querySelector('input'); inputInsideTemplate.form is formInsideTemplate
+PASS formInsideTemplate.elements[0] is inputInsideTemplate
+PASS templateWithNestedForms.innerHTML is '<form><form></form></form>'
+PASS templateWithIsindexInsideForm.innerHTML is '<form>' + containerWithIsindex.innerHTML + '</form>'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLTemplateElementnoformassociation2html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association-2.html (0 => 160182)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association-2.html         (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLTemplateElement/no-form-association-2.html        2013-12-05 19:45:29 UTC (rev 160182)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+<div id="containerWithIsindex" style="display:none"><isindex></div>
+<form><template id="templateWithIsindex"><isindex></template></form>
+<form><template id="templateWithFormInsideForm"><form><input></form></template></form>
+<template id="templateWithNestedForms"><form><form></form></form></template>
+<template id="templateWithIsindexInsideForm"><form><isindex></form></template>
+<script src="../../../resources/js-test-pre.js"></script>
+<script>
+
+shouldBe("templateWithIsindex.innerHTML", "containerWithIsindex.innerHTML");
+shouldBe("templateWithFormInsideForm.innerHTML", "'<form><input></form>'");
+shouldBe("formInsideTemplate = templateWithFormInsideForm.content.firstChild; formInsideTemplate.localName", "'form'");
+shouldBe("inputInsideTemplate = templateWithFormInsideForm.content.querySelector('input'); inputInsideTemplate.form", "formInsideTemplate");
+shouldBe("formInsideTemplate.elements[0]", "inputInsideTemplate");
+shouldBe("templateWithNestedForms.innerHTML", "'<form><form></form></form>'")
+shouldBe("templateWithIsindexInsideForm.innerHTML", "'<form>' + containerWithIsindex.innerHTML + '</form>'")
+
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (160181 => 160182)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-05 19:23:03 UTC (rev 160181)
+++ trunk/Source/WebCore/ChangeLog        2013-12-05 19:45:29 UTC (rev 160182)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2013-12-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ Change how the form element pointer affects parsing template elements, to reduce weirdness in templates
+ https://bugs.webkit.org/show_bug.cgi?id=125279
+
+ Reviewed by Antti Koivisto.
+
+ Faithfully update the HTML5 parser after http://html5.org/tools/web-apps-tracker?from=8330&to=8331.
+
+ Test: fast/dom/HTMLTemplateElement/no-form-association-2.html
+
+ * html/parser/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::insertHTMLFormElement): Don't the form element pointer if the context
+ element or its ancestor is a template element.
+ (WebCore::HTMLConstructionSite::insideTemplateElement): Added.
+ (WebCore::HTMLConstructionSite::createHTMLElement): Renamed openElementsContainTemplateElement to
+ insideTemplateElement to reflect the true semantics of the boolean.
+
+ * html/parser/HTMLConstructionSite.h:
+
+ * html/parser/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): Ignore the form element pointer if there
+ is a template element on the stack of open elements. This faithfully reflects what's being said in the
+ specification. We should probably make isParsingTemplateContents more efficient by storing a boolean
+ and then wrap from() in some helper function but that should probbaly happen in a separate patch.
+ (WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
+ (WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
+ (WebCore::HTMLTreeBuilder::processEndTagForInBody): Don't unset or rely on the form element pointer
+ when there is a template element on the stack of open elements.
+
+ * html/parser/HTMLTreeBuilder.h:
+ (WebCore::HTMLTreeBuilder::isParsingTemplateContents): Added a trivial implementation for when
+ TEMPLATE_ELEMENT is disabled.
+ (WebCore::HTMLTreeBuilder::isParsingFragmentOrTemplateContents): Merged two implementations.
+
</ins><span class="cx"> 2013-12-05 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
</span><span class="cx">
</span><span class="cx"> [MediaStream] Firing negotiationneeded event upon track add/remove on MediaStream
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLConstructionSitecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp (160181 => 160182)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp        2013-12-05 19:23:03 UTC (rev 160181)
+++ trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp        2013-12-05 19:45:29 UTC (rev 160182)
</span><span class="lines">@@ -411,10 +411,12 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<Element> element = createHTMLElement(token);
</span><span class="cx"> ASSERT(isHTMLFormElement(element.get()));
</span><del>- m_form = static_pointer_cast<HTMLFormElement>(element.release());
- m_form->setDemoted(isDemoted);
- attachLater(currentNode(), m_form);
- m_openElements.push(HTMLStackItem::create(m_form, token));
</del><ins>+ RefPtr<HTMLFormElement> form = static_pointer_cast<HTMLFormElement>(element.release());
+ if (!insideTemplateElement())
+ m_form = form;
+ form->setDemoted(isDemoted);
+ attachLater(currentNode(), form);
+ m_openElements.push(HTMLStackItem::create(form.release(), token));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void HTMLConstructionSite::insertHTMLElement(AtomicHTMLToken* token)
</span><span class="lines">@@ -537,6 +539,11 @@
</span><span class="cx"> return currentNode()->document();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline bool HTMLConstructionSite::insideTemplateElement()
+{
+ return !ownerDocumentForCurrentNode().frame();
+}
+
</ins><span class="cx"> PassRefPtr<Element> HTMLConstructionSite::createHTMLElement(AtomicHTMLToken* token)
</span><span class="cx"> {
</span><span class="cx"> QualifiedName tagName(nullAtom, token->name(), xhtmlNamespaceURI);
</span><span class="lines">@@ -545,8 +552,8 @@
</span><span class="cx"> // to occur after construction to allow better code sharing here.
</span><span class="cx"> // http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#create-an-element-for-the-token
</span><span class="cx"> Document& ownerDocument = ownerDocumentForCurrentNode();
</span><del>- bool openElementsContainTemplateElement = !ownerDocument.frame();
- RefPtr<Element> element = HTMLElementFactory::createElement(tagName, ownerDocument, openElementsContainTemplateElement ? nullptr : form(), true);
</del><ins>+ bool insideTemplateElement = !ownerDocument.frame();
+ RefPtr<Element> element = HTMLElementFactory::createElement(tagName, ownerDocument, insideTemplateElement ? nullptr : form(), true);
</ins><span class="cx"> setAttributes(element.get(), token, m_parserContentPolicy);
</span><span class="cx"> ASSERT(element->isHTMLElement());
</span><span class="cx"> return element.release();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLConstructionSiteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLConstructionSite.h (160181 => 160182)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLConstructionSite.h        2013-12-05 19:23:03 UTC (rev 160181)
+++ trunk/Source/WebCore/html/parser/HTMLConstructionSite.h        2013-12-05 19:45:29 UTC (rev 160182)
</span><span class="lines">@@ -119,6 +119,7 @@
</span><span class="cx"> HTMLStackItem* currentStackItem() const { return m_openElements.topStackItem(); }
</span><span class="cx"> HTMLStackItem* oneBelowTop() const { return m_openElements.oneBelowTop(); }
</span><span class="cx"> Document& ownerDocumentForCurrentNode();
</span><ins>+ bool insideTemplateElement();
</ins><span class="cx"> HTMLElementStack* openElements() const { return &m_openElements; }
</span><span class="cx"> HTMLFormattingElementList* activeFormattingElements() const { return &m_activeFormattingElements; }
</span><span class="cx"> bool currentIsRootNode() { return m_openElements.topNode() == m_openElements.rootNode(); }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLTreeBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp (160181 => 160182)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp        2013-12-05 19:23:03 UTC (rev 160181)
+++ trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp        2013-12-05 19:45:29 UTC (rev 160182)
</span><span class="lines">@@ -462,7 +462,7 @@
</span><span class="cx"> ASSERT(token->type() == HTMLToken::StartTag);
</span><span class="cx"> ASSERT(token->name() == isindexTag);
</span><span class="cx"> parseError(token);
</span><del>- if (m_tree.form())
</del><ins>+ if (m_tree.form() && !isParsingTemplateContents())
</ins><span class="cx"> return;
</span><span class="cx"> notImplemented(); // Acknowledge self-closing flag
</span><span class="cx"> processFakeStartTag(formTag);
</span><span class="lines">@@ -700,7 +700,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> if (token->name() == formTag) {
</span><del>- if (m_tree.form()) {
</del><ins>+ if (m_tree.form() && !isParsingTemplateContents()) {
</ins><span class="cx"> parseError(token);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -1051,7 +1051,7 @@
</span><span class="cx"> }
</span><span class="cx"> if (token->name() == formTag) {
</span><span class="cx"> parseError(token);
</span><del>- if (m_tree.form())
</del><ins>+ if (m_tree.form() && !isParsingTemplateContents())
</ins><span class="cx"> return;
</span><span class="cx"> m_tree.insertHTMLFormElement(token, true);
</span><span class="cx"> m_tree.openElements()->pop();
</span><span class="lines">@@ -1864,15 +1864,26 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> if (token->name() == formTag) {
</span><del>- RefPtr<Element> node = m_tree.takeForm();
- if (!node || !m_tree.openElements()->inScope(node.get())) {
- parseError(token);
- return;
</del><ins>+ if (!isParsingTemplateContents()) {
+ RefPtr<Element> node = m_tree.takeForm();
+ if (!node || !m_tree.openElements()->inScope(node.get())) {
+ parseError(token);
+ return;
+ }
+ m_tree.generateImpliedEndTags();
+ if (m_tree.currentNode() != node.get())
+ parseError(token);
+ m_tree.openElements()->remove(node.get());
+ } else {
+ if (!m_tree.openElements()->inScope(token->name())) {
+ parseError(token);
+ return;
+ }
+ m_tree.generateImpliedEndTags();
+ if (!m_tree.currentNode()->hasTagName(formTag))
+ parseError(token);
+ m_tree.openElements()->popUntilPopped(token->name());
</ins><span class="cx"> }
</span><del>- m_tree.generateImpliedEndTags();
- if (m_tree.currentElement() != node.get())
- parseError(token);
- m_tree.openElements()->remove(node.get());
</del><span class="cx"> }
</span><span class="cx"> if (token->name() == pTag) {
</span><span class="cx"> if (!m_tree.openElements()->inButtonScope(token->name())) {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLTreeBuilderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h (160181 => 160182)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h        2013-12-05 19:23:03 UTC (rev 160181)
+++ trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h        2013-12-05 19:45:29 UTC (rev 160182)
</span><span class="lines">@@ -72,10 +72,10 @@
</span><span class="cx"> bool isParsingFragment() const { return !!m_fragmentContext.fragment(); }
</span><span class="cx"> #if ENABLE(TEMPLATE_ELEMENT)
</span><span class="cx"> bool isParsingTemplateContents() const { return m_tree.openElements()->hasTemplateInHTMLScope(); }
</span><del>- bool isParsingFragmentOrTemplateContents() const { return isParsingFragment() || isParsingTemplateContents(); }
</del><span class="cx"> #else
</span><del>- bool isParsingFragmentOrTemplateContents() const { return isParsingFragment(); }
</del><ins>+ bool isParsingTemplateContents() const { return false; }
</ins><span class="cx"> #endif
</span><ins>+ bool isParsingFragmentOrTemplateContents() const { return isParsingFragment() || isParsingTemplateContents(); }
</ins><span class="cx">
</span><span class="cx"> void detach();
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>