Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions patches/helium/ui/experiments/compact-action-toolbar.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down