Commit ee0fd96b authored by Dana Fried's avatar Dana Fried Committed by Commit Bot

Make sure collapsed tabs are not visible.

Fixes a bug where a clipped favicon was sometimes visible in a collapsed
tab even when the tab is collapsed.

Tabs which are in collapsed groups *and* which are zero-width (so not
counting tabs which are animating to or from the collapsed state) now
cause TabStrip::ShouldTabBeVisible() to return false.

Bug: 1094051
Change-Id: Ie696a6e8442f6a4a761b7dee279da2e1a96ea1e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2251738
Commit-Queue: Charlene Yan <cyan@chromium.org>
Reviewed-by: default avatarCharlene Yan <cyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779843}
parent e67aad4f
......@@ -1380,6 +1380,11 @@ bool TabStrip::ShouldTabBeVisible(const Tab* tab) const {
if (tab->detached())
return false;
if (tab->group() && controller()->IsGroupCollapsed(*tab->group()) &&
tab->bounds().IsEmpty()) {
return false;
}
// When stacking tabs, all tabs should always be visible.
if (stacked_layout_)
return true;
......
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