Commit a751e8c7 authored by Sophey Dong's avatar Sophey Dong Committed by Commit Bot

[SendTabToSelf] Reset slide animation if icon is not visible.

This fixes the bug where the STTS icon overlaps with the bookmark icon when the animation gets interrupted by reloading the page.

Bug: 1085708
Change-Id: I1296d282afb2a8e5e6ec1500db9828856701be57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2217768Reviewed-by: default avatarKristi Park <kristipark@chromium.org>
Commit-Queue: Sophey Dong <sophey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772333}
parent fa7d65cf
...@@ -143,6 +143,9 @@ void SendTabToSelfIconView::AnimationEnded(const gfx::Animation* animation) { ...@@ -143,6 +143,9 @@ void SendTabToSelfIconView::AnimationEnded(const gfx::Animation* animation) {
} }
void SendTabToSelfIconView::UpdateOpacity() { void SendTabToSelfIconView::UpdateOpacity() {
if (!GetVisible()) {
ResetSlideAnimation(false);
}
if (!IsShrinking()) { if (!IsShrinking()) {
DestroyLayer(); DestroyLayer();
SetTextSubpixelRenderingEnabled(true); SetTextSubpixelRenderingEnabled(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