Commit e4926e07 authored by Caroline Rising's avatar Caroline Rising Committed by Commit Bot

Prevent hover cards from showing while any tabstrip bounds animation is running.

Previously if a mid-tabstrip tab in an uncrowded tabstrip was closed the tabs to the left could show a hover card since their bounds were not animating while the tabs to the right couldn't since they were moving. This change provides more consistent behavior across the tab strip.

This change also fixes a bug where a hover card flashed on the first tab after closing a tab due to focus changing during the tab close.

Bug: 965731
Change-Id: Id7161ec54b5f7bfc564df8f8b819fc828e561663
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2374287Reviewed-by: default avatarDana Fried <dfried@chromium.org>
Commit-Queue: Caroline Rising <corising@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802238}
parent ecf2c3ee
...@@ -1948,8 +1948,8 @@ void TabStrip::OnMouseEventInTab(views::View* source, ...@@ -1948,8 +1948,8 @@ void TabStrip::OnMouseEventInTab(views::View* source,
void TabStrip::UpdateHoverCard(Tab* tab) { void TabStrip::UpdateHoverCard(Tab* tab) {
if (!base::FeatureList::IsEnabled(features::kTabHoverCards)) if (!base::FeatureList::IsEnabled(features::kTabHoverCards))
return; return;
// We don't want to show a hover card for a tab while it is animating. // We don't want to show a hover card while the tabstrip is animating.
if (tab && bounds_animator_.IsAnimating(tab)) { if (bounds_animator_.IsAnimating()) {
return; return;
} }
......
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