e02cf8674d
* chore: bump chromium in DEPS to 117.0.5896.0 * chore: update patches * 4622260: [Service Workers] Allow fetches from workers to use auto-picked certs https://chromium-review.googlesource.com/c/chromium/src/+/4622260 * chore: bump chromium in DEPS to 117.0.5897.0 * 4665672: [ProfileSelections] Transition extension keyed factories to use Profile Selections https://chromium-review.googlesource.com/c/chromium/src/+/4665672 * chore: fixup patch indices --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
Date: Thu, 4 Oct 2018 14:57:02 -0700
|
|
Subject: fix: also propagate fullscreen state for outer frame
|
|
|
|
When entering fullscreen with Element.requestFullscreen in child frames,
|
|
the parent frame should also enter fullscreen mode too. Chromium handles
|
|
this for iframes, but not for webviews as they are essentially main
|
|
frames instead of child frames.
|
|
|
|
This patch makes webviews propagate the fullscreen state to embedder.
|
|
|
|
Note that we also need to manually update embedder's
|
|
`api::WebContents::IsFullscreenForTabOrPending` value.
|
|
|
|
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
|
index 15011d7efd9f1f239e425904c8c22511e49dff88..b9ecdb1d4fde213ea48133285a346557624d1e7f 100644
|
|
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
|
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
|
@@ -7223,6 +7223,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
|
}
|
|
}
|
|
|
|
+ // Entering fullscreen from webview should also notify its outer frame.
|
|
+ if (frame_tree_node()->render_manager()->IsMainFrameForInnerDelegate()) {
|
|
+ RenderFrameProxyHost* outer_proxy =
|
|
+ frame_tree_node()->render_manager()->GetProxyToOuterDelegate();
|
|
+ DCHECK(outer_proxy);
|
|
+ if (outer_proxy->is_render_frame_proxy_live()) {
|
|
+ outer_proxy->GetAssociatedRemoteFrame()->WillEnterFullscreen(
|
|
+ options.Clone());
|
|
+ }
|
|
+ }
|
|
+
|
|
// Focus the window if another frame may have delegated the capability.
|
|
if (had_fullscreen_token && !GetView()->HasFocus())
|
|
GetView()->Focus();
|