Correctly register RenderFrames with their associated RenderWidgets
Currently all RenderFrameImpls call RegisterRenderFrame on the
RenderView, and additionally, out-of-process iframe RFIs call it on the
RenderWidgets that they own.
This is incorrect for local child frames of OOPIFs, because they need
to register with the OOPIF's RenderWidget also.
This patch corrects and simplifies RenderFrameImpl widget registration,
making all of them register with their associated widgets after their
WebFrame is created, and unregister just before their WebFrame is
destroyed.
Bug: 770622
Change-Id: I51be01147d3a810bf6e6c0214150b3714ea1c181
Reviewed-on: https://chromium-review.googlesource.com/791071
Commit-Queue: Ken Buchanan <[email protected]>
Reviewed-by: Alex Moshchuk <[email protected]>
Cr-Commit-Position: refs/heads/master@{#520196}
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 08e18505..a06fdcd 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -865,6 +865,7 @@
FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
FRIEND_TEST_ALL_PREFIXES(RenderAccessibilityImplTest,
AccessibilityMessagesQueueWhileSwappedOut);
+ FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest, LocalChildFrameWasShown);
FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest, ZoomLimit);
FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest,
TestOverlayRoutingTokenSendsLater);