• Sandra Sun's avatar
    Latch to the node with non-auto overscroll-behavior · 7d25f2f7
    Sandra Sun authored
    When we overscroll a scroller with non-auto overscroll-behavior at its
    scroll extent, no node will be added to the scroll chain, because the
    scroller can not consume the current delta. However, if we then scroll
    the scroller to the opposite direction in the same gesture, the scroller
    won't respond to that because it's not the CurrentlyScrollingNode.
    
    This patch adds the first node with non-auto overscroll-behavior to the
    scroll chain regardlessly, as it's the only node we can latch to, even
    if it cannot consume the current delta. So when we change the scroll
    direction, the scroller can still respond to the later events.
    
    Bug: 798543
    Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
    Change-Id: I8baa77ae6690e095de3018cb112185f48f0854a8
    Reviewed-on: https://chromium-review.googlesource.com/848314Reviewed-by: default avatarAli Juma <ajuma@chromium.org>
    Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
    Commit-Queue: Sandra Sun <sunyunjia@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#527068}
    7d25f2f7
layer_tree_host_impl_unittest.cc 556 KB