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

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

Issue 1332823002: Introduce firstEphemeralRangeOf(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: simplify firstRangeOf Created 5 years, 3 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 | « no previous file | Source/core/editing/VisibleSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/InputMethodController.cpp
diff --git a/Source/core/editing/InputMethodController.cpp b/Source/core/editing/InputMethodController.cpp
index 3c695f1e8270c7f1baf763f8e3825d031e9a2993..3c5a07856361785edbd4baa11e8cd1ed54481617 100644
--- a/Source/core/editing/InputMethodController.cpp
+++ b/Source/core/editing/InputMethodController.cpp
@@ -359,12 +359,12 @@ PassRefPtrWillBeRawPtr<Range> InputMethodController::compositionRange() const
PlainTextRange InputMethodController::getSelectionOffsets() const
{
- RefPtrWillBeRawPtr<Range> range = firstRangeOf(frame().selection().selection());
- if (!range)
+ EphemeralRange range = firstEphemeralRangeOf(frame().selection().selection());
+ if (range.isNull())
return PlainTextRange();
ContainerNode* editable = frame().selection().rootEditableElementOrTreeScopeRootNode();
ASSERT(editable);
- return PlainTextRange::create(*editable, *range.get());
+ return PlainTextRange::create(*editable, range);
}
bool InputMethodController::setSelectionOffsets(const PlainTextRange& selectionOffsets)
« no previous file with comments | « no previous file | Source/core/editing/VisibleSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698