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

Issue 2255363002: TextInputManager::GetTextSelection() should be called on focused widget. (Closed)

Created:
4 years, 4 months ago by EhsanK
Modified:
4 years, 4 months ago
Reviewers:
kenrb, piman
CC:
chromium-reviews, yusukes+watch_chromium.org, shuchen+watch_chromium.org, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, kalyank, danakj+watch_chromium.org, James Su, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

TextInputManager::GetTextSelection() should be called on focused widget. Currently, in the following methods in RenderWidgetHostViewAura, we use the active widget, i.e., the widget with focused text field to get text selection information: GetTextRange() GetSelectionRange() GetTextFromRange() Using the active widget as opposed to the focused widget regressed the long press touch quick menu on Aura. This is due to the call to GetSelectionRange() which returns empty when the selection is on a non-editable text. Using the focused widget is correct and fixes the issue. The corresponding unit tests are also modified so that we now test the selection on "focused widget" as opposed to "active widget". BUG=638898, 602723, 578168 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/9135773062a5f13e51348454c682d6661447c887 Cr-Commit-Position: refs/heads/master@{#413795}

Patch Set 1 #

Patch Set 2 : Rebased #

Patch Set 3 : Initialize |text_input_manager_| when RWHVCF is created #

Patch Set 4 : Rebased #

Total comments: 2

Patch Set 5 : Check for focused widget before using its view #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -9 lines) Patch
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 3 chunks +6 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 3 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (21 generated)
EhsanK
kenrb@: Could you please take a look, esp. the RWHVCF change? piman@: Could you please ...
4 years, 4 months ago (2016-08-20 02:41:30 UTC) #13
piman
lgtm
4 years, 4 months ago (2016-08-20 03:56:43 UTC) #14
kenrb
lgtm
4 years, 4 months ago (2016-08-23 15:34:34 UTC) #17
EhsanK
Thanks for the reviews!
4 years, 4 months ago (2016-08-23 16:01:18 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-23 18:45:46 UTC) #24
commit-bot: I haz the power
4 years, 4 months ago (2016-08-23 18:47:27 UTC) #26
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/9135773062a5f13e51348454c682d6661447c887
Cr-Commit-Position: refs/heads/master@{#413795}

Powered by Google App Engine
This is Rietveld 408576698