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

Issue 2926473004: Don't rewrite events twice. (Closed)

Created:
3 years, 6 months ago by Hadi
Modified:
3 years, 6 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/branch-heads/3112
Project:
chromium
Visibility:
Public.

Description

Don'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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -1 line) Patch
M ui/aura/window_tree_host.cc View 1 chunk +3 lines, -1 line 0 comments Download
M ui/aura/window_tree_host_unittest.cc View 2 chunks +45 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
Hadi
3 years, 6 months ago (2017-06-06 17:58:10 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
f694603e904f50e047ba9fc52651782ce1a41bd1.

Powered by Google App Engine
This is Rietveld 408576698