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

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

Issue 7693023: Merge 93032 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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/fast/html/process-end-tag-for-inbody-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/parser/HTMLTreeBuilder.cpp
===================================================================
--- Source/WebCore/html/parser/HTMLTreeBuilder.cpp (revision 93497)
+++ Source/WebCore/html/parser/HTMLTreeBuilder.cpp (working copy)
@@ -605,13 +605,13 @@
m_framesetOk = false;
HTMLElementStack::ElementRecord* nodeRecord = m_tree.openElements()->topRecord();
while (1) {
- ContainerNode* node = nodeRecord->node();
- if (shouldClose(node)) {
+ RefPtr<ContainerNode> node = nodeRecord->node();
+ if (shouldClose(node.get())) {
ASSERT(node->isElementNode());
- processFakeEndTag(toElement(node)->tagQName());
+ processFakeEndTag(toElement(node.get())->tagQName());
break;
}
- if (isSpecialNode(node) && !node->hasTagName(addressTag) && !node->hasTagName(divTag) && !node->hasTagName(pTag))
+ if (isSpecialNode(node.get()) && !node->hasTagName(addressTag) && !node->hasTagName(divTag) && !node->hasTagName(pTag))
break;
nodeRecord = nodeRecord->next();
}
@@ -1556,7 +1556,7 @@
ASSERT(token.type() == HTMLTokenTypes::EndTag);
HTMLElementStack::ElementRecord* record = m_tree.openElements()->topRecord();
while (1) {
- ContainerNode* node = record->node();
+ RefPtr<ContainerNode> node = record->node();
if (node->hasLocalName(token.name())) {
m_tree.generateImpliedEndTags();
// FIXME: The ElementRecord pointed to by record might be deleted by
@@ -1570,13 +1570,13 @@
// http://www.w3.org/Bugs/Public/show_bug.cgi?id=10080
// We might have already popped the node for the token in
// generateImpliedEndTags, just abort.
- if (!m_tree.openElements()->contains(toElement(node)))
+ if (!m_tree.openElements()->contains(toElement(node.get())))
return;
}
- m_tree.openElements()->popUntilPopped(toElement(node));
+ m_tree.openElements()->popUntilPopped(toElement(node.get()));
return;
}
- if (isSpecialNode(node)) {
+ if (isSpecialNode(node.get())) {
parseError(token);
return;
}
@@ -1633,7 +1633,7 @@
}
// 4.
ASSERT(furthestBlock->isAbove(formattingElementRecord));
- ContainerNode* commonAncestor = formattingElementRecord->next()->node();
+ RefPtr<ContainerNode> commonAncestor = formattingElementRecord->next()->node();
// 5.
HTMLFormattingElementList::Bookmark bookmark = m_tree.activeFormattingElements()->bookmarkFor(formattingElement);
// 6.
« no previous file with comments | « LayoutTests/fast/html/process-end-tag-for-inbody-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698