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

Unified Diff: third_party/WebKit/Source/core/editing/InputMethodController.cpp

Issue 2693863003: [InputEvent] Change |getTargetRanges()| to return current selection by default (Closed)
Patch Set: 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
Index: third_party/WebKit/Source/core/editing/InputMethodController.cpp
diff --git a/third_party/WebKit/Source/core/editing/InputMethodController.cpp b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
index dd5e4e66636284921fc638683c840c8320d37608..142838fa1fef075bc9d426ebcb37566a6b6d26d3 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
@@ -821,11 +821,10 @@ void InputMethodController::extendSelectionAndDelete(int before, int after) {
++before;
} while (frame().selection().start() == frame().selection().end() &&
before <= static_cast<int>(selectionOffsets.start()));
- Range* const range = firstRangeOf(frame().selection().selection());
// TODO(chongz): Find a way to distinguish Forward and Backward.
- dispatchBeforeInputEditorCommand(document().focusedElement(),
- InputEvent::InputType::DeleteContentBackward,
- new RangeVector(1, range));
+ dispatchBeforeInputEditorCommand(
+ document().focusedElement(), InputEvent::InputType::DeleteContentBackward,
+ targetRangesForInputEvent(document().focusedElement()));
TypingCommand::deleteSelection(document());
}

Powered by Google App Engine
This is Rietveld 408576698