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

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

Issue 199383004: Postpone mutation event dispatch in Selection.deleteFromDocument (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Scoping Range event Created 6 years, 9 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/editing/selection/resources/deleteFromDocument-scoped-dispatch-event-crash-iframe.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Range.cpp
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp
index 39bf7d695393349c716276472cd21222eae0fceb..68bad1c5c0bdd43f804cbd905718eb4eb27c45b2 100644
--- a/Source/core/dom/Range.cpp
+++ b/Source/core/dom/Range.cpp
@@ -34,12 +34,12 @@
#include "core/dom/NodeTraversal.h"
#include "core/dom/NodeWithIndex.h"
#include "core/dom/ProcessingInstruction.h"
-#include "core/events/ScopedEventQueue.h"
#include "core/dom/Text.h"
#include "core/editing/TextIterator.h"
#include "core/editing/VisiblePosition.h"
#include "core/editing/VisibleUnits.h"
#include "core/editing/markup.h"
+#include "core/events/ScopedEventQueue.h"
#include "core/html/HTMLElement.h"
#include "core/rendering/RenderBoxModelObject.h"
#include "core/rendering/RenderText.h"
@@ -565,7 +565,10 @@ void Range::deleteContents(ExceptionState& exceptionState)
if (exceptionState.hadException())
return;
- processContents(DELETE_CONTENTS, exceptionState);
+ {
+ EventQueueScope eventQueueScope;
+ processContents(DELETE_CONTENTS, exceptionState);
+ }
}
bool Range::intersectsNode(Node* refNode, ExceptionState& exceptionState)
« no previous file with comments | « LayoutTests/editing/selection/resources/deleteFromDocument-scoped-dispatch-event-crash-iframe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698