Commit 450f7657 authored by Taylor Bergquist's avatar Taylor Bergquist Committed by Commit Bot

[Tab Scrolling] Position NTB correctly.

Bug: 1094033
Change-Id: If3fb879e2624833eb8448a61bab57891258f17bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2241646Reviewed-by: default avatarConnie Wan <connily@chromium.org>
Commit-Queue: Taylor Bergquist <tbergquist@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777560}
parent 853ea0ae
...@@ -3180,10 +3180,13 @@ void TabStrip::UpdateIdealBounds() { ...@@ -3180,10 +3180,13 @@ void TabStrip::UpdateIdealBounds() {
const int trailing_x = const int trailing_x =
layout_helper_->UpdateIdealBounds(available_width_for_tabs); layout_helper_->UpdateIdealBounds(available_width_for_tabs);
int ntb_x_offset =
base::FeatureList::IsEnabled(features::kScrollableTabStrip)
? trailing_x
: std::min(available_width_for_tabs, trailing_x);
new_tab_button_ideal_bounds_.set_origin( new_tab_button_ideal_bounds_.set_origin(
gfx::Point(std::min(available_width_for_tabs, trailing_x) + gfx::Point(ntb_x_offset + TabToNewTabButtonSpacing(), 0));
TabToNewTabButtonSpacing(),
0));
} }
} }
......
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