| 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());
|
| }
|
|
|