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

Issue 929053004: [KeyboardEvent] Add embedder APIs to translate between Dom |key| enum and strings (Closed)

Created:
5 years, 10 months ago by Habib Virji
Modified:
5 years, 1 month ago
Reviewers:
piman, dtapuska, Wez, kpschoedel
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, tdresser+watch_chromium.org, jam, darin-cc_chromium.org, mkwst+moarreviews-shell_chromium.org, jdduke+watch_chromium.org, jochen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[KeyboardEvent] Add embedder APIs to translate between Dom |key| enum and strings Embedder API for accessing DOM3 |key| value based on the enum value. Sets the dom |key| enum value for each WebKeyboardEvent. Blink then uses the embedded API to translate the dom |key| enum value to a value string. It is dependent on CL 1103263004, which sets dom |key| value in X11. BUG=227231 R=piman@chromium.org, Wez

Patch Set 1 #

Total comments: 2

Patch Set 2 : "API has been updated on the blink side" #

Total comments: 12

Patch Set 3 : Code review comments #

Total comments: 12

Patch Set 4 : #

Patch Set 5 : Added a new parameter to pass DOM |key| character #

Total comments: 20

Patch Set 6 : Passing Dom KEY printable and non-printable to pass value under domKey #

Total comments: 9

Patch Set 7 : Updated MakeWebKeyboardEvent function with the changes. #

Total comments: 10

Patch Set 8 : event_sender changes to use Dom |code| instead of KeyboardCode #

Patch Set 9 : Fixed failing LayoutTests. #

Patch Set 10 : Fix keyboard.location layout test failure #

Patch Set 11 : UnitTest updated as MakeKeyboardEvent now adds a value to differentiate #

Total comments: 24

Patch Set 12 : Using DomKey::CHARACTER to differentiate DomKey value and unicode value #

