• Stephane Zermatten's avatar
    [Autofill Assistant] Smoother scrolling for highlighted element. · 8948cc53
    Stephane Zermatten authored
    This change improves the scrolling for highlighted elements.
    
    Before this change, while scrolling, highlighted elements were updated
    by the periodic update of the element position, which happens every
    100ms. While scrolling, this produces noticeable jumps.
    
    After this change, while scrolling, elements position is updated based
    on the scroll position and the periodic updates are ignored. This means
    that scrolling of the highlighted area follows the UI scrolling, which
    is much smoother.
    
    Note that there can still be a shift between the highlighted area and
    the element, as the web page doesn't always scroll exactly at the same
    speed as the UI elements, but the shift is much smaller and smoother.
    
    Bug: 806868
    Change-Id: Ide5f9b6f0ba472c93ced2dd26b4cbaf2ee14b59f
    Reviewed-on: https://chromium-review.googlesource.com/c/1331401
    Commit-Queue: Stephane Zermatten <szermatt@chromium.org>
    Reviewed-by: default avatarMathias Carlen <mcarlen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#607527}
    8948cc53
element_area.cc 3.59 KB