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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: nit addressed Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_widget_host_view_child_frame.cc
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 5e4e948e73a04cb6dac8c623b0ef40611815fcf0..9d3543044f1be2923585246f99f40edb0baf7061 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -391,6 +391,13 @@ void RenderWidgetHostViewChildFrame::UpdateViewportIntersection(
viewport_intersection));
}
+void RenderWidgetHostViewChildFrame::SetIsInert() {
+ if (host_ && frame_connector_) {
+ host_->Send(new ViewMsg_SetIsInert(host_->GetRoutingID(),
+ frame_connector_->is_inert()));
+ }
+}
+
void RenderWidgetHostViewChildFrame::GestureEventAck(
const blink::WebGestureEvent& event,
InputEventAckState ack_result) {
@@ -630,8 +637,18 @@ bool RenderWidgetHostViewChildFrame::IsRenderWidgetHostViewChildFrame() {
}
void RenderWidgetHostViewChildFrame::WillSendScreenRects() {
- if (frame_connector_)
+ // TODO(kenrb): These represent post-initialization state updates that are
+ // needed by the renderer. During normal OOPIF setup these are unnecessary,
+ // as the parent renderer will send the information and it will be
+ // immediately propagated to the OOPIF. However when an OOPIF navigates from
+ // one process to another, the parent doesn't know that, and certain
+ // browser-side state needs to be sent again. There is probably a less
+ // spammy way to do this, but triggering on SendScreenRects() is reasonable
+ // until somebody figures that out. RWHVCF::Init() is too early.
+ if (frame_connector_) {
UpdateViewportIntersection(frame_connector_->viewport_intersection());
+ SetIsInert();
+ }
}
#if defined(OS_MACOSX)
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_child_frame.h ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698