From c39ef539f09743034dc689373bef924a796ad098 Mon Sep 17 00:00:00 2001 From: brave-builds Date: Wed, 8 Jan 2025 23:01:25 +0000 Subject: [PATCH] Uplift of #27150 (squashed) to beta --- browser/ui/views/frame/brave_browser_view_layout.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/browser/ui/views/frame/brave_browser_view_layout.cc b/browser/ui/views/frame/brave_browser_view_layout.cc index b84cf4b1ca0b..db30e273c677 100644 --- a/browser/ui/views/frame/brave_browser_view_layout.cc +++ b/browser/ui/views/frame/brave_browser_view_layout.cc @@ -266,6 +266,13 @@ void BraveBrowserViewLayout::UpdateContentsContainerInsets( // Control contents's margin with sidebar & vertical tab state. gfx::Insets contents_margins = GetContentsMargins(); + // Don't need to have additional contents margin for rounded corners + // in tab-initiated fullscreen. Web contents occupies whole screen. + if (IsFullscreenForTab()) { + contents_container_bounds.Inset(contents_margins); + return; + } + // In rounded corners mode, we need to include a little margin so we have // somewhere to draw the shadow. int contents_margin_for_rounded_corners =