• Andrew Xu's avatar
    Make the icon's final bounds be minimization's target bounds · 982a5694
    Andrew Xu authored
    The current minimization animation, which is triggered by going to
    home screen from in-app shelf, uses the bounds of the icon
    which corresponds to the active window to be minimized as the
    animation's target bounds. However, hotseat's bounds change due to
    entering the home screen. As a result, the target bounds are not the
    final bounds.
    
    This CL fixes the issue by providing an interface to calculate
    the icon's bounds according to the hotseat's target bounds instead
    of the actual bounds.
    
    There are four ways to show the home screen from in-app shelf:
    (1) Press the home button.
    (2) Gesture fling up on the hotseat.
    (3) Back gesture.
    (4) Tap on the shelf icon.
    
    In case (1), hotseat's target bounds have been set before starting
    the window scaling animation. In other cases, target bounds are not
    set yet. Thanks to https://crrev.com/c/1999443, case 3 and case 4 are
    solved. The last one, case 2, will be fixed in the following CL.
    
    Bug: 1030819
    Change-Id: I63cafabe6527aba49e9f98e338f9f248284e1d0d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1996268
    Commit-Queue: Andrew Xu <andrewxu@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#732416}
    982a5694
scrollable_shelf_view.h 19.4 KB