fix: add patch for DCHECK in fullscreen test

This commit is contained in:
Samuel Attard
2022-06-06 14:30:58 -07:00
parent 2a0b26b025
commit c65280306d
2 changed files with 21 additions and 0 deletions

View File

@@ -111,3 +111,4 @@ make_gtk_getlibgtk_public.patch
build_disable_print_content_analysis.patch
custom_protocols_plzserviceworker.patch
feat_filter_out_non-shareable_windows_in_the_current_application_in.patch
fix_allow_guest_webcontents_to_enter_fullscreen.patch

View File

@@ -0,0 +1,20 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@salesforce.com>
Date: Mon, 6 Jun 2022 14:25:15 -0700
Subject: fix: allow guest webcontents to enter fullscreen
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.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index ea819c1676c7e23506321a7d6520e8063fd639b3..ca6184da995b406ce61a7db7323741e022eccb8a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3412,7 +3412,7 @@ void WebContentsImpl::EnterFullscreenMode(
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
DCHECK(CanEnterFullscreenMode(requesting_frame, options));
DCHECK(requesting_frame->IsActive());
- DCHECK(ContainsOrIsFocusedWebContents());
+ DCHECK(ContainsOrIsFocusedWebContents() || IsGuest());
if (delegate_) {
delegate_->EnterFullscreenModeForTab(requesting_frame, options);