Sorry for the long review. Most things are copied from the old locations, which will only be removed once we're fully moved to the unified tab strip.
// Copyright 2026 The Chromium AuthorsCopied and moved from chrome/browser/ui/views/tabs/tab_style_views.cc and chrome/browser/ui/tabs/tab_style.cc
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
tab.h/cc isn't used at all when the tabstripunification flag is turned on. It is the legacy implementation that we will be deleting after the feature launch. Can we just leave this class mostly as is for now instead?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
tab.h/cc isn't used at all when the tabstripunification flag is turned on. It is the legacy implementation that we will be deleting after the feature launch. Can we just leave this class mostly as is for now instead?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
overall looking good! this could be broken up to have horizontal and vertical implemented separately to make the cl smaller but since it is all behind the flag I don't think there is any risk of reverts here so I'm not worried.
class TabStyleNew {Could you add a comment explaining that this will replace TabStyle and be renamed after the tabstripunification launch?
std::optional<SkColor> GetGroupColor() const;What is this going to be used for?
const TabView* GetAdjacentTab(bool leading) const;this looks unused for now, is it meant to be used for separators eventually?
(selection_state == TabStyle::TabSelectionState::kActive &&
orientation_ == TabStripOrientation::kHorizontal)
? TabStyle::PathType::kActiveTab
: TabStyle::PathType::kHighlight,This is done in a couple places can this go into a helper method in an unnamed namespace or in some GetPathType in tabstyle?
width = tab_styling()->GetPinnedWidth(split());does this and other references in this method need an if(tab_styling()) check?
const TabView* TabView::GetAdjacentTab(bool leading) const {If this tab is the last tab in a tab group and there are more tabs after it will this work to get those tabs?
const raw_ptr<const Tab> tab_;Is this still needed? Since it is no longer being created in tab.cc removing this could simplify horizontal_tab_style.cc quite a bit
struct TabPathFlags {
TabStyle::RenderUnits render_units = TabStyle::RenderUnits::kPixels;
bool should_paint_extension = true;
};are these not needed for GetPath? Or is it just no longer needed here since it is also in chrome/browser/ui/tabs/tab_style.h?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Discussed on some improvements to the design of this with Vince
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |