• Darren Shen's avatar
    [VK] Fix work area bug in shelf layout manager. · 8aff076a
    Darren Shen authored
    In a previous CL [1], we made changes to the shelf layout manager to
    use occluded and displaced bounds. However, we introduced a bug where
    the work area would not reset when we hide the accessibility keyboard,
    leaving a large gap in the screen.
    
    The code now makes more sense: we should be changing the work area
    whenever the displaced bounds change.
    
    We add a test for this. We also removed some calls to |LayoutShelf| in
    existing tests; |LayoutShelf| doesn't get called in real situations.
    Calling |LayoutShelf| manually will always change the work area,
    which is not what happens in practice.
    
    [1] https://chromium-review.googlesource.com/c/chromium/src/+/1146530
    
    TBR=jamescook@chromium.org
    
    Bug: 870503
    Change-Id: I80a6aa90f1bce8e59e6c7cde2e3f181c31fc6907
    Reviewed-on: https://chromium-review.googlesource.com/1160827Reviewed-by: default avatarDarren Shen <shend@chromium.org>
    Commit-Queue: Darren Shen <shend@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#580394}
    8aff076a
shelf_layout_manager.cc 52.1 KB