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

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

Issue 3403012: Merge 67357 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 3 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 | « WebCore/html/parser/HTMLTreeBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/html/parser/HTMLTreeBuilder.cpp
===================================================================
--- WebCore/html/parser/HTMLTreeBuilder.cpp (revision 67709)
+++ WebCore/html/parser/HTMLTreeBuilder.cpp (working copy)
@@ -1596,21 +1596,6 @@
return 0;
}
-// FIXME: This should have a whitty name.
-// FIXME: This must be implemented in many other places in WebCore.
-void HTMLTreeBuilder::reparentChildren(Element* oldParent, Element* newParent)
-{
- Node* child = oldParent->firstChild();
- while (child) {
- Node* nextChild = child->nextSibling();
- oldParent->parserRemoveChild(child);
- newParent->parserAddChild(child);
- if (newParent->attached() && !child->attached())
- child->attach();
- child = nextChild;
- }
-}
-
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#parsing-main-inbody
void HTMLTreeBuilder::callTheAdoptionAgency(AtomicHTMLToken& token)
{
@@ -1703,7 +1688,7 @@
// 8
RefPtr<Element> newElement = m_tree.createHTMLElementFromElementRecord(formattingElementRecord);
// 9
- reparentChildren(furthestBlock->element(), newElement.get());
+ newElement->takeAllChildrenFrom(furthestBlock->element());
// 10
Element* furthestBlockElement = furthestBlock->element();
// FIXME: All this creation / parserAddChild / attach business should
« no previous file with comments | « WebCore/html/parser/HTMLTreeBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698