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

Issue 872233002: Switch KeyboardEvents over to NewEventHandler (Closed)

Created:
5 years, 11 months ago by abarth-chromium
Modified:
5 years, 11 months ago
Reviewers:
eseidel, ojan
CC:
esprehn, mojo-reviews_chromium.org, ojan, yzshen+watch_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Switch KeyboardEvents over to NewEventHandler This CL moves KeyboardEvents from the old event model to NewEventHandler. This CL keeps the basic structure of keydown, keypress, keyup events even though that's a bit wacky. As with pointer and gesture events, this CL removes PlatformKeyboardEvent in favor of just using WebKeyboardEvent. I've also made WebKeyboardEvent align more closely with Mojo's keyboard event. The CL does change one important aspect of key event handling: on the web the "keyCode" property of KeyboardEvent changes its meaning depending on whether the event is a keydown or a keypress event. For the former events, keyCode is the "virtual" (i.e., windows) key code where for the latter events, keyCode is the character code. To be more precise, I've renamed keyCode to virtualKeyCode and I've given it a zero (unknown key code) value during keypress events. R=ojan@chromium.org, eseidel@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/f5143561cc7cce29082a60238922124e4d8c0b25

Patch Set 1 #

Patch Set 2 : nits #

Total comments: 10

Patch Set 3 : Rename virtualKeyCode to key #

Unified diffs Side-by-side diffs Delta from patch set Stats (+203 lines, -1425 lines) Patch
M examples/browser/browser.sky View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sky/engine/core/dom/Node.h View 2 chunks +0 lines, -4 lines 0 comments Download
M sky/engine/core/dom/Node.cpp View 1 chunk +0 lines, -5 lines 0 comments Download
M sky/engine/core/editing/EditingBehavior.cpp View 1 2 6 chunks +10 lines, -17 lines 0 comments Download
M sky/engine/core/editing/EditorKeyBindings.cpp View 2 chunks +9 lines, -13 lines 0 comments Download
M sky/engine/core/events/GestureEvent.cpp View 1 chunk +1 line, -1 line 0 comments Download
M sky/engine/core/events/KeyboardEvent.h View 1 2 1 chunk +37 lines, -92 lines 0 comments Download
M sky/engine/core/events/KeyboardEvent.cpp View 1 2 2 chunks +51 lines, -193 lines 0 comments Download
M sky/engine/core/events/KeyboardEvent.idl View 1 2 1 chunk +14 lines, -46 lines 0 comments Download
M sky/engine/core/frame/NewEventHandler.h View 4 chunks +5 lines, -0 lines 0 comments Download
M sky/engine/core/frame/NewEventHandler.cpp View 1 2 6 chunks +48 lines, -2 lines 0 comments Download
M sky/engine/core/page/ChromeClient.h View 1 chunk +0 lines, -4 lines 0 comments Download
M sky/engine/core/page/EventHandler.h View 2 chunks +0 lines, -2 lines 0 comments Download
M sky/engine/core/page/EventHandler.cpp View 1 2 3 chunks +2 lines, -60 lines 0 comments Download
M sky/engine/platform/BUILD.gn View 1 2 2 chunks +0 lines, -3 lines 0 comments Download
M sky/engine/platform/PlatformEvent.h View 1 chunk +0 lines, -6 lines 0 comments Download
D sky/engine/platform/PlatformKeyboardEvent.h View 1 chunk +0 lines, -105 lines 0 comments Download
D sky/engine/platform/PlatformKeyboardEvent.cpp View 1 chunk +0 lines, -65 lines 0 comments Download
D sky/engine/platform/exported/WebInputEvent.cpp View 1 chunk +0 lines, -221 lines 0 comments Download
M sky/engine/public/platform/WebInputEvent.h View 1 2 3 chunks +12 lines, -51 lines 0 comments Download
M sky/engine/public/web/WebFrameClient.h View 1 chunk +0 lines, -4 lines 0 comments Download
M sky/engine/web/BUILD.gn View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M sky/engine/web/ChromeClientImpl.h View 1 chunk +0 lines, -4 lines 0 comments Download
M sky/engine/web/ChromeClientImpl.cpp View 2 chunks +0 lines, -17 lines 0 comments Download
D sky/engine/web/WebInputEventConversion.h View 1 chunk +0 lines, -67 lines 0 comments Download
D sky/engine/web/WebInputEventConversion.cpp View 1 chunk +0 lines, -238 lines 0 comments Download
M sky/engine/web/WebViewImpl.h View 3 chunks +0 lines, -16 lines 0 comments Download
M sky/engine/web/WebViewImpl.cpp View 4 chunks +5 lines, -173 lines 0 comments Download
M sky/framework/sky-input.sky View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sky/tests/services/event-sender.sky View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M sky/viewer/converters/input_event_types.cc View 1 2 2 chunks +4 lines, -9 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
abarth-chromium
5 years, 11 months ago (2015-01-25 08:51:33 UTC) #1
ojan
lgtm https://codereview.chromium.org/872233002/diff/20001/sky/engine/core/events/KeyboardEvent.h File sky/engine/core/events/KeyboardEvent.h (right): https://codereview.chromium.org/872233002/diff/20001/sky/engine/core/events/KeyboardEvent.h#newcode45 sky/engine/core/events/KeyboardEvent.h:45: unsigned virtualKeyCode() const { return m_virtualKeyCode; } FWIW, ...
5 years, 11 months ago (2015-01-26 06:18:52 UTC) #3
abarth-chromium
https://codereview.chromium.org/872233002/diff/20001/sky/engine/core/events/KeyboardEvent.h File sky/engine/core/events/KeyboardEvent.h (right): https://codereview.chromium.org/872233002/diff/20001/sky/engine/core/events/KeyboardEvent.h#newcode45 sky/engine/core/events/KeyboardEvent.h:45: unsigned virtualKeyCode() const { return m_virtualKeyCode; } On 2015/01/26 ...
5 years, 11 months ago (2015-01-26 06:28:16 UTC) #4
abarth-chromium
5 years, 11 months ago (2015-01-26 06:29:36 UTC) #5
abarth-chromium
https://codereview.chromium.org/872233002/diff/20001/sky/engine/core/events/KeyboardEvent.h File sky/engine/core/events/KeyboardEvent.h (right): https://codereview.chromium.org/872233002/diff/20001/sky/engine/core/events/KeyboardEvent.h#newcode45 sky/engine/core/events/KeyboardEvent.h:45: unsigned virtualKeyCode() const { return m_virtualKeyCode; } On 2015/01/26 ...
5 years, 11 months ago (2015-01-26 06:38:52 UTC) #6
abarth-chromium
5 years, 11 months ago (2015-01-26 06:46:55 UTC) #7
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
f5143561cc7cce29082a60238922124e4d8c0b25 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698