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

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

Issue 1117973003: parserInsertBefore and parserRemoveChild should check newChild for a parent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update comment. Created 5 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 | « Source/core/dom/ContainerNode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLConstructionSite.cpp
diff --git a/Source/core/html/parser/HTMLConstructionSite.cpp b/Source/core/html/parser/HTMLConstructionSite.cpp
index 487323dc18dee89d40c8c272a79e5c728eb2b2de..ed322ff4f772576ba84a706372a8677e009e8797 100644
--- a/Source/core/html/parser/HTMLConstructionSite.cpp
+++ b/Source/core/html/parser/HTMLConstructionSite.cpp
@@ -102,9 +102,6 @@ static inline void insert(HTMLConstructionSiteTask& task)
if (isHTMLTemplateElement(*task.parent))
task.parent = toHTMLTemplateElement(task.parent.get())->content();
- if (ContainerNode* parent = task.child->parentNode())
- parent->parserRemoveChild(*task.child);
-
if (task.nextChild)
task.parent->parserInsertBefore(task.child.get(), *task.nextChild);
else
@@ -150,9 +147,6 @@ static inline void executeReparentTask(HTMLConstructionSiteTask& task)
{
ASSERT(task.operation == HTMLConstructionSiteTask::Reparent);
- if (ContainerNode* parent = task.child->parentNode())
- parent->parserRemoveChild(*task.child);
-
task.parent->parserAppendChild(task.child);
}
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698