Index: Source/core/xml/parser/XMLDocumentParser.cpp |
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp |
index d3c85bf5333fd41df8a1a1bc65e9aa9d22892785..a55bd1acf49c8c754a2cb2ee97637ba991eb4b63 100644 |
--- a/Source/core/xml/parser/XMLDocumentParser.cpp |
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp |
@@ -974,8 +974,8 @@ void XMLDocumentParser::startElementNs(const AtomicString& localName, const Atom |
if (m_view && currentNode->attached() && !newElement->attached()) |
newElement->attach(); |
- if (newElement->hasTagName(HTMLNames::htmlTag)) |
- static_cast<HTMLHtmlElement*>(newElement.get())->insertedByParser(); |
+ if (isHTMLHtmlElement(newElement.get())) |
+ toHTMLHtmlElement(newElement.get())->insertedByParser(); |
if (!m_parsingFragment && isFirstElement && document()->frame()) |
document()->frame()->loader()->dispatchDocumentElementAvailable(); |