WebView checks outer viewport user_input_scrollable

The linked bug was occuring because WebView would try to scroll using
the SetSynchronousInputHandlerRootScrollOffset API. This method has some
bespoke logic for distributing the scroll to the viewport layers,
including incorrect handling of the user_input_scrollable bit: it would
check if the visual viewport is scrollable but not the outer viewport.
This means it would not respect overflow: hidden on a the layout
viewport.

In this CL I remove the special path for the SynchronousInputHandler in
LayerTreeImpl::DistributeRootScrollOffset and use a somewhat modified
Viewport::ScrollBy, adding the user_input_scrollable checks there.

This does change the order the scroll is applied in to inner first.
Everywhere else in Chrome we scroll inner first. The
DistributeRootScrollOffset method was added way back in:
https://codereview.chromium.org/1038173002 and explicitly mentioned
scrolling outer first due to the first scrolled layer updating the root
scroll delegate; however, we seem to no longer have that logic and I've
tried the repro in the linked bug to confirm this CL doesn't break it.

Bug: 925795
Change-Id: I8a2198b78fbfacc258591fa8efba9d16529004e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1546583
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#647979}
6 files changed