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

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

Issue 948793003: Fix inconsistent frame detach behavior of ContainerNode::parserRemoveChild. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 1e0d9ff4d94ba3a2b715824b1d6f8ec6c518e108..3b77ddc0293371f09d9d80427d15e8b5bf96fd52 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -599,7 +599,8 @@ void ContainerNode::parserRemoveChild(Node& oldChild)
Node* prev = oldChild.previousSibling();
Node* next = oldChild.nextSibling();
- oldChild.updateAncestorConnectedSubframeCountForRemoval();
+ if (oldChild.connectedSubframeCount())
+ ChildFrameDisconnector(oldChild).disconnect();
ChildListMutationScope(*this).willRemoveChild(oldChild);
oldChild.notifyMutationObserversNodeWillDetach();

Powered by Google App Engine
This is Rietveld 408576698