From 296dee49814d3bbf1fbb53807e13cf23b10fab07 Mon Sep 17 00:00:00 2001 From: "sangwoo.ko" Date: Fri, 3 Mar 2023 20:58:23 +0900 Subject: [PATCH] Make browser launch with scrollable tabstrip flag & vertical tabstrip option. There was infinite loop in calculating preferred size. This caused browser not to launch at all, so make it hard to turn off the flag. This patch doesn't fully support kScrollableTabStrip flag but make it possible to open browser so that users can adjust their settings. --- browser/ui/views/tabs/brave_tab_container.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser/ui/views/tabs/brave_tab_container.cc b/browser/ui/views/tabs/brave_tab_container.cc index 154e52a0e022..0e34f6ea4b26 100644 --- a/browser/ui/views/tabs/brave_tab_container.cc +++ b/browser/ui/views/tabs/brave_tab_container.cc @@ -16,6 +16,7 @@ #include "chrome/browser/ui/color/chrome_color_id.h" #include "chrome/browser/ui/layout_constants.h" #include "chrome/browser/ui/tabs/tab_style.h" +#include "chrome/browser/ui/ui_features.h" #include "chrome/browser/ui/views/tabs/tab_drag_controller.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/canvas.h" @@ -111,7 +112,8 @@ gfx::Size BraveTabContainer::CalculatePreferredSize() const { } const auto slots_bounds = layout_helper_->CalculateIdealBounds( - available_width_callback_.is_null() + available_width_callback_.is_null() || + base::FeatureList::IsEnabled(features::kScrollableTabStrip) ? absl::nullopt : absl::optional(available_width_callback_.Run())); height =