Show cursors only for available scrolling directions when autoscrolling

This change adds two new cursors for auto scrolling, one that shows only
vertical directions, and the other that shows only horizontal. (This has
the unfortunate side effect of causing cascading small changes to many
files, sorry!) These new cursors are then used in autoscrolling so that
when a user is on a page that can only scroll vertically, if they middle
click it will then show an autoscroll cursor that reflects the available
directions, i.e. up and down only. Similar results for horizontal
scrolling only pages.

This change caches the directions available to scroll when the middle
mouse button is clicked and uses those to determine which cursors to show
when handling mouse move events. This unfortunately means that if a user
middle clicks somewhere that can only scroll vertically, and later that
changes to being able to scroll horizontally exclusively without user
input, the cursor will still only show vertical directions. However, this
matches what Firefox and non-Chromium-based Edge do right now, so this
seems fine to me. A file up bug to fix this issue should be filed though.

Bug: 11437
Change-Id: I68e083d1e0b9e14071f67f9268e826a40cebd783
Reviewed-by: David Bokan <>
Reviewed-by: Bill Budge <>
Reviewed-by: Sadrul Chowdhury <>
Reviewed-by: Bret Sepulveda <>
Reviewed-by: Daniel Cheng <>
Commit-Queue: Mario Bianucci <>
Cr-Original-Commit-Position: refs/heads/master@{#666361}
Cr-Mirrored-Commit: 687a3b4cdcbd6c3850e06868d9aaaca6e1b83df3
4 files changed