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

Issue 2399603002: views: don't send OnKeypressUnhandled for all keys (Closed)

Created:
4 years, 2 months ago by Elly Fong-Jones
Modified:
4 years, 2 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina, James Su, shuchen+watch_chromium.org, yusukes+watch_chromium.org, nona+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

views: don't send OnKeypressUnhandled for all keys Textfield::OnKeyPressed() is not responsible for all keystroke handling, but it is called for every pressed key, which means that 'handled' in this function is not correct if the key is handled elsewhere, like IME or focus hotkeys. As such, don't call OnKeypressUnhandled() in OnKeyPressed() at all; only call it in InsertChar() for readonly textfields. BUG=649559, 649007 Committed: https://crrev.com/48a12e434146dc568dabb364d84be911b6d369e4 Cr-Commit-Position: refs/heads/master@{#423908}

Patch Set 1 #

Total comments: 2

Patch Set 2 : OnKeypressUnhandled -> OnEditFailed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -14 lines) Patch
M ui/views/controls/textfield/textfield.h View 1 1 chunk +2 lines, -3 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 3 chunks +3 lines, -6 lines 0 comments Download
M ui/views/style/platform_style.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M ui/views/style/platform_style.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/style/platform_style_mac.mm View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 17 (6 generated)
Elly Fong-Jones
sky: ptal? :)
4 years, 2 months ago (2016-10-05 18:22:23 UTC) #3
sky
https://codereview.chromium.org/2399603002/diff/1/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (left): https://codereview.chromium.org/2399603002/diff/1/ui/views/controls/textfield/textfield.cc#oldcode688 ui/views/controls/textfield/textfield.cc:688: if (!handled) Should this instead check handled || event.handled() ...
4 years, 2 months ago (2016-10-06 15:58:12 UTC) #4
Elly Fong-Jones
https://codereview.chromium.org/2399603002/diff/1/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (left): https://codereview.chromium.org/2399603002/diff/1/ui/views/controls/textfield/textfield.cc#oldcode688 ui/views/controls/textfield/textfield.cc:688: if (!handled) On 2016/10/06 15:58:12, sky wrote: > Should ...
4 years, 2 months ago (2016-10-06 16:20:05 UTC) #5
sky
Did you verify that? Tab should be handled by the FocusManager and before the View. ...
4 years, 2 months ago (2016-10-06 21:17:11 UTC) #6
Elly Fong-Jones
It does work with Tab, but for example, if I open the bookmark bubble, focus ...
4 years, 2 months ago (2016-10-07 15:42:19 UTC) #7
sky
I get it. LGTM I think the confusion is OnKeypressUnhandled is now a poor name, ...
4 years, 2 months ago (2016-10-07 16:41:30 UTC) #8
Elly Fong-Jones
On 2016/10/07 16:41:30, sky wrote: > I get it. LGTM I think the confusion is ...
4 years, 2 months ago (2016-10-07 17:04:05 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2399603002/20001
4 years, 2 months ago (2016-10-07 17:04:31 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-10-07 18:00:27 UTC) #14
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/48a12e434146dc568dabb364d84be911b6d369e4 Cr-Commit-Position: refs/heads/master@{#423908}
4 years, 2 months ago (2016-10-07 18:04:54 UTC) #16
sky
4 years, 2 months ago (2016-10-07 19:53:40 UTC) #17
Message was sent while issue was closed.
Nice! I like the new name. Thanks!

Powered by Google App Engine
This is Rietveld 408576698