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

Unified Diff: Source/core/html/parser/HTMLElementStack.cpp

Issue 198453003: Use new is*Element() helper functions more in HTML code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 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
Index: Source/core/html/parser/HTMLElementStack.cpp
diff --git a/Source/core/html/parser/HTMLElementStack.cpp b/Source/core/html/parser/HTMLElementStack.cpp
index 5bf3a14a1b4cde3d942a546f1212841b5ba2da1f..ccbbdd87ace9cab855ba06270409954e9d0d9d5d 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/HTMLElement.h"
namespace WebCore {
@@ -400,7 +401,7 @@ void HTMLElementStack::removeHTMLHeadElement(Element* element)
void HTMLElementStack::remove(Element* element)
{
- ASSERT(!element->hasTagName(HTMLNames::headTag));
+ ASSERT(!isHTMLHeadElement(element));
if (m_top->element() == element) {
pop();
return;
@@ -576,8 +577,8 @@ void HTMLElementStack::popCommon()
void HTMLElementStack::removeNonTopCommon(Element* element)
{
- ASSERT(!element->hasTagName(htmlTag));
- ASSERT(!element->hasTagName(bodyTag));
+ ASSERT(!isHTMLHtmlElement(element));
+ ASSERT(!isHTMLBodyElement(element));
ASSERT(top() != element);
for (ElementRecord* pos = m_top.get(); pos; pos = pos->next()) {
if (pos->next()->element() == element) {

Powered by Google App Engine
This is Rietveld 408576698