Chromium Code Reviews
DescriptionDon't rewrite events twice.
Rewriters are first tried in AshWindowTreeHostPlatform::DispatchEvent(). We
also rewrite them in WindowTreeHost::DispatchKeyEventPostIME().
This for example causes problems when ARC++ is focused while spoken feedback
is active. So this CL removes the 2nd rewrite.
If Spoken Feedback is active but ARC++ is focused, this is the path for
super+right-arrow:
1. AshWindowTreeHostPlatform::DispatchEvent() tries rewriters before sending
event to sink.
2. SpokenFeedbackEventRewriter sees super key is down, so sends the event to
the Spoken Feedback event extension and tells ash to discard the event.
3. The Spoken Feedback extension doesn't handle the event, and the event is
resent to ash from WebContentsImpl::HandleKeyboardEvent(), which sends it
to SpokenFeedbackEventRewriterDelegate::HandleKeyboardEvent(), which sends
it to event sink (skipping rewriters).
4. Event is sent to InputMethod, it is not handled by InputMethod, so it is
sent to WindowTreeHost::DispatchKeyEventPostIME().
Now, if at WTH::DispatchKeyEventPostIME() we try to rewrite the event again,
steps 2 to 4 will be tried infinitely and event won't be dispatched to ARC++.
This is what was happening before this CL. This CL skips rewriters at
WTH::DispatchKeyEventPostIME().
BUG=727179
Review-Url: https://codereview.chromium.org/2916673002
Cr-Original-Commit-Position: refs/heads/master@{#476848}
Review-Url: https://codereview.chromium.org/2926473004 .
Cr-Commit-Position: refs/branch-heads/3112@{#189}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}
Committed: https://chromium.googlesource.com/chromium/src/+/f694603e904f50e047ba9fc52651782ce1a41bd1
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
||||||||||||||||||||||||||||