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

Unified Diff: Source/core/dom/Element.cpp

Issue 17583003: Set Attr.ownerDocument in Element#setAttributeNode() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed the point. Created 7 years, 6 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/dom/Attr/set-attribute-node-from-iframe-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 941c660a172350af91c10c8e51d2f704c79794d4..5f0e0f66fd2929ef2562836ef10785be0b94c6d3 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1809,6 +1809,7 @@ PassRefPtr<Attr> Element::setAttributeNode(Attr* attrNode, ExceptionCode& ec)
setAttributeInternal(index, attrNode->qualifiedName(), attrNode->value(), NotInSynchronizationOfLazyAttribute);
attrNode->attachToElement(this);
+ treeScope()->adoptIfNeeded(attrNode);
ensureAttrNodeListForElement(this)->append(attrNode);
return oldAttrNode.release();
« no previous file with comments | « LayoutTests/fast/dom/Attr/set-attribute-node-from-iframe-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698