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

Issue 1406103005: Preserve page-level focus for subframe cross-process navigations. (Closed)

Created:
5 years, 2 months ago by alexmos
Modified:
5 years, 1 month ago
Reviewers:
kenrb, Charlie Reis
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, 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

Preserve page-level focus for subframe cross-process navigations. Currently, CommitPending contains logic to remember if the old RFH's RWHV was focused, and if so, focus the new frame's RWHV. In the case of subframes, however, this logic doesn't work, as RWHVChildFrame::HasFocus always returned false. This CL adds the logic to properly retrieve page focus for subframes and propagate it to the subframe's renderer, building on logic introduced in my earlier page-level focus CL (https://codereview.chromium.org/1394383002). BUG=530663, 339659 Committed: https://crrev.com/0d7e0b09bb13053bf480cc22a1cbfff1b47e8fee Cr-Commit-Position: refs/heads/master@{#356961}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 7

Patch Set 4 : Address Charlie's comments #

Total comments: 2

Patch Set 5 : Add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -28 lines) Patch
M content/browser/frame_host/cross_process_frame_connector.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/frame_host/cross_process_frame_connector.cc View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree.cc View 1 2 3 1 chunk +10 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 1 chunk +8 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_manager_unittest.cc View 1 2 3 5 chunks +83 lines, -23 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 19 (5 generated)
alexmos
Charlie, can you please take a look? This CL fixes the scenario where if A ...
5 years, 2 months ago (2015-10-22 21:33:40 UTC) #2
Charlie Reis
Ken, can you take a first look? You're probably a better reviewer for this than ...
5 years, 2 months ago (2015-10-23 00:05:35 UTC) #3
Charlie Reis
I went ahead and reviewed, and it seems good to me. I think it's probably ...
5 years, 2 months ago (2015-10-23 21:41:53 UTC) #4
alexmos
Thanks for reviewing! (Sorry, a rebase sneaked into the PS where I addressed your comments.) ...
5 years, 2 months ago (2015-10-24 00:41:43 UTC) #5
Charlie Reis
Thanks, LGTM. Ken, do you agree? https://codereview.chromium.org/1406103005/diff/60001/content/browser/frame_host/cross_process_frame_connector.h File content/browser/frame_host/cross_process_frame_connector.h (right): https://codereview.chromium.org/1406103005/diff/60001/content/browser/frame_host/cross_process_frame_connector.h#newcode102 content/browser/frame_host/cross_process_frame_connector.h:102: bool HasFocus(); nit: ...
5 years, 1 month ago (2015-10-27 20:34:33 UTC) #6
kenrb
Yes, this is the right approach. lgtm
5 years, 1 month ago (2015-10-29 16:41:41 UTC) #7
alexmos
https://codereview.chromium.org/1406103005/diff/60001/content/browser/frame_host/cross_process_frame_connector.h File content/browser/frame_host/cross_process_frame_connector.h (right): https://codereview.chromium.org/1406103005/diff/60001/content/browser/frame_host/cross_process_frame_connector.h#newcode102 content/browser/frame_host/cross_process_frame_connector.h:102: bool HasFocus(); On 2015/10/27 20:34:32, Charlie Reis wrote: > ...
5 years, 1 month ago (2015-10-29 16:42:42 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1406103005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1406103005/80001
5 years, 1 month ago (2015-10-29 16:43:12 UTC) #11
alexmos
Argh, I can't get a working run for this on linux_site_isolation due to the compile ...
5 years, 1 month ago (2015-10-29 18:07:38 UTC) #13
Charlie Reis
On 2015/10/29 18:07:38, alexmos wrote: > Argh, I can't get a working run for this ...
5 years, 1 month ago (2015-10-29 18:34:39 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1406103005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1406103005/80001
5 years, 1 month ago (2015-10-29 21:12:36 UTC) #16
alexmos
On 2015/10/29 18:34:39, Charlie Reis wrote: > On 2015/10/29 18:07:38, alexmos wrote: > > Argh, ...
5 years, 1 month ago (2015-10-29 21:20:02 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 1 month ago (2015-10-29 22:11:57 UTC) #18
commit-bot: I haz the power
5 years, 1 month ago (2015-10-29 22:12:52 UTC) #19
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/0d7e0b09bb13053bf480cc22a1cbfff1b47e8fee
Cr-Commit-Position: refs/heads/master@{#356961}

Powered by Google App Engine
This is Rietveld 408576698