Commit 008850e8 authored by Taylor Bergquist's avatar Taylor Bergquist Committed by Commit Bot

Fix tab closing mode inflating tabstrip width in some cases.

Bug: 1145905
Change-Id: I59ae16d3b6a87f1341fdfb187588d8b99e5a3805
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2528182
Commit-Queue: Taylor Bergquist <tbergquist@chromium.org>
Reviewed-by: default avatarCharlene Yan <cyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826487}
parent 52c253e3
......@@ -2537,6 +2537,15 @@ void TabStrip::StartRemoveTabAnimation(int model_index, bool was_active) {
UpdateIdealBounds();
AnimateToIdealBounds();
if (in_tab_close_ && model_count > 0 &&
override_available_width_for_tabs_ >
ideal_bounds(model_count - 1).right()) {
// Tab closing mode is no longer constraining tab widths - they're at full
// size. Exit tab closing mode so that it doesn't artificially inflate the
// tabstrip's bounds.
ExitTabClosingMode();
}
// TODO(pkasting): When closing multiple tabs, we get repeated RemoveTabAt()
// calls, each of which closes a new tab and thus generates different ideal
// bounds. We should update the animations of any other tabs that are
......
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