• Vladislav Kaznacheev's avatar
    Fix double app icon when dragging app to shelf · e41bbad7
    Vladislav Kaznacheev authored
    When an app is being dragged from app list to shelf,
    a new shelf item is created and made hidden by setting
    its size to (0,0). It is supposed to stay at this size
    until the drag is complete.
    
    However, if a drag started very soon after some other shelf
    manipulation (e.g. drag leaving the shelf and re-entering quickly),
    it is possible for AnimateToIdealBounds to be called asynchronously.
    The hidden item's bounds will be animated to full size, resulting
    in a visible icon.
    
    This CL makes AnimateToIdealBounds ignore shelf items with (0,0) size.
    
    Bug: 985631
    Test: manual
    Change-Id: Ieb23beb6ecf635ae60613f5f6217219f7963999b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1862507
    Commit-Queue: Vladislav Kaznacheev <kaznacheev@chromium.org>
    Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
    Auto-Submit: Vladislav Kaznacheev <kaznacheev@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#706148}
    e41bbad7
shelf_view.cc 93.5 KB