This commit is contained in:
Marshall Greenblatt 2023-11-07 17:14:02 -05:00
parent 3837f209e1
commit 2b38e2f793
1 changed files with 10 additions and 0 deletions

View File

@ -24,6 +24,8 @@
#include "chrome/browser/ui/browser_tabstrip.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/keyboard_event_processing_result.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/input/native_web_keyboard_event.h"
using content::KeyboardEventProcessingResult;
@ -379,6 +381,14 @@ void ChromeBrowserDelegate::ExitFullscreenModeForTab(
if (auto delegate = GetDelegateForWebContents(web_contents)) {
delegate->ExitFullscreenModeForTab(web_contents);
}
// Workaround for https://crbug.com/1500371. Ensure WebContents exits
// fullscreen state by explicitly sending a resize message.
if (auto* rwhv = web_contents->GetRenderWidgetHostView()) {
if (auto* render_widget_host = rwhv->GetRenderWidgetHost()) {
render_widget_host->SynchronizeVisualProperties();
}
}
}
void ChromeBrowserDelegate::CanDownload(