Index: Source/core/html/parser/HTMLElementStack.cpp |
diff --git a/Source/core/html/parser/HTMLElementStack.cpp b/Source/core/html/parser/HTMLElementStack.cpp |
index 1c2e2fa4091c846b82202755ae0203f879837d3c..8953dbd5b1f3347f06ff77a261292309c15f9ce4 100644 |
--- a/Source/core/html/parser/HTMLElementStack.cpp |
+++ b/Source/core/html/parser/HTMLElementStack.cpp |
@@ -31,6 +31,7 @@ |
#include "MathMLNames.h" |
#include "SVGNames.h" |
#include "core/dom/Element.h" |
+#include "core/html/HTMLHtmlElement.h" |
#include "core/html/HTMLOptGroupElement.h" |
#include "core/html/HTMLTableElement.h" |
#include <wtf/PassOwnPtr.h> |
@@ -45,7 +46,7 @@ namespace { |
inline bool isRootNode(HTMLStackItem* item) |
{ |
return item->isDocumentFragmentNode() |
- || item->hasTagName(htmlTag); |
+ || isHTMLHtmlElement(item->node()); |
} |
inline bool isScopeMarker(HTMLStackItem* item) |
@@ -309,7 +310,7 @@ void HTMLElementStack::pushRootNode(PassRefPtr<HTMLStackItem> rootItem) |
void HTMLElementStack::pushHTMLHtmlElement(PassRefPtr<HTMLStackItem> item) |
{ |
- ASSERT(item->hasTagName(HTMLNames::htmlTag)); |
+ ASSERT(isHTMLHtmlElement(item->node())); |
pushRootNodeCommon(item); |
} |
@@ -339,7 +340,7 @@ void HTMLElementStack::pushHTMLBodyElement(PassRefPtr<HTMLStackItem> item) |
void HTMLElementStack::push(PassRefPtr<HTMLStackItem> item) |
{ |
- ASSERT(!item->hasTagName(HTMLNames::htmlTag)); |
+ ASSERT(!isHTMLHtmlElement(item->node())); |
ASSERT(!item->hasTagName(HTMLNames::headTag)); |
ASSERT(!item->hasTagName(HTMLNames::bodyTag)); |
ASSERT(m_rootNode); |
@@ -351,7 +352,7 @@ void HTMLElementStack::insertAbove(PassRefPtr<HTMLStackItem> item, ElementRecord |
ASSERT(item); |
ASSERT(recordBelow); |
ASSERT(m_top); |
- ASSERT(!item->hasTagName(HTMLNames::htmlTag)); |
+ ASSERT(!isHTMLHtmlElement(item->node())); |
ASSERT(!item->hasTagName(HTMLNames::headTag)); |
ASSERT(!item->hasTagName(HTMLNames::bodyTag)); |
ASSERT(m_rootNode); |
@@ -566,7 +567,7 @@ void HTMLElementStack::pushCommon(PassRefPtr<HTMLStackItem> item) |
void HTMLElementStack::popCommon() |
{ |
- ASSERT(!topStackItem()->hasTagName(HTMLNames::htmlTag)); |
+ ASSERT(!isHTMLHtmlElement(topStackItem()->node())); |
ASSERT(!topStackItem()->hasTagName(HTMLNames::headTag) || !m_headElement); |
ASSERT(!topStackItem()->hasTagName(HTMLNames::bodyTag) || !m_bodyElement); |
top()->finishParsingChildren(); |
@@ -577,7 +578,7 @@ void HTMLElementStack::popCommon() |
void HTMLElementStack::removeNonTopCommon(Element* element) |
{ |
- ASSERT(!element->hasTagName(HTMLNames::htmlTag)); |
+ ASSERT(!isHTMLHtmlElement(element)); |
ASSERT(!element->hasTagName(HTMLNames::bodyTag)); |
ASSERT(top() != element); |
for (ElementRecord* pos = m_top.get(); pos; pos = pos->next()) { |