summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLElementStack.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-08-11 14:44:44 +0100
committerBen Murdoch <benm@google.com>2010-08-12 19:15:41 +0100
commitdd8bb3de4f353a81954234999f1fea748aee2ea9 (patch)
tree729b52bf09294f0d6c67cd5ea80aee1b727b7bd8 /WebCore/html/HTMLElementStack.cpp
parentf3d41ba51d86bf719c7a65ab5297aea3c17e2d98 (diff)
downloadexternal_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.zip
external_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.tar.gz
external_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.tar.bz2
Merge WebKit at r65072 : Initial merge by git.
Change-Id: Ibcf418498376b2660aacb7f8d46ea7085ef91585
Diffstat (limited to 'WebCore/html/HTMLElementStack.cpp')
-rw-r--r--WebCore/html/HTMLElementStack.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/WebCore/html/HTMLElementStack.cpp b/WebCore/html/HTMLElementStack.cpp
index 531a3b4..194753b 100644
--- a/WebCore/html/HTMLElementStack.cpp
+++ b/WebCore/html/HTMLElementStack.cpp
@@ -138,6 +138,23 @@ HTMLElementStack::~HTMLElementStack()
{
}
+bool HTMLElementStack::hasOnlyOneElement() const
+{
+ return !topRecord()->next();
+}
+
+bool HTMLElementStack::secondElementIsHTMLBodyElement() const
+{
+ // This is used the fragment case of <body> and <frameset> in the "in body"
+ // insertion mode.
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#parsing-main-inbody
+ ASSERT(m_htmlElement);
+ // If we have a body element, it must always be the second element on the
+ // stack, as we always start with an html element, and any other element
+ // would cause the implicit creation of a body element.
+ return !!m_bodyElement;
+}
+
void HTMLElementStack::popHTMLHeadElement()
{
ASSERT(top() == m_headElement);