• Robbie Gibson's avatar
    Fix NTP omnibox animation when there are suggestions · 2aa19d70
    Robbie Gibson authored
    Before, if there were suggestions on the NTP, they would immediately
    appear. The better animation is to scroll the fakebox up to the top
    of the screen and then present the suggestions.
    
    To do this, when entering the omnibox from NTP, we only focus the
    location bar, which causes the scrolling animation. -fakeboxFocused
    is already called in the animation completion block, which does the
    actual work to make the omnibox text field first responder, causing the
    suggestions to appear.
    
    To finish off, the -locationBarDidBecomeFirstResponder code now only
    focuses the location bar if we are not on the regular NTP.
    
    Bug: 1057643
    Change-Id: I472ee1ee5693fa4102717275bf266f4ab97e121a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2082556
    Commit-Queue: Robbie Gibson <rkgibson@google.com>
    Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
    Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#746450}
    2aa19d70
fakebox_focuser.h 926 Bytes