• Toni Barzic's avatar
    shelf: No fade animation when removing shelf item with 0 opacity · 8c2b7e90
    Toni Barzic authored
    When removing an item from a shelf view, the animation to update item
    bounds depends on view visibility:
    *   if view is visible, the view first fades out, then the rest of the
        items' bounds are updated
    *   if view is not visible, the view is removed, and the rest of the
        items' bounds animate immediately.
    
    Though, whether the view is visible is determined only by using
    View::GetVisible(), while the view may be in visible state, with zero
    opacity (e.g. during drag and drop from launcher). This case should be
    handled the same way as views whose visibility is set to false.
    (Otherwise, removing dragged launcher item from shelf apparently happens
    in two stages - first items right of the last dragged item spot move
    left to fill out the void, and then all items animate right to center
    the hotseat).
    
    BUG=1042493
    
    Change-Id: Ic81c0ab24797714f1223d8c8e21282066360dea7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2026348Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Commit-Queue: Toni Baržić <tbarzic@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#736155}
    8c2b7e90
shelf_view_unittest.cc 185 KB