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

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

Issue 225303002: Let Selection.collapse remember a raw Position instead of a canonicalized one. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix setSelectedRange arguments Created 6 years, 6 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: Source/core/editing/InputMethodController.cpp
diff --git a/Source/core/editing/InputMethodController.cpp b/Source/core/editing/InputMethodController.cpp
index 3609e75405069a27fc42c957cd5e295daa8802a6..dee98270d28908957de5baf455f87de80808c6dc 100644
--- a/Source/core/editing/InputMethodController.cpp
+++ b/Source/core/editing/InputMethodController.cpp
@@ -310,7 +310,7 @@ void InputMethodController::setComposition(const String& text, const Vector<Comp
unsigned start = std::min(baseOffset + selectionStart, extentOffset);
unsigned end = std::min(std::max(start, baseOffset + selectionEnd), extentOffset);
RefPtrWillBeRawPtr<Range> selectedRange = Range::create(baseNode->document(), baseNode, start, baseNode, end);
- m_frame.selection().setSelectedRange(selectedRange.get(), DOWNSTREAM, static_cast<FrameSelection::SetSelectionOption>(0));
+ m_frame.selection().setSelectedRange(selectedRange.get(), DOWNSTREAM, false, NotUserTriggered);
}
}
}
@@ -383,7 +383,7 @@ bool InputMethodController::setSelectionOffsets(const PlainTextRange& selectionO
if (!range)
return false;
- return m_frame.selection().setSelectedRange(range.get(), VP_DEFAULT_AFFINITY, FrameSelection::CloseTyping);
+ return m_frame.selection().setSelectedRange(range.get(), VP_DEFAULT_AFFINITY, false, FrameSelection::CloseTyping);
}
bool InputMethodController::setEditableSelectionOffsets(const PlainTextRange& selectionOffsets)

Powered by Google App Engine
This is Rietveld 408576698