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

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

Issue 14629026: Fix an assertion failure in Range::textNodeSplit by Text::splitText. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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/Range/split-text-in-range-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/Text.cpp
diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp
index 21cb569f9a70ef3fbd1ea7f3f8fca629cd5091b1..e14f88ec298de11db2d974005912a6676eda596d 100644
--- a/Source/core/dom/Text.cpp
+++ b/Source/core/dom/Text.cpp
@@ -25,6 +25,7 @@
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExceptionCodePlaceholder.h"
#include "core/dom/NodeRenderingContext.h"
+#include "core/dom/ScopedEventQueue.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/rendering/RenderCombineText.h"
#include "core/rendering/RenderText.h"
@@ -69,6 +70,7 @@ PassRefPtr<Text> Text::splitText(unsigned offset, ExceptionCode& ec)
return 0;
}
+ EventQueueScope scope;
String oldStr = data();
RefPtr<Text> newText = cloneWithData(oldStr.substring(offset));
setDataWithoutUpdate(oldStr.substring(0, offset));
« no previous file with comments | « LayoutTests/fast/dom/Range/split-text-in-range-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698