| Index: third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
|
| index e40177f6081aa854534c78ef80d5941220094e16..48def60177b066daa1ab382406affcc826fc7675 100644
|
| --- a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
|
| +++ b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
|
| @@ -738,10 +738,15 @@ void HTMLConstructionSite::takeAllChildren(HTMLStackItem* newParent, HTMLElement
|
| queueTask(task);
|
| }
|
|
|
| +CreateElementFlags HTMLConstructionSite::getCreateElementFlags() const
|
| +{
|
| + return m_isParsingFragment ? CreatedByFragmentParser : CreatedByParser;
|
| +}
|
| +
|
| Element* HTMLConstructionSite::createElement(AtomicHTMLToken* token, const AtomicString& namespaceURI)
|
| {
|
| QualifiedName tagName(nullAtom, token->name(), namespaceURI);
|
| - Element* element = ownerDocumentForCurrentNode().createElement(tagName, true);
|
| + Element* element = ownerDocumentForCurrentNode().createElement(tagName, getCreateElementFlags());
|
| setAttributes(element, token, m_parserContentPolicy);
|
| return element;
|
| }
|
| @@ -762,7 +767,7 @@ HTMLElement* HTMLConstructionSite::createHTMLElement(AtomicHTMLToken* token)
|
| // FIXME: This can't use HTMLConstructionSite::createElement because we
|
| // have to pass the current form element. We should rework form association
|
| // to occur after construction to allow better code sharing here.
|
| - HTMLElement* element = HTMLElementFactory::createHTMLElement(token->name(), document, form, true);
|
| + HTMLElement* element = HTMLElementFactory::createHTMLElement(token->name(), document, form, getCreateElementFlags());
|
| setAttributes(element, token, m_parserContentPolicy);
|
| return element;
|
| }
|
|
|