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

Issue 1405293002: OOPIF: Route keyboard events to focused frame in the browser process. (Closed)

Created:
5 years, 2 months 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, blink-reviews, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@focus-page
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

OOPIF: Route keyboard events to focused frame in the browser process. Previously, keyboard events were always routed to the top frame's RenderWidgetHost. With OOPIF, the top frame then forwarded the event to an appropriate subframe renderer if needed. The extra hop is inefficient and leaks information; moreover, the forwarding broke when mouse event hit-testing in the browser process was introduced. This CL adds logic to send keyboard events directly to the right RenderWidgetHost in the browser process, using the currently focused frame which is already tracked in each FrameTree. This should be supported for Aura, Mac, and Android. BUG=530663, 339659 Committed: https://crrev.com/e2a1799925ea027bd71ea9367280ddfb4403987a Cr-Commit-Position: refs/heads/master@{#357011}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Rebase + test #

Patch Set 4 : Fix compile #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : Rebase #

Patch Set 8 : #

Patch Set 9 : Cleanup #

Total comments: 12

Patch Set 10 : Address Ken's comments #

Total comments: 5

Patch Set 11 : Add edit stack bug reference. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -17 lines) Patch
M content/browser/renderer_host/render_widget_host_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_delegate.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +18 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +59 lines, -10 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M content/test/data/page_with_input_field.html View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 21 (7 generated)
alexmos
Ken, can you please take a first look at this? Overall, this is very much ...
5 years, 2 months ago (2015-10-23 23:40:16 UTC) #3
kenrb
Looks good, sorry it took me a while to get to this. A couple of ...
5 years, 1 month ago (2015-10-28 21:07:05 UTC) #4
alexmos
Thanks for reviewing! https://codereview.chromium.org/1405293002/diff/160001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/1405293002/diff/160001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1680 content/browser/renderer_host/render_widget_host_view_android.cc:1680: if (host_) { On 2015/10/28 21:07:05, ...
5 years, 1 month ago (2015-10-29 05:26:29 UTC) #5
kenrb
lgtm
5 years, 1 month ago (2015-10-29 14:40:57 UTC) #6
alexmos
Charlie, can you please do an owners review? I think the two WebViewTest failures on ...
5 years, 1 month ago (2015-10-29 17:19:00 UTC) #8
Charlie Reis
LGTM! https://codereview.chromium.org/1405293002/diff/180001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/1405293002/diff/180001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode2761 content/browser/renderer_host/render_widget_host_view_aura.cc:2761: // RenderWidgetHosts for OOPIF. Interesting-- is this related ...
5 years, 1 month ago (2015-10-29 18:14:02 UTC) #9
alexmos
Thanks! https://codereview.chromium.org/1405293002/diff/180001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/1405293002/diff/180001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode2761 content/browser/renderer_host/render_widget_host_view_aura.cc:2761: // RenderWidgetHosts for OOPIF. On 2015/10/29 18:14:02, Charlie ...
5 years, 1 month ago (2015-10-29 22:22:08 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1405293002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1405293002/200001
5 years, 1 month ago (2015-10-29 23:44:13 UTC) #13
kenrb
https://codereview.chromium.org/1405293002/diff/180001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/1405293002/diff/180001/content/browser/web_contents/web_contents_impl.cc#newcode1602 content/browser/web_contents/web_contents_impl.cc:1602: focused_frame->current_frame_host()->GetView()->GetRenderWidgetHost()); On 2015/10/29 22:22:08, alexmos wrote: > On 2015/10/29 ...
5 years, 1 month ago (2015-10-29 23:54:40 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/133526)
5 years, 1 month ago (2015-10-30 00:40:44 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1405293002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1405293002/200001
5 years, 1 month ago (2015-10-30 00:44:48 UTC) #18
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years, 1 month ago (2015-10-30 01:27:02 UTC) #19
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/e2a1799925ea027bd71ea9367280ddfb4403987a Cr-Commit-Position: refs/heads/master@{#357011}
5 years, 1 month ago (2015-10-30 01:28:00 UTC) #20
perkj_chrome
5 years, 1 month ago (2015-10-30 11:24:43 UTC) #21
Message was sent while issue was closed.
A revert of this CL (patchset #11 id:200001) has been created in
https://codereview.chromium.org/1407173005/ by perkj@chromium.org.

The reason for reverting is:
SitePerProcessBrowserTest.SubframeKeyboardEventRouting is flaky on Windows 7.


http://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=...

http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%281%29/buil....

Powered by Google App Engine
This is Rietveld 408576698