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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 103863007: Let WebViewImpl::textInputInfo() query the focused element when selection is empty (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: added unit test Created 7 years 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/web/tests/WebViewTest.cpp » ('j') | 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 2aa2f8c76b099732489994c76661023d14a81d16..fd553a1abb1cc18c3c7a3034f491939a9233c463 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2165,17 +2165,17 @@ WebTextInputInfo WebViewImpl::textInputInfo()
if (!focused)
return info;
- FrameSelection& selection = focused->selection();
- Node* node = selection.selection().rootEditableElement();
- if (!node)
- return info;
-
info.inputMode = inputModeOfFocusedElement();
info.type = textInputType();
if (info.type == WebTextInputTypeNone)
return info;
+ FrameSelection& selection = focused->selection();
+ Node* node = selection.selection().rootEditableElement();
+ if (!node)
+ return info;
+
if (!focused->editor().canEdit())
return info;
« no previous file with comments | « no previous file | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698