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

Issue 1463153002: Don't route a non-frame widget's keyboard event to main frame widget. (Closed)

Created:
5 years, 1 month ago by alexmos
Modified:
5 years, 1 month ago
Reviewers:
kenrb, Charlie Reis
CC:
chromium-reviews, creis+watch_chromium.org, yusukes+watch_chromium.org, shuchen+watch_chromium.org, nasko+codewatch_chromium.org, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't route a non-frame widget's keyboard event to main frame widget. After keyboard event routing was updated for out-of-process iframes (https://codereview.chromium.org/1405293002/), we started routing all events to the main frame when site isolation is disabled. This works fine for things like popup menu widgets, since Blink contains a codepath for forwarding input events to an active popup widget, if it exists (see m_pagePopup check in WebViewImpl::handleKeyEvent()) -- so both before and after, we reach the handling in WebPagePopupImpl::handleKeyEvent. Unfortunately, that forwarding doesn't get hit for fullscreen widgets create for Pepper Flash, so those widgets fail to receive keyboard events properly. This CL changes keyboard event routing so that it won't try to look up focused frames when keyboard events arrive at anything other than the main frame widget. I.e., all non-frame widgets like popup menus will handle key events directly, as was the case before https://codereview.chromium.org/1405293002/. BUG=555524 Committed: https://crrev.com/c4cbacbea47af5c139bb8ed7a51e8d22ff2a97fd Cr-Commit-Position: refs/heads/master@{#360980}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address Charlie's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -31 lines) Patch
M content/browser/renderer_host/render_widget_host_delegate.h View 1 1 chunk +11 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_delegate.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 1 chunk +2 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 1 chunk +2 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 1 chunk +2 lines, -6 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 1 chunk +9 lines, -3 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
alexmos
Charlie and Ken, what do you think about this fix? Basically, I realize that I ...
5 years, 1 month ago (2015-11-20 02:39:15 UTC) #2
Charlie Reis
Thanks! LGTM with some naming questions. https://codereview.chromium.org/1463153002/diff/1/content/browser/renderer_host/render_widget_host_delegate.h File content/browser/renderer_host/render_widget_host_delegate.h (right): https://codereview.chromium.org/1463153002/diff/1/content/browser/renderer_host/render_widget_host_delegate.h#newcode121 content/browser/renderer_host/render_widget_host_delegate.h:121: // When a ...
5 years, 1 month ago (2015-11-20 19:24:12 UTC) #3
alexmos
Thanks! https://codereview.chromium.org/1463153002/diff/1/content/browser/renderer_host/render_widget_host_delegate.h File content/browser/renderer_host/render_widget_host_delegate.h (right): https://codereview.chromium.org/1463153002/diff/1/content/browser/renderer_host/render_widget_host_delegate.h#newcode121 content/browser/renderer_host/render_widget_host_delegate.h:121: // When a RenderWidgetHost |rwh| receives a keyboard ...
5 years, 1 month ago (2015-11-20 23:27:41 UTC) #4
Charlie Reis
I like it. LGTM.
5 years, 1 month ago (2015-11-20 23:31:38 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1463153002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1463153002/20001
5 years, 1 month ago (2015-11-21 00:13:24 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 1 month ago (2015-11-21 01:29:31 UTC) #8
commit-bot: I haz the power
5 years, 1 month ago (2015-11-21 01:30:45 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/c4cbacbea47af5c139bb8ed7a51e8d22ff2a97fd
Cr-Commit-Position: refs/heads/master@{#360980}

Powered by Google App Engine
This is Rietveld 408576698