fix_allow_guest_webcontents_to_enter_fullscreen.patch 1.2 KB

1234567891011121314151617181920
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Samuel Attard <[email protected]>
  3. Date: Mon, 6 Jun 2022 14:25:15 -0700
  4. Subject: fix: allow guest webcontents to enter fullscreen
  5. This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance.
  6. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
  7. index bdeae59df3ff1ece1505086410c6ff1ea6c83386..57c5157e28c26daf3c61497cc9f9e0216325771d 100644
  8. --- a/content/browser/web_contents/web_contents_impl.cc
  9. +++ b/content/browser/web_contents/web_contents_impl.cc
  10. @@ -3660,7 +3660,7 @@ void WebContentsImpl::EnterFullscreenMode(
  11. OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
  12. DCHECK(CanEnterFullscreenMode(requesting_frame, options));
  13. DCHECK(requesting_frame->IsActive());
  14. - DCHECK(ContainsOrIsFocusedWebContents());
  15. + DCHECK(ContainsOrIsFocusedWebContents() || IsGuest());
  16. // When WebView is the `delegate_` we can end up with VisualProperties changes
  17. // synchronously. Notify the view ahead so it can handle the transition.