[BlinkGenPropertyTrees] Allow non-composited cc::ScrollNodes

To ensure scroll events are caught, a cc::Layer must be present to
scroll on the impl thread. This is tracked in LayerTreeImpl with a map
from cc::ElementId to cc::ScrollNode (cc::LayerImpls have a unique
element id). This map is updated by LayerTreeImpl::AddScrollableLayer.

When blink generates property trees, it is not known if a scroll node
will support impl-side scrolling, so scroll nodes are created for all
scrollable regions. After deciding compositing, some of the scroll
nodes may be for non-composited scrollers. This causes a scroll bug.

There are two ways to address this:
1. Remove non-composited scroll nodes when converting the blink property
trees to cc property trees.
2. Prevent impl-side scrolling for any layer with a non-composited
scroll node ancestor.

Significant modifications to the property tree hierarchy are difficult
at the blink->cc boundary because all descendant nodes must have their
parent pointers adjusted. It is also undesirable for the long-term goal
of making the blink->cc property tree step a simple copy. Non-composited
scroll nodes are rare so the additional cost of these nodes in cc is
small. This patch takes the second option and ignores non-composited
cc::ScrollNodes for hit tests.

Bug: 936325, 937189
Change-Id: I5306cfb2a49c35f5a67ca04a58dcbae6b94530a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1513038
Commit-Queue: David Bokan <bokan@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#639709}
2 files changed