• Min Chen's avatar
    Update split view divider position on work area bounds. · ca9a3f3e
    Min Chen authored
    Work area is not always starts from the top of the display, e.g, docked
    magnifier will put a view port window at the top area of the display.
    This will cause that in portrait screen orientation, the height of the
    work area is not always larger than the width of the work area. This cl
    tried to fix this by updating the divider position on
    |divider_closest_ratio_| instead on relying on the longer side of the
    work area.
    This cl also fixed the wrong bounds of the preview area, which was set
    in its own view coordinate. So should special consider the case that
    work area is not from the top of the display too.
    
    Bug: 866680, 897900
    Change-Id: I86a98aee52ecbd706385cda0a639e5182997914b
    Reviewed-on: https://chromium-review.googlesource.com/c/1292833
    Commit-Queue: Min Chen <minch@chromium.org>
    Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#602364}
    ca9a3f3e
split_view_controller.cc 59.9 KB