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

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

Issue 18313005: Introduce isHTMLTableElement and toHTMLTableElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Retry Created 7 years, 5 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
« no previous file with comments | « Source/core/html/parser/HTMLElementStack.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLTreeBuilder.cpp
diff --git a/Source/core/html/parser/HTMLTreeBuilder.cpp b/Source/core/html/parser/HTMLTreeBuilder.cpp
index 48f511cd276efdc40951896183fba287e9edccf4..ee860f1a0ffcd542e7a45daf48051fce68e0337f 100644
--- a/Source/core/html/parser/HTMLTreeBuilder.cpp
+++ b/Source/core/html/parser/HTMLTreeBuilder.cpp
@@ -36,6 +36,7 @@
#include "core/dom/DocumentFragment.h"
#include "core/html/HTMLFormElement.h"
#include "core/html/HTMLOptGroupElement.h"
+#include "core/html/HTMLTableElement.h"
#include "core/html/parser/AtomicHTMLToken.h"
#include "core/html/parser/HTMLDocumentParser.h"
#include "core/html/parser/HTMLParserIdioms.h"
@@ -1620,7 +1621,7 @@ void HTMLTreeBuilder::resetInsertionModeAppropriately()
if (item->hasTagName(colgroupTag)) {
return setInsertionMode(InColumnGroupMode);
}
- if (item->hasTagName(tableTag))
+ if (isHTMLTableElement(item->node()))
return setInsertionMode(InTableMode);
if (item->hasTagName(headTag)) {
if (!m_fragmentContext.fragment() || m_fragmentContext.contextElement() != item->node())
@@ -2330,7 +2331,7 @@ ReprocessBuffer:
ASSERT(insertionMode() == InTableMode || insertionMode() == InTableBodyMode || insertionMode() == InRowMode);
ASSERT(m_pendingTableCharacters.isEmpty());
if (m_tree.currentStackItem()->isElementNode()
- && (m_tree.currentStackItem()->hasTagName(HTMLNames::tableTag)
+ && (isHTMLTableElement(m_tree.currentStackItem()->node())
|| m_tree.currentStackItem()->hasTagName(HTMLNames::tbodyTag)
|| m_tree.currentStackItem()->hasTagName(HTMLNames::tfootTag)
|| m_tree.currentStackItem()->hasTagName(HTMLNames::theadTag)
« no previous file with comments | « Source/core/html/parser/HTMLElementStack.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698