From 0ec967b7d62ab1db850d16fc1cfc6fb4678cb0de Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 14 Dec 2025 16:01:08 +0600 Subject: [PATCH] helium/ui/cat: fix layout breakage when exiting fullscreen, again (#616) --- .../experiments/compact-action-toolbar.patch | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/patches/helium/ui/experiments/compact-action-toolbar.patch b/patches/helium/ui/experiments/compact-action-toolbar.patch index 9678f633..02b3e5a0 100644 --- a/patches/helium/ui/experiments/compact-action-toolbar.patch +++ b/patches/helium/ui/experiments/compact-action-toolbar.patch @@ -122,21 +122,23 @@ // TODO(pbos): Investigate whether the side panels should be creatable when --- a/chrome/browser/ui/views/frame/layout/browser_view_layout_impl_old.cc +++ b/chrome/browser/ui/views/frame/layout/browser_view_layout_impl_old.cc -@@ -411,6 +411,13 @@ void BrowserViewLayoutImplOld::LayoutTab - views().tab_strip_region_view->SetBounds(0, 0, 0, 0); - return; - } +@@ -406,6 +406,15 @@ void BrowserViewLayoutImplOld::LayoutVer + void BrowserViewLayoutImplOld::LayoutTabStripRegion( + gfx::Rect& available_bounds) { + TRACE_EVENT0("ui", "BrowserViewLayout::LayoutTabStripRegion"); + -+ // If the CAT feature is enabled, then the tab strip is in the toolbar. -+ // We shouldn't layout it here. -+ if (features::IsHeliumCatEnabled()) { ++ // If the CAT feature is enabled and we're in a normal browser, ++ // skip laying out the tab strip region. It's laid out in the toolbar. ++ // The tab strip isn't drawn in other browser types, so the next ++ // if statement will hide it. ++ if (features::IsHeliumCatEnabled() && browser()->is_type_normal()) { + return; + } + - // This retrieves the bounds for the tab strip based on whether or not we show - // anything to the left of it, like the incognito avatar. - gfx::Rect tab_strip_region_bounds( -@@ -458,6 +465,15 @@ void BrowserViewLayoutImplOld::LayoutToo + if (!delegate().ShouldDrawTabStrip()) { + SetViewVisibility(views().tab_strip_region_view, false); + views().tab_strip_region_view->SetBounds(0, 0, 0, 0); +@@ -458,6 +467,15 @@ void BrowserViewLayoutImplOld::LayoutToo toolbar_bounds.set_x(available_bounds.x()); toolbar_bounds.set_width(toolbar_bounds.width() - kVerticalTabStripWidth); views().toolbar->SetBoundsRect(toolbar_bounds);