From 593dfef193fb25f1fe8327f41f150218edb64cb3 Mon Sep 17 00:00:00 2001 From: brave-builds <45370463+brave-builds@users.noreply.github.com> Date: Thu, 9 Jan 2025 07:39:17 +0100 Subject: [PATCH] Don't need to have rounded contents margin in tab-fullscreen (uplift to 1.74.x) (#27166) Uplift of #27150 (squashed) to release --- 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 =