• Andrew Xu's avatar
    Hot track the child button when the mouse hovering on the host item · b3c9cc19
    Andrew Xu authored
    MenuController::HandleMouseLocation() called in
    MenuController::OnMouseMoved() calls MenuController::SetSelection()
    which may reset the hot-tracked view. Meanwhile, in OnMouseMoved(),
    the hot-tracked view updates before HandleMouseLocation(). As a result,
    the hot-tracked view may fail to update after the mouse move event.
    
    This bug should have existed for long time. But it is not noticeable
    on real devices: when a user moves the mouse, it usually creates more
    than one mouse move events. Then the second mouse move event updates
    the hot-tracked view.
    
    This CL updates the hot-tracked view after HandleMouseLocation().
    
    Bug: 1135000
    Change-Id: Iae810563e897d75912bcc140ed56022d72e3170c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2448650Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Commit-Queue: Andrew Xu <andrewxu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#814039}
    b3c9cc19
menu_controller.cc 116 KB