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

Issue 1284433002: Revise ui::DomKey to unify character and non-character codes. (Closed)

Created:
5 years, 4 months ago by kpschoedel
Modified:
5 years, 3 months ago
Reviewers:
*sadrul, *Wez, *Yuki, *samuong, dtapuska, spang
CC:
chromium-reviews, ozone-reviews_chromium.org, yusukes+watch_chromium.org, tdresser+watch_chromium.org, jdduke+watch_chromium.org, jam, samuong+watch_chromium.org, shuchen+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, oshima+watch_chromium.org, kalyank, James Su, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, Habib Virji, Shu Chen
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revise ui::DomKey to unify character and non-character codes. DomKey becomes a single integer value corresponding to the DOM UI Events KeyboardEvent.key string; it can represent either a Unicode code point or one of the defined non-printable values from <https://w3c.github.io/DOM-Level-3-Events-key/>;. In the previous representation, ui::DomKey enumerated only the non- printable values and had a sentinel to indicated that a character value was held separately. Much of this CL therefore merely replaces |key, character| pairs with a single |key| value. The most substantial changes are to ui/events/keycodes/dom/dom_key.h ui/events/keycodes/dom/keycode_converter.h ui/events/event.h and associated implementations. BUG=227231 Committed: https://crrev.com/51d2e327f7a4ff8347867713e098ea81fd601df7 Cr-Commit-Position: refs/heads/master@{#346152}

Patch Set 1 #

Total comments: 44

Patch Set 2 : address review comments #

Patch Set 3 : missed adding a file #

Patch Set 4 : change representation #

Patch Set 5 : constant initializers #

Patch Set 6 : cleanup #

Total comments: 9

Patch Set 7 : IsDead #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1778 lines, -2650 lines) Patch
M chrome/browser/chromeos/events/event_rewriter.h View 1 2 3 4 3 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/events/event_rewriter.cc View 1 2 3 4 13 chunks +90 lines, -206 lines 0 comments Download
M chrome/browser/chromeos/events/event_rewriter_unittest.cc View 1 2 3 4 54 chunks +748 lines, -1543 lines 0 comments Download
M chrome/browser/chromeos/events/keyboard_driven_event_rewriter.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chromeos/input_method/input_method_engine.cc View 1 2 3 4 5 6 1 chunk +1 line, -9 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/chromedriver/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/chromedriver/keycode_text_conversion_ozone.cc View 1 2 3 3 chunks +6 lines, -5 lines 0 comments Download
M content/browser/renderer_host/web_input_event_aura_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/base/ime/chromeos/character_composer.h View 2 chunks +3 lines, -8 lines 0 comments Download
M ui/base/ime/chromeos/character_composer.cc View 1 2 3 4 5 6 3 chunks +12 lines, -7 lines 0 comments Download
M ui/base/ime/chromeos/character_composer_unittest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M ui/events/event.h View 1 2 3 4 5 6 10 chunks +41 lines, -49 lines 0 comments Download
M ui/events/event.cc View 1 2 3 4 5 6 12 chunks +24 lines, -46 lines 0 comments Download
M ui/events/keycodes/dom/dom_key.h View 1 2 3 4 5 6 1 chunk +143 lines, -2 lines 0 comments Download
M ui/events/keycodes/dom/dom_key_data.inc View 1 2 3 6 chunks +22 lines, -18 lines 0 comments Download
M ui/events/keycodes/dom/keycode_converter.h View 1 2 3 3 chunks +9 lines, -2 lines 0 comments Download
M ui/events/keycodes/dom/keycode_converter.cc View 1 2 3 4 5 6 3 chunks +44 lines, -8 lines 0 comments Download
M ui/events/keycodes/dom/keycode_converter_unittest.cc View 1 2 3 4 5 6 1 chunk +57 lines, -7 lines 0 comments Download
M ui/events/keycodes/dom_us_layout_data.h View 1 2 3 4 7 chunks +11 lines, -12 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion.h View 4 chunks +7 lines, -16 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion.cc View 1 2 3 4 10 chunks +163 lines, -243 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion_unittest.cc View 1 2 3 4 5 9 chunks +269 lines, -275 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion_x.h View 3 chunks +2 lines, -4 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion_x.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion_xkb.h View 1 chunk +1 line, -2 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion_xkb.cc View 1 2 3 4 5 6 3 chunks +76 lines, -4 lines 0 comments Download
M ui/events/ozone/BUILD.gn View 1 chunk +0 lines, -2 lines 0 comments Download
M ui/events/ozone/evdev/keyboard_evdev.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M ui/events/ozone/events_ozone.gyp View 1 chunk +0 lines, -2 lines 0 comments Download
M ui/events/ozone/layout/keyboard_layout_engine.h View 2 chunks +1 line, -2 lines 0 comments Download
M ui/events/ozone/layout/layout_util.h View 1 chunk +1 line, -2 lines 0 comments Download
M ui/events/ozone/layout/no/no_keyboard_layout_engine.h View 1 chunk +0 lines, -1 line 0 comments Download
M ui/events/ozone/layout/no/no_keyboard_layout_engine.cc View 1 chunk +0 lines, -1 line 0 comments Download
M ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h View 1 chunk +0 lines, -1 line 0 comments Download
M ui/events/ozone/layout/stub/stub_keyboard_layout_engine.cc View 1 chunk +1 line, -3 lines 0 comments Download
D ui/events/ozone/layout/xkb/xkb_keyboard_code_conversion.h View 1 chunk +0 lines, -27 lines 0 comments Download
D ui/events/ozone/layout/xkb/xkb_keyboard_code_conversion.cc View 1 chunk +0 lines, -84 lines 0 comments Download
M ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h View 3 chunks +2 lines, -4 lines 0 comments Download
M ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc View 1 2 3 4 5 7 chunks +16 lines, -23 lines 0 comments Download
M ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc View 3 chunks +5 lines, -7 lines 0 comments Download
M ui/keyboard/keyboard_util.cc View 1 2 3 4 5 6 3 chunks +9 lines, -11 lines 0 comments Download

