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

Unified Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp

Issue 2693863003: [InputEvent] Change |getTargetRanges()| to return current selection by default (Closed)
Patch Set: yosin's review: Use const Node&, add null checks Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
index 39f656bd80f971432481a3cbc18069076151a6c9..5532d32b845d6a5547bde358e1e205171f647aaa 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -846,17 +846,14 @@ void SpellChecker::replaceMisspelledRange(const String& text) {
// Dispatch 'beforeinput'.
Element* const target = frame().editor().findEventTargetFromSelection();
- Range* const range = createRange(markerRange);
- RangeVector* const ranges = new RangeVector(1, range);
DataTransfer* const dataTransfer = DataTransfer::create(
DataTransfer::DataTransferType::InsertReplacementText,
DataTransferAccessPolicy::DataTransferReadable,
DataObject::createFromString(text));
- const bool cancel =
- dispatchBeforeInputDataTransfer(
- target, InputEvent::InputType::InsertReplacementText, dataTransfer,
- ranges) != DispatchEventResult::NotCanceled;
+ const bool cancel = dispatchBeforeInputDataTransfer(
+ target, InputEvent::InputType::InsertReplacementText,
+ dataTransfer) != DispatchEventResult::NotCanceled;
// 'beforeinput' event handler may destroy target frame.
if (currentDocument != frame().document())
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698