• Rahul Arakeri's avatar
    Refactor GetScrollDeltaFromPointerDown. · 18b2c53f
    Rahul Arakeri authored
    This CL improves readability by splitting GetScrollDeltaFromPointerDown
    into 2 separate functions with specific tasks:
    - GetScrollbarPartFromPointerDown: Determines the ScrollbarPart that
    was hit based on the supplied pointer position.
    - GetScrollOffsetForScrollbarPart: Determines ScrollOffset based on the
    hit tested ScrollbarPart and the orientation.
    
    Bug: 987163
    Change-Id: I89acddc1dd8d65042c468383a9e99abd50e4b7ce
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1716606Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
    Commit-Queue: Rahul Arakeri <arakeri@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#680449}
    18b2c53f
scrollbar_controller.cc 16.8 KB