• Tessa Nijssen's avatar
    [Views] Set Correct Menu Orientation · 32795d8e
    Tessa Nijssen authored
    Toolkit-views menus positioned with POSITION_BEST_FIT are be
    positioned to the side of the anchor when the menu height is greater
    than ~50% of the screen. Currently in this situation, the "actual"
    position of the menu is incorrectly recorded as POSITION_BELOW_BOUNDS.
    If a menu delegate invokes MenuChildrenChanged() and recalculates the
    menu bounds, this can cause the menu to reposition itself under
    the anchor rather than remaining to the side.
    
    To fix, record the "actual" position as POSITION_BEST_FIT in this
    situation.
    
    Bug: 840919
    Change-Id: I4102e014c058b2f89d5bc38b7b4371c010367119
    Reviewed-on: https://chromium-review.googlesource.com/1087516
    Commit-Queue: Tessa Nijssen <tnijssen@google.com>
    Reviewed-by: default avatarSarah Chan <spqchan@chromium.org>
    Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#565352}
    32795d8e
menu_controller.cc 103 KB