Fix shelf icon animation issue
When adding an icon to shelf, two animations occur in sequence: first, icons which are already pinned are moved to leave the space for the new icon; second, the new icon fades in. Now bounds animator is used for both animations through ShelfView::AnimateToIdealBounds. However, ShelfView::AnimateToIdealBounds actually updates the bounds of all icons. As a result, first animation may be interrupted by the second animation. Note that in the second animation, only the opacity of the new icon changes. This CL replaces the bounds animator with layer animation for the second animation. In addition, thanks to the recent change in bounds animator (https://crrev.com/c/2079607), calling SchedulePaint during fade out animation should be unnecessary. Hence this CL also removes that. Bug: 1061984 Change-Id: Ide80042db99ba9ec40e824eb38ed37eb754715f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2114579 Commit-Queue: Andrew Xu <andrewxu@chromium.org> Reviewed-by:Xiyuan Xia <xiyuan@chromium.org> Cr-Commit-Position: refs/heads/master@{#752506}
Showing
Please register or sign in to comment