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

Unified Diff: Source/web/WebViewImpl.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 | « Source/core/editing/VisibleSelection.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 1d3f446d1e4acd57d7eb6a03c54d22d081d766d6..1b28d915accd712dc17dd20f4f1a735ae7394171 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2356,8 +2356,9 @@ WebTextInputInfo WebViewImpl::textInputInfo()
if (info.value.isEmpty())
return info;
- if (RefPtrWillBeRawPtr<Range> range = firstRangeOf(selection.selection())) {
- PlainTextRange plainTextRange(PlainTextRange::create(*element, *range.get()));
+ EphemeralRange firstRange = firstEphemeralRangeOf(selection.selection());
+ if (firstRange.isNotNull()) {
+ PlainTextRange plainTextRange(PlainTextRange::create(*element, firstRange));
if (plainTextRange.isNotNull()) {
info.selectionStart = plainTextRange.start();
info.selectionEnd = plainTextRange.end();
« no previous file with comments | « Source/core/editing/VisibleSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698