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

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

Issue 10377014: Merge 115763 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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 | « LayoutTests/html5lib/resources/webkit02.dat ('k') | Source/WebCore/html/parser/HTMLTreeBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/parser/HTMLElementStack.cpp
===================================================================
--- Source/WebCore/html/parser/HTMLElementStack.cpp (revision 116143)
+++ Source/WebCore/html/parser/HTMLElementStack.cpp (working copy)
@@ -386,10 +386,12 @@
Element* HTMLElementStack::oneBelowTop() const
{
- // We should never be calling this if it could be 0.
+ // We should never call this if there are fewer than 2 elements on the stack.
ASSERT(m_top);
ASSERT(m_top->next());
- return m_top->next()->element();
+ if (m_top->next()->node()->isElementNode())
+ return m_top->next()->element();
+ return 0;
}
Element* HTMLElementStack::bottom() const
« no previous file with comments | « LayoutTests/html5lib/resources/webkit02.dat ('k') | Source/WebCore/html/parser/HTMLTreeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698