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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2478573002: Make removeChild, parserRemoveChild and removeChildren more consistent. (Closed)
Patch Set: SubframeLoadingDisabler (oldChild) Created 4 years, 1 month 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: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index efdafbb7fdf63f77b1607c3fe6f9da43f9fb6e09..299e77e9ffece47ca1890bebf4ba8b3a5ce6aacd 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -4094,7 +4094,9 @@ void Document::didMoveTreeToNewDocument(const Node& root) {
}
void Document::nodeChildrenWillBeRemoved(ContainerNode& container) {
+ ScriptForbiddenScope scriptForbiddenScope;
EventDispatchForbiddenScope assertNoEventDispatch;
+
for (Range* range : m_ranges)
range->nodeChildrenWillBeRemoved(container);
@@ -4118,6 +4120,9 @@ void Document::nodeChildrenWillBeRemoved(ContainerNode& container) {
}
void Document::nodeWillBeRemoved(Node& n) {
+ ScriptForbiddenScope scriptForbiddenScope;
+ EventDispatchForbiddenScope assertNoEventDispatch;
+
for (NodeIterator* ni : m_nodeIterators)
ni->nodeWillBeRemoved(n);

Powered by Google App Engine
This is Rietveld 408576698