• Peter Kasting's avatar
    [omnibox] Move some updates from Invalidate() to SetMatch(). · eb0ced86
    Peter Kasting authored
    Invalidate() is called more frequently (e.g. on color changes), while SetMatch()
    is called only when the match actually changes.  So anything that is tied to the
    match's content (e.g. the suggestion or keyword contents/description) can be
    updated in SetMatch() instead of Invalidate() to save work without visible
    change.
    
    Also tweaks Layout() to check the keyword view's visibility instead of the
    underlying state that controls it.
    
    Bug: none
    Change-Id: Ia0b7ca2566a621ad9315e54313f584c21f999668
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1857649Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
    Commit-Queue: Justin Donnelly <jdonnelly@chromium.org>
    Auto-Submit: Peter Kasting <pkasting@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#706217}
    eb0ced86
omnibox_result_view.cc 19.4 KB