• David Bokan's avatar
    [Refactor] Move ShouldAnimate decision to compositor · 84299338
    David Bokan authored
    Currently, the decision on whether a scroll should be animated or not
    occurs in InputHandlerProxy. This makes the compositor scroll interface
    more complicated than it needs to be and exposes details about scrolling
    that should be encapsulated in the compositor.
    
    This CL moves the |smooth_scroll_enabled| from an ad hoc bit in the
    InputHandlerProxy into a real setting in LayerTreeSettings. We then
    rearrange the public interface of the compositor input handler so that
    we only have a ScrollUpdate method. This method now checks whether a
    given scroll should be animated or not and delegates to the old ScrollBy
    or ScrollAnimated methods, based on the answer. Finally, we remove some
    of the divergence between animated and non-animated paths in
    InputHandlerProxy so that both kinds of scrolls are handed in the same
    way.
    
    Bug: 1016229
    Change-Id: I2143cf27aeb6aca905b59b817fe8e3f1b14b7858
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1981711
    Commit-Queue: David Bokan <bokan@chromium.org>
    Reviewed-by: default avatarStefan Zager <szager@chromium.org>
    Reviewed-by: default avatardanakj <danakj@chromium.org>
    Reviewed-by: default avatarMajid Valipour <majidvp@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#729938}
    84299338
scroll_input_handler.cc 3.6 KB