Messages

Total messages: 54 (15 generated)
kpschoedel
+Wez for preliminary review of ui::DomKey. Since many of the files in this CL have ...
5 years, 4 months ago (2015-08-07 20:42:12 UTC) #2
kpschoedel
+dtapuska@ FYI (see previous comments before looking at the code)
5 years, 4 months ago (2015-08-13 14:06:51 UTC) #5
dtapuska
https://codereview.chromium.org/1284433002/diff/1/ui/events/event.cc File ui/events/event.cc (right): https://codereview.chromium.org/1284433002/diff/1/ui/events/event.cc#newcode820 ui/events/event.cc:820: return key_; I find this tricky.. In that the ...
5 years, 4 months ago (2015-08-13 14:47:26 UTC) #6
kpschoedel
https://codereview.chromium.org/1284433002/diff/1/ui/events/event.cc File ui/events/event.cc (right): https://codereview.chromium.org/1284433002/diff/1/ui/events/event.cc#newcode820 ui/events/event.cc:820: return key_; On 2015/08/13 14:47:25, dtapuska wrote: > I ...
5 years, 4 months ago (2015-08-13 15:46:06 UTC) #7
kpschoedel
On 2015/08/13 15:46:06, kpschoedel wrote: > This proposal is for a DomKey that is explicitly ...
5 years, 4 months ago (2015-08-13 19:39:16 UTC) #8
Wez
Overall this looks like a much cleaner approach than the separated DomKey enum & charactor ...
5 years, 4 months ago (2015-08-13 22:31:49 UTC) #9
kpschoedel
https://codereview.chromium.org/1284433002/diff/1/ui/events/keycodes/dom/dom_key.h File ui/events/keycodes/dom/dom_key.h (right): https://codereview.chromium.org/1284433002/diff/1/ui/events/keycodes/dom/dom_key.h#newcode24 ui/events/keycodes/dom/dom_key.h:24: // of any keystroke to be carried as a ...
5 years, 4 months ago (2015-08-14 01:20:07 UTC) #10
Wez
On 13 August 2015 at 18:20, <kpschoedel@chromium.org> wrote: > > > https://codereview.chromium.org/1284433002/diff/1/ui/events/keycodes/dom/dom_key.h > File ui/events/keycodes/dom/dom_key.h ...
5 years, 4 months ago (2015-08-14 01:23:08 UTC) #11
kpschoedel
On 2015/08/14 01:23:08, Wez wrote: > Well now I'm kinda sorry I asked. :P Apologies ...
5 years, 4 months ago (2015-08-14 13:52:08 UTC) #12
kpschoedel
On 2015/08/14 13:52:08, kpschoedel wrote: > Now I'm curious as to why Unicode chose post-combining ...
5 years, 4 months ago (2015-08-14 14:36:54 UTC) #13
kpschoedel
On 2015/08/13 22:31:49, Wez wrote: > I'm inclined to agree w/ Dave that implicit conversion ...
5 years, 4 months ago (2015-08-14 19:56:29 UTC) #14
kpschoedel
… an example is kKeyboardCodeToDomKey[] in ui/events/keycodes/keyboard_code_conversion.cc, which (currently) has entries like {VKEY_CLEAR, DomKey::CLEAR, 0}, ...
5 years, 4 months ago (2015-08-14 21:43:54 UTC) #15
kpschoedel
Summary of conversation with dtapuska@ this morning: I'll see whether compilers are smart enough to ...
5 years, 4 months ago (2015-08-17 16:03:12 UTC) #16
kpschoedel
Without |constexpr|, gcc generates dynamic initializers, even when there is nothing but a simple |return| ...
5 years, 4 months ago (2015-08-17 18:01:53 UTC) #17
kpschoedel
Patch Set 2 for the non-representational review comments, to get those out of the way. ...
5 years, 4 months ago (2015-08-17 20:16:14 UTC) #18
Wez
Definitely liking the way this cleans up calling code! https://codereview.chromium.org/1284433002/diff/1/chrome/browser/chromeos/input_method/input_method_engine.cc File chrome/browser/chromeos/input_method/input_method_engine.cc (right): https://codereview.chromium.org/1284433002/diff/1/chrome/browser/chromeos/input_method/input_method_engine.cc#newcode315 chrome/browser/chromeos/input_method/input_method_engine.cc:315: ...
5 years, 4 months ago (2015-08-18 22:34:32 UTC) #19
kpschoedel
On 2015/08/18 22:34:32, Wez wrote: > Oh, interesting; I wonder what Chrome does with those ...
5 years, 4 months ago (2015-08-19 19:01:44 UTC) #20
Wez
On 2015/08/19 19:01:44, kpschoedel wrote: > On 2015/08/18 22:34:32, Wez wrote: > > Oh, interesting; ...
5 years, 4 months ago (2015-08-19 20:24:59 UTC) #21
kpschoedel
On 2015/08/19 20:24:59, Wez wrote: > Are you close to being review-ready with this CL? ...
5 years, 4 months ago (2015-08-19 21:04:33 UTC) #22
kpschoedel
This is substantially reviewable now. (I'll change the CHECKs after a CQ dry run.)
5 years, 4 months ago (2015-08-20 15:10:23 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1284433002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1284433002/80001
5 years, 4 months ago (2015-08-20 15:10:58 UTC) #25
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/93210)
5 years, 4 months ago (2015-08-20 16:58:57 UTC) #27
kpschoedel
After a day of head-scratching it turns out the win64 failures were an unrelated coincidence ...
5 years, 4 months ago (2015-08-21 20:11:12 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1284433002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1284433002/100001
5 years, 4 months ago (2015-08-24 16:08:10 UTC) #30
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-24 16:53:00 UTC) #32
kpschoedel
Widening the audience… +sadrul@ for ui/events/event.* etc. +yukishiino@ for character_composer / IME +spang@ for ozone
5 years, 4 months ago (2015-08-24 21:05:13 UTC) #35
Yuki
+cc: shuchen@ FYI lgtm for ui/base/ime/chromeos/
5 years, 4 months ago (2015-08-25 05:32:34 UTC) #36
spang
lgtm
5 years, 4 months ago (2015-08-25 15:53:31 UTC) #37
Wez
LGTM :D https://codereview.chromium.org/1284433002/diff/1/ui/events/event.cc File ui/events/event.cc (right): https://codereview.chromium.org/1284433002/diff/1/ui/events/event.cc#newcode820 ui/events/event.cc:820: return key_; On 2015/08/17 20:16:14, kpschoedel wrote: ...
5 years, 3 months ago (2015-08-26 23:38:34 UTC) #38
kpschoedel
https://codereview.chromium.org/1284433002/diff/100001/ui/base/ime/chromeos/character_composer.cc File ui/base/ime/chromeos/character_composer.cc (right): https://codereview.chromium.org/1284433002/diff/100001/ui/base/ime/chromeos/character_composer.cc#newcode231 ui/base/ime/chromeos/character_composer.cc:231: Find(tree_index, entries, static_cast<uint16_t>(character), &result)) { The short answer is ...
5 years, 3 months ago (2015-08-27 15:47:54 UTC) #39
sadrul
lgtm
5 years, 3 months ago (2015-08-27 19:20:43 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1284433002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1284433002/100001
5 years, 3 months ago (2015-08-27 19:29:40 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/93770)
5 years, 3 months ago (2015-08-27 19:41:16 UTC) #44
kpschoedel
+samuong@ for //chrome/test/chromedriver/*
5 years, 3 months ago (2015-08-27 19:46:06 UTC) #47
kpschoedel
https://codereview.chromium.org/1284433002/diff/100001/ui/base/ime/chromeos/character_composer.cc File ui/base/ime/chromeos/character_composer.cc (right): https://codereview.chromium.org/1284433002/diff/100001/ui/base/ime/chromeos/character_composer.cc#newcode231 ui/base/ime/chromeos/character_composer.cc:231: Find(tree_index, entries, static_cast<uint16_t>(character), &result)) { Followups: There are no ...
5 years, 3 months ago (2015-08-27 22:13:10 UTC) #48
samuong
lgtm
5 years, 3 months ago (2015-08-27 22:17:34 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1284433002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1284433002/120001
5 years, 3 months ago (2015-08-28 13:57:25 UTC) #52
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 3 months ago (2015-08-28 15:29:46 UTC) #53
commit-bot: I haz the power
5 years, 3 months ago (2015-08-28 15:30:29 UTC) #54
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/51d2e327f7a4ff8347867713e098ea81fd601df7
Cr-Commit-Position: refs/heads/master@{#346152}

Powered by Google App Engine
This is Rietveld 408576698