Patch Set 13 : Cleanup of the dom_key.h #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -139 lines) Patch
M components/test_runner/event_sender.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +103 lines, -133 lines 3 comments Download
M content/browser/renderer_host/web_input_event_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/web_input_event_aura_unittest.cc View 1 2 3 4 11 2 chunks +5 lines, -0 lines 0 comments Download
M content/child/blink_platform_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -1 line 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +24 lines, -0 lines 3 comments Download
M ui/events/event.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M ui/events/event.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +10 lines, -0 lines 0 comments Download
M ui/events/keycodes/dom/dom_key_data.inc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -5 lines 1 comment Download
M ui/events/keycodes/dom_us_layout_data.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 77 (14 generated)
Habib Virji
DOM3 key support via embedder API. Includes a small change in event.cc, to set key ...
5 years, 10 months ago (2015-02-18 14:08:38 UTC) #2
piman
lgtm
5 years, 10 months ago (2015-02-18 16:27:47 UTC) #3
Wez
In the description and title: Suggest "Add embedder APIs to translate between domKey enum and ...
5 years, 10 months ago (2015-02-19 23:57:06 UTC) #4
Wez
https://codereview.chromium.org/929053004/diff/1/ui/events/event.cc File ui/events/event.cc (right): https://codereview.chromium.org/929053004/diff/1/ui/events/event.cc#newcode785 ui/events/event.cc:785: GetMeaningFromKeyCode(key_code_, flags(), &key_, &character_); GetMeaningFromKeyCode currently assumes a US ...
5 years, 10 months ago (2015-02-20 00:00:30 UTC) #5
Habib Virji
https://codereview.chromium.org/929053004/diff/1/ui/events/event.cc File ui/events/event.cc (right): https://codereview.chromium.org/929053004/diff/1/ui/events/event.cc#newcode785 ui/events/event.cc:785: GetMeaningFromKeyCode(key_code_, flags(), &key_, &character_); I have started looking into ...
5 years, 10 months ago (2015-02-23 10:10:06 UTC) #6
Habib Virji
@Wez: I have uploaded CL already that addresses above issue. Based on your response for ...
5 years, 8 months ago (2015-04-20 14:21:21 UTC) #7
Wez
https://codereview.chromium.org/929053004/diff/20001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/929053004/diff/20001/content/child/blink_platform_impl.cc#newcode1280 content/child/blink_platform_impl.cc:1280: static_cast<ui::DomKey>(dom_key))); nit: Strictly speaking the behaviour of static_cast<enum> is ...
5 years, 8 months ago (2015-04-21 02:25:58 UTC) #8
Wez
Also note that Kevin has crrev.com/841263005 in progress, so some of the ui::Event code is ...
5 years, 8 months ago (2015-04-21 02:29:35 UTC) #9
Wez
(Incidentally, my apologies once again for the delay in reviewing this; please feel free to ...
5 years, 8 months ago (2015-04-21 21:10:41 UTC) #10
Habib Virji
Thanks wez for review. Apologise I was late this time as I am catching up ...
5 years, 7 months ago (2015-04-29 16:05:18 UTC) #11
Habib Virji
@Wez: I have updated other CL and it does not impact on this. Should we ...
5 years, 7 months ago (2015-04-30 09:09:20 UTC) #12
Habib Virji
@wez blink side changes has landed. Can we land this change, X11 changes are depending ...
5 years, 7 months ago (2015-05-01 15:40:22 UTC) #13
Habib Virji
On 2015/05/01 15:40:22, Habib Virji wrote: > @wez blink side changes has landed. Can we ...
5 years, 7 months ago (2015-05-06 15:35:35 UTC) #14
Wez
https://codereview.chromium.org/929053004/diff/20001/content/shell/renderer/test_runner/event_sender.cc File content/shell/renderer/test_runner/event_sender.cc (right): https://codereview.chromium.org/929053004/diff/20001/content/shell/renderer/test_runner/event_sender.cc#newcode1411 content/shell/renderer/test_runner/event_sender.cc:1411: domKey = domString; On 2015/04/29 16:05:18, Habib Virji wrote: ...
5 years, 7 months ago (2015-05-07 00:23:24 UTC) #15
Habib Virji
Apologise wez for delay in replying. Was travelling and wanted to be back on desk ...
5 years, 7 months ago (2015-05-19 16:16:28 UTC) #16
kpschoedel
https://codereview.chromium.org/929053004/diff/40001/content/browser/renderer_host/web_input_event_aura.cc File content/browser/renderer_host/web_input_event_aura.cc (right): https://codereview.chromium.org/929053004/diff/40001/content/browser/renderer_host/web_input_event_aura.cc#newcode75 content/browser/renderer_host/web_input_event_aura.cc:75: webkit_event.domKey = static_cast<int>(event.GetDomKey()); You'll also need to set .domKey ...
5 years, 7 months ago (2015-05-19 20:00:26 UTC) #17
Habib Virji
Thanks Kevin, incorporated your suggested changes. @wez: event_sender.cc issues are mostly addressed with DomCode and ...
5 years, 7 months ago (2015-05-21 16:36:10 UTC) #18
Habib Virji
On 2015/05/21 16:36:10, Habib Virji wrote: > Thanks Kevin, incorporated your suggested changes. > > ...
5 years, 7 months ago (2015-05-26 18:08:15 UTC) #19
kpschoedel
lgtm
5 years, 7 months ago (2015-05-26 18:24:56 UTC) #20
Habib Virji
On 2015/05/26 18:24:56, kpschoedel wrote: > lgtm @wez ping
5 years, 6 months ago (2015-05-28 18:06:21 UTC) #21
Wez
https://codereview.chromium.org/929053004/diff/40001/content/browser/renderer_host/web_input_event_aura.cc File content/browser/renderer_host/web_input_event_aura.cc (right): https://codereview.chromium.org/929053004/diff/40001/content/browser/renderer_host/web_input_event_aura.cc#newcode75 content/browser/renderer_host/web_input_event_aura.cc:75: webkit_event.domKey = static_cast<int>(event.GetDomKey()); On 2015/05/19 16:16:28, Habib Virji wrote: ...
5 years, 6 months ago (2015-06-03 00:35:09 UTC) #22
Habib Virji
Thanks wez. Updated code now to pass a printable DOM |key| value separately. Please have ...
5 years, 6 months ago (2015-06-05 20:05:11 UTC) #24
Wez
https://codereview.chromium.org/929053004/diff/40001/content/browser/renderer_host/web_input_event_aura.cc File content/browser/renderer_host/web_input_event_aura.cc (right): https://codereview.chromium.org/929053004/diff/40001/content/browser/renderer_host/web_input_event_aura.cc#newcode75 content/browser/renderer_host/web_input_event_aura.cc:75: webkit_event.domKey = static_cast<int>(event.GetDomKey()); On 2015/06/05 20:05:11, Habib Virji wrote: ...
5 years, 6 months ago (2015-06-11 00:09:05 UTC) #25
dtapuska
https://codereview.chromium.org/929053004/diff/100001/content/browser/renderer_host/web_input_event_aura.cc File content/browser/renderer_host/web_input_event_aura.cc (right): https://codereview.chromium.org/929053004/diff/100001/content/browser/renderer_host/web_input_event_aura.cc#newcode88 content/browser/renderer_host/web_input_event_aura.cc:88: webkit_event.domKey = static_cast<int>(event.GetDomKey()); These methods do not trap the ...
5 years, 6 months ago (2015-06-18 14:28:30 UTC) #27
Wez
On 2015/06/18 14:28:30, Dave Tapuska wrote: > https://codereview.chromium.org/929053004/diff/100001/content/browser/renderer_host/web_input_event_aura.cc > File content/browser/renderer_host/web_input_event_aura.cc (right): > > https://codereview.chromium.org/929053004/diff/100001/content/browser/renderer_host/web_input_event_aura.cc#newcode88 ...
5 years, 6 months ago (2015-06-22 13:45:09 UTC) #28
dtapuska
On 2015/06/22 13:45:09, Wez wrote: > On 2015/06/18 14:28:30, Dave Tapuska wrote: > > > ...
5 years, 6 months ago (2015-06-22 13:55:13 UTC) #29
Wez
My understanding of the spec is that |key| must be set for keypress events (to ...
5 years, 6 months ago (2015-06-22 14:50:43 UTC) #30
Habib Virji
Thanks wez for your review comments. I have removed an additional variable introduced in last ...
5 years, 6 months ago (2015-06-24 14:32:13 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/929053004/140001
5 years, 6 months ago (2015-06-24 14:44:51 UTC) #34
commit-bot: I haz the power
Dry run: Exceeded global retry quota
5 years, 6 months ago (2015-06-24 15:17:26 UTC) #36
Habib Virji
Apologise it got closed by mistake ...
5 years, 6 months ago (2015-06-25 08:30:14 UTC) #37
Wez
Habib, Dave, I've been meaning to write up a summary of how this is all ...
5 years, 6 months ago (2015-06-25 10:40:21 UTC) #38
Habib Virji
Thanks Wez I have fixed issues in event_sender.cc. In regards to GetCharacter lacking for keyDown ...
5 years, 6 months ago (2015-06-26 17:35:38 UTC) #40
Habib Virji
A revert of this CL (patchset #9 id:180001) has been created in https://codereview.chromium.org/1214823002/ by habib.virji@samsung.com. ...
5 years, 6 months ago (2015-06-26 19:23:46 UTC) #41
Wez
On 2015/06/26 19:23:46, Habib Virji wrote: > A revert of this CL (patchset #9 id:180001) ...
5 years, 5 months ago (2015-06-29 14:56:55 UTC) #43
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/929053004/200001
5 years, 5 months ago (2015-06-29 14:56:56 UTC) #44
commit-bot: I haz the power
Dry run: Exceeded global retry quota
5 years, 5 months ago (2015-06-29 15:19:14 UTC) #46
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/929053004/220001
5 years, 5 months ago (2015-06-29 16:17:22 UTC) #49
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-06-29 17:25:26 UTC) #51
Habib Virji
@wez: Thanks for reopening. There use to be option of re-opening if closed by mistake. ...
5 years, 5 months ago (2015-06-30 08:39:34 UTC) #52
Habib Virji
@wez: ping
5 years, 5 months ago (2015-07-22 22:21:51 UTC) #53
Wez
Sorry Habib, will get to this ASAP. On 22 July 2015 at 15:21, <habib.virji@samsung.com> wrote: ...
5 years, 5 months ago (2015-07-24 00:54:13 UTC) #54
Wez
Thanks again for your patience, Habib. This is looking pretty close - have suggested a ...
5 years, 5 months ago (2015-07-25 23:12:26 UTC) #55
kpschoedel
https://codereview.chromium.org/929053004/diff/220001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/929053004/diff/220001/content/child/blink_platform_impl.cc#newcode1397 content/child/blink_platform_impl.cc:1397: if (dom_key < DOM_KEY_PRINT_NON_DIFF) { Apologies for being away ...
5 years, 4 months ago (2015-07-29 14:43:14 UTC) #56
Wez
https://codereview.chromium.org/929053004/diff/220001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/929053004/diff/220001/content/child/blink_platform_impl.cc#newcode1397 content/child/blink_platform_impl.cc:1397: if (dom_key < DOM_KEY_PRINT_NON_DIFF) { On 2015/07/29 14:43:14, kpschoedel ...
5 years, 4 months ago (2015-07-29 17:59:37 UTC) #57
kpschoedel
https://codereview.chromium.org/929053004/diff/220001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/929053004/diff/220001/content/child/blink_platform_impl.cc#newcode1397 content/child/blink_platform_impl.cc:1397: if (dom_key < DOM_KEY_PRINT_NON_DIFF) { On 2015/07/25 23:12:26, Wez ...
5 years, 4 months ago (2015-07-29 19:16:11 UTC) #58
Wez
https://codereview.chromium.org/929053004/diff/220001/content/child/blink_platform_impl.cc File content/child/blink_platform_impl.cc (right): https://codereview.chromium.org/929053004/diff/220001/content/child/blink_platform_impl.cc#newcode1397 content/child/blink_platform_impl.cc:1397: if (dom_key < DOM_KEY_PRINT_NON_DIFF) { On 2015/07/29 19:16:11, kpschoedel ...
5 years, 4 months ago (2015-07-29 19:59:48 UTC) #59
kpschoedel
On 2015/07/29 19:59:48, Wez wrote: > I'm not sure that type-safety is really an issue ...
5 years, 4 months ago (2015-07-30 14:16:02 UTC) #60
Wez
On 30 July 2015 at 07:16, <kpschoedel@chromium.org> wrote: > On 2015/07/29 19:59:48, Wez wrote: > ...
5 years, 4 months ago (2015-07-30 18:44:10 UTC) #61
Habib Virji
Thanks Wez and Kevin, please find update based on using DomKey::CHARACTER as way of differentiating ...
5 years, 4 months ago (2015-07-31 16:17:30 UTC) #62
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/929053004/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/929053004/260001
5 years, 4 months ago (2015-08-04 16:17:03 UTC) #64
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-04 18:18:02 UTC) #66
Habib Virji
@wez/kevin: ping
5 years, 4 months ago (2015-08-05 09:45:46 UTC) #67
kpschoedel
On 2015/08/05 09:45:46, Habib Virji wrote: > @wez/kevin: ping Apologies, this week has a holiday ...
5 years, 4 months ago (2015-08-05 22:45:59 UTC) #68
dtapuska
https://codereview.chromium.org/929053004/diff/260001/components/test_runner/event_sender.cc File components/test_runner/event_sender.cc (right): https://codereview.chromium.org/929053004/diff/260001/components/test_runner/event_sender.cc#newcode1265 components/test_runner/event_sender.cc:1265: std::string key_code_str; I'm not sure we should use a ...
5 years, 4 months ago (2015-08-13 13:36:48 UTC) #69
kpschoedel
I have no objections in principle to this and will make the necessary revisions if ...
5 years, 4 months ago (2015-08-13 14:05:15 UTC) #70
Wez
Looks like crrev.com/1284433002 looks pretty close to being complete. Habib, I think Kevin's patch to ...
5 years, 3 months ago (2015-08-26 23:42:41 UTC) #71
dtapuska
On 2015/08/26 23:42:41, Wez wrote: > Looks like crrev.com/1284433002 looks pretty close to being complete. ...
5 years, 3 months ago (2015-08-27 13:23:06 UTC) #72
Habib Virji
On 2015/08/27 13:23:06, dtapuska wrote: > On 2015/08/26 23:42:41, Wez wrote: > > Looks like ...
5 years, 3 months ago (2015-08-27 16:29:12 UTC) #73
dtapuska
On 2015/08/27 16:29:12, Habib Virji wrote: > On 2015/08/27 13:23:06, dtapuska wrote: > > On ...
5 years, 3 months ago (2015-08-27 16:41:46 UTC) #74
dtapuska
On 2015/08/27 16:41:46, dtapuska wrote: > On 2015/08/27 16:29:12, Habib Virji wrote: > > On ...
5 years, 3 months ago (2015-09-10 15:51:12 UTC) #75
Wez
On 2015/09/10 15:51:12, dtapuska wrote: > On 2015/08/27 16:41:46, dtapuska wrote: > > On 2015/08/27 ...
5 years, 3 months ago (2015-09-14 22:05:29 UTC) #76
dtapuska
5 years, 3 months ago (2015-09-15 14:33:33 UTC) #77
Message was sent while issue was closed.
On 2015/09/14 22:05:29, Wez wrote:
> On 2015/09/10 15:51:12, dtapuska wrote:
> > On 2015/08/27 16:41:46, dtapuska wrote:
> > > On 2015/08/27 16:29:12, Habib Virji wrote:
> > > > On 2015/08/27 13:23:06, dtapuska wrote:
> > > > > On 2015/08/26 23:42:41, Wez wrote:
> > > > > > Looks like crrev.com/1284433002 looks pretty close to being
complete.
> > > > > > 
> > > > > > Habib, I think Kevin's patch to unify the character & non-character
> > codes
> > > > > should
> > > > > > greatly simplify this CL!
> > > > > 
> > > > > @Habib; please let us know if you have time to revise this based on
> > Kevin's
> > > > new
> > > > > change. I'd like to get these moving in M47.
> > > > 
> > > > I will start looking into kevin changes. Will address your comments too
in
> > the
> > > > push. When is M47 scheduled?
> > > 
> > > M47 is our current sprint; Oct 2nd branch date.
> > > I hope that your change should turn into a few lines with Kevin's changes
> > > (haven't landed yet).
> > 
> > I put a subsequent change up for review:
> > https://codereview.chromium.org/1337503002/
> > 
> > It is so that I can continue getting Android and Mac supported for domCode
and
> > domKey.. I'll leave aura for last in case you want to do it.
> 
> Does that mean this CL can be closed?

I've closed the issue.

Powered by Google App Engine
This is Rietveld 408576698