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

Unified Diff: Source/WebCore/html/parser/HTMLConstructionSite.cpp

Issue 10736069: Merge 118589 - Fix for self-closing <use> tags (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « Source/WebCore/html/parser/HTMLConstructionSite.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/parser/HTMLConstructionSite.cpp
===================================================================
--- Source/WebCore/html/parser/HTMLConstructionSite.cpp (revision 122595)
+++ Source/WebCore/html/parser/HTMLConstructionSite.cpp (working copy)
@@ -106,11 +106,12 @@
task.child->finishParsingChildren();
}
-void HTMLConstructionSite::attachLater(ContainerNode* parent, PassRefPtr<Node> prpChild)
+void HTMLConstructionSite::attachLater(ContainerNode* parent, PassRefPtr<Node> prpChild, bool selfClosing)
{
HTMLConstructionSiteTask task;
task.parent = parent;
task.child = prpChild;
+ task.selfClosing = selfClosing;
if (shouldFosterParent()) {
fosterParent(task.child);
@@ -315,11 +316,10 @@
void HTMLConstructionSite::insertSelfClosingHTMLElement(AtomicHTMLToken& token)
{
ASSERT(token.type() == HTMLTokenTypes::StartTag);
- attachLater(currentNode(), createHTMLElement(token));
// Normally HTMLElementStack is responsible for calling finishParsingChildren,
// but self-closing elements are never in the element stack so the stack
// doesn't get a chance to tell them that we're done parsing their children.
- m_attachmentQueue.last().selfClosing = true;
+ attachLater(currentNode(), createHTMLElement(token), true);
// FIXME: Do we want to acknowledge the token's self-closing flag?
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#acknowledge-self-closing-flag
}
@@ -348,9 +348,7 @@
notImplemented(); // parseError when xmlns or xmlns:xlink are wrong.
RefPtr<Element> element = createElement(token, namespaceURI);
- attachLater(currentNode(), element);
- // FIXME: Don't we need to set the selfClosing flag on the task if we're
- // not going to push the element on to the stack of open elements?
+ attachLater(currentNode(), element, token.selfClosing());
if (!token.selfClosing())
m_openElements.push(element.release());
}
« no previous file with comments | « Source/WebCore/html/parser/HTMLConstructionSite.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698