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

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

Issue 12088052: Merge 140101 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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/parser/foster-parent-adopted2-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/HTMLConstructionSite.cpp
===================================================================
--- Source/WebCore/html/parser/HTMLConstructionSite.cpp (revision 141140)
+++ Source/WebCore/html/parser/HTMLConstructionSite.cpp (working copy)
@@ -391,6 +391,10 @@
currentPosition += textNode->length();
ASSERT(currentPosition <= characters.length());
task.child = textNode.release();
+
+ if (task.parent->document() != task.child->document())
+ task.parent->document()->adoptNode(task.child, ASSERT_NO_EXCEPTION);
+
executeTask(task);
}
}
@@ -522,6 +526,10 @@
findFosterSite(task);
task.child = node;
ASSERT(task.parent);
+
+ if (task.parent->document() != task.child->document())
+ task.parent->document()->adoptNode(task.child, ASSERT_NO_EXCEPTION);
+
m_attachmentQueue.append(task);
}
« no previous file with comments | « LayoutTests/fast/parser/foster-parent-adopted2-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698