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

Only reset tab hover card mouse exit timestamp if the hover card is showing when exiting a tab.

Bug: 1013958
Change-Id: Ic653e7febf1161b23ed1ccc0e2f2b4fecc1f7817
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880584
Commit-Queue: Caroline Rising <corising@chromium.org>
Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709960}
parent ba8f9cdc
......@@ -449,6 +449,10 @@ void TabHoverCardBubbleView::UpdateAndShow(Tab* tab) {
}
}
bool TabHoverCardBubbleView::IsVisible() {
return widget_->IsVisible();
}
void TabHoverCardBubbleView::FadeOutToHide() {
delayed_show_timer_.Stop();
RegisterToThumbnailImageUpdates(nullptr);
......
......@@ -40,6 +40,8 @@ class TabHoverCardBubbleView : public views::BubbleDialogDelegateView,
void UpdateAnchorBounds(gfx::Rect anchor_bounds);
bool IsVisible();
void FadeOutToHide();
bool IsFadingOut() const;
......
......@@ -3145,8 +3145,10 @@ void TabStrip::OnMouseEntered(const ui::MouseEvent& event) {
}
void TabStrip::OnMouseExited(const ui::MouseEvent& event) {
if (base::FeatureList::IsEnabled(features::kTabHoverCards) && hover_card_)
if (base::FeatureList::IsEnabled(features::kTabHoverCards) && hover_card_ &&
hover_card_->IsVisible()) {
hover_card_->set_last_mouse_exit_timestamp(base::TimeTicks::Now());
}
UpdateHoverCard(nullptr);
}
......
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