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

Issue 1221083008: [NOT FOR COMMIT] Ignore inserting characters of Keys with modifiers on CrOS (Closed)

Created:
5 years, 5 months ago by afakhry
Modified:
5 years, 3 months ago
Reviewers:
oshima, Shu Chen, dtapuska
CC:
chromium-reviews, yusukes+watch_chromium.org, tfarina, shuchen+watch_chromium.org, penghuang+watch_chromium.org, nona+watch_chromium.org, James Su, dtapuska, garykac
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ignore inserting characters of Keys with modifiers on CrOS User-defined extension commands (chrome://extensions/configureCommands) that are set to Search+Key, when pressed while a textfield is in focus, the Key is inserted in the textfield before the command is executed. On CrOs, we want to treat Search/Ctrl/Alt as modifiers that prevent the characters from being inserted in the textfield. R=oshima@chromium.org BUG=471488 TEST=views_unittests --gtest_filter=TextfieldTest.KeysWithModifiersTest

Patch Set 1 #

Patch Set 2 : Fixed the test #

Patch Set 3 : Preventing insertion of keys with modifiers in WebContents #

Total comments: 3

Patch Set 4 : Fix the double keydowns. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -14 lines) Patch
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 1 chunk +19 lines, -6 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 1 chunk +10 lines, -8 lines 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 2 3 chunks +35 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
afakhry
oshima@ Please review when you're back from vacation. :) Thanks! https://codereview.chromium.org/1221083008/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/1221083008/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode1591 ...
5 years, 4 months ago (2015-08-14 20:18:55 UTC) #1
Shu Chen
I think this cl is going to the wrong way. By reading crbug.com/471488, I think ...
5 years, 4 months ago (2015-08-17 03:27:40 UTC) #3
afakhry
On 2015/08/17 03:27:40, Shu Chen wrote: > I think this cl is going to the ...
5 years, 4 months ago (2015-08-18 18:35:53 UTC) #4
Shu Chen
On 2015/08/18 18:35:53, afakhry wrote: > On 2015/08/17 03:27:40, Shu Chen wrote: > > I ...
5 years, 4 months ago (2015-08-19 00:50:28 UTC) #5
oshima
On 2015/08/19 00:50:28, Shu Chen wrote: > On 2015/08/18 18:35:53, afakhry wrote: > > On ...
5 years, 3 months ago (2015-09-02 18:06:56 UTC) #7
afakhry
On 2015/09/02 18:06:56, oshima wrote: > On 2015/08/19 00:50:28, Shu Chen wrote: > > On ...
5 years, 3 months ago (2015-09-02 18:22:26 UTC) #9
chromium-reviews
On Thu, Sep 3, 2015 at 2:06 AM, <oshima@chromium.org> wrote: > On 2015/08/19 00:50:28, Shu ...
5 years, 3 months ago (2015-09-03 14:35:12 UTC) #10
kpschoedel
On 2015/09/03 14:35:12, chromium-reviews wrote: > > I think it maybe better to make event.GetCharacter() ...
5 years, 3 months ago (2015-09-03 15:18:09 UTC) #11
dtapuska
https://codereview.chromium.org/1221083008/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/1221083008/diff/40001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode1600 content/browser/renderer_host/render_widget_host_view_aura.cc:1600: is_char, This doesn't seem correct to me. This is ...
5 years, 3 months ago (2015-09-03 15:27:12 UTC) #13
afakhry
On 2015/09/03 15:18:09, kpschoedel wrote: > On 2015/09/03 14:35:12, chromium-reviews wrote: > > > I ...
5 years, 3 months ago (2015-09-03 17:32:47 UTC) #14
afakhry
5 years, 3 months ago (2015-09-03 17:34:03 UTC) #15
https://codereview.chromium.org/1221083008/diff/40001/content/browser/rendere...
File content/browser/renderer_host/render_widget_host_view_aura.cc (right):

https://codereview.chromium.org/1221083008/diff/40001/content/browser/rendere...
content/browser/renderer_host/render_widget_host_view_aura.cc:1600: is_char,
On 2015/09/03 15:27:12, dtapuska wrote:
> This doesn't seem correct to me.
> 
> This is going to generate two keydown events in javascript and not a keydown,
> keypress, keyup sequence as intended.
> 
> You should try this page http://nonan.jp/keyevent/input.html
> 
> and see the sequence of events for each. I suspect you'll start seeing a
> duplicated keydown event which is incorrect.

You are right, I used to get two keydowns. I changed it to avoid sending the
event altogether if |is_char| is false. I validated that behavior of pressing
Ctrl+Q matches that of Search+Q using the test page you provided.

Powered by Google App Engine
This is Rietveld 408576698