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

Unified Diff: Source/WebCore/dom/ContainerNodeAlgorithms.cpp

Issue 11273086: Merge 131709 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 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/forms/textarea/textarea-autofocus-removal-while-focusing-with-style-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/dom/ContainerNodeAlgorithms.cpp
===================================================================
--- Source/WebCore/dom/ContainerNodeAlgorithms.cpp (revision 132829)
+++ Source/WebCore/dom/ContainerNodeAlgorithms.cpp (working copy)
@@ -48,8 +48,10 @@
if (ElementShadow* shadow = toElement(node)->shadow()) {
ShadowRootVector roots(shadow);
- for (size_t i = 0; i < roots.size(); ++i)
- notifyNodeInsertedIntoDocument(roots[i].get());
+ for (size_t i = 0; i < roots.size(); ++i) {
+ if (node->inDocument() && roots[i]->host() == node)
+ notifyNodeInsertedIntoDocument(roots[i].get());
+ }
}
}
@@ -83,8 +85,10 @@
if (ElementShadow* shadow = toElement(node)->shadow()) {
ShadowRootVector roots(shadow);
- for (size_t i = 0; i < roots.size(); ++i)
- notifyNodeRemovedFromDocument(roots[i].get());
+ for (size_t i = 0; i < roots.size(); ++i) {
+ if (!node->inDocument() && roots[i]->host() == node)
+ notifyNodeRemovedFromDocument(roots[i].get());
+ }
}
}
« no previous file with comments | « LayoutTests/fast/forms/textarea/textarea-autofocus-removal-while-focusing-with-style-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698