Commit b6a212a5 authored by Taylor Bergquist's avatar Taylor Bergquist Committed by Commit Bot

Disable stacked tabs with tab scrolling on.

Previously, with tab scrolling on and stacked tabs both on,
the tabstrip was being put into the ScrollView, but stacked
tabs never let the tabstrip width grow beyond the available
width, so it never became scrollable. Now, tab scrolling
prevents stacked tabs layout from being enabled.

Bug: 1145746
Change-Id: I1e2196138566e3998a59639baeb6dfe9e3742065
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2522509Reviewed-by: default avatarCharlene Yan <cyan@chromium.org>
Commit-Queue: Taylor Bergquist <tbergquist@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825070}
parent e3355c85
...@@ -3431,6 +3431,12 @@ bool TabStrip::NeedsTouchLayout() const { ...@@ -3431,6 +3431,12 @@ bool TabStrip::NeedsTouchLayout() const {
if (!group_views_.empty()) if (!group_views_.empty())
return false; return false;
// If tab scrolling is on, the layout will not be swapped; tab scrolling is
// a replacement to stacked tabs providing similar functionality across both
// touch and non-touch platforms.
if (base::FeatureList::IsEnabled(features::kScrollableTabStrip))
return false;
const int pinned_tab_count = GetPinnedTabCount(); const int pinned_tab_count = GetPinnedTabCount();
const int normal_count = tab_count() - pinned_tab_count; const int normal_count = tab_count() - pinned_tab_count;
if (normal_count <= 1) if (normal_count <= 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment