DescriptionMove browser-to-renderer opener plumbing to frame routing IDs.
This CL allows a new RenderView to set its main frame's opener to any
frame, rather than a top-level frame. I.e., it is now possible to use
window.opener to refer to a cross-process subframe.
Summary of changes:
* The ViewMsg_New IPC now passes the opener's frame ID rather than
view ID. RenderView::Initialize resolves this into the opener's
WebFrame.
* The flow of opener routing IDs from RFHM::InitRenderView to
RenderViewHostImpl::CreateRenderView (which sends the IPC) is moved
from view to frame IDs.
* The passing of opener routing IDs from CreateOpenerProxies, etc.,
into RFHM::InitRenderView is removed. Instead, InitRenderView now
looks up the proper opener frame routing ID itself. This is because
(1) the previous flow would complicate implementing opener updates,
which would allow subframes to have openers and FrameTrees to have
more than one opener to traverse, and (2) previous plumbing missed
some cases (e.g., creating swapped-out RVs via
CreateRenderFrameProxy or CreateProxiesForSiteInstance), and fixing
this would add more complexity.
* There are paths where the opener chain is intentionally suppressed
from a new RenderView, for example for <webview>: see
WCI::CreateSwappedOutRenderView and EnsureOpenerProxiesExist. This
is now supported via an explicit flag which is passed into
InitRenderView rather than passing around MSG_ROUTING_NONE for the
opener's routing ID.
BUG=225940, 304341
Committed: https://crrev.com/5ac402d1ed5d323a9ea9223c2acf213b5dfc9aaa
Cr-Commit-Position: refs/heads/master@{#337995}
Patch Set 1 #Patch Set 2 : Rebase #Patch Set 3 : Fix unit tests #Patch Set 4 : Fix Android #Patch Set 5 : Draft RV->RF ID conversion #Patch Set 6 : Rebase #Patch Set 7 : Rebase; add missing opener info to CreateRenderFrameProxy #Patch Set 8 : Fix Android build #Patch Set 9 : Use suppress_opener plumbing #Patch Set 10 : Cleanup #Patch Set 11 : More cleanup #
Total comments: 29
Patch Set 12 : Address Nasko's comments #Patch Set 13 : Remove suppress_opener #Messages
Total messages: 13 (2 generated)
|