Scroll on main if impl-hit testing isn't guaranteed to be correct
commit05ba53c15fe575acc97b880c76c8848bb293a3d7
authorvollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 16 Apr 2014 21:22:51 +0000 (16 21:22 +0000)
committervollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 16 Apr 2014 21:22:51 +0000 (16 21:22 +0000)
tree85509b4612c2ab2e479e6f125c177c0c6af54073
parentef7e5d6977942d65fad34407eca0ef9fabb9fbef
Scroll on main if impl-hit testing isn't guaranteed to be correct

It often happens that we have composited layers with
holes. Sometimes we'll try and interact through the
hole (we might, say, want to scroll something back
there). The cc machinery isn't currently smart enough to
figure out exactly what got hit, so when we detect that
our hit testing result might be inaccurate we fall back
to main thread scrolling.

Here are the specifics on how I determine if me might
have hit a "holey" occluder.

I find two starting layers:
 1) The first layer below the viewport point.
 2) The first scrolling layer below the viewport point.

If we haven't hit an interfering occluder, the first
scrolling layer we should reach when we walk up from 1)
is 2). If we find some other layer, things have likely
gone wonky, so we bail.

I've also added stats so that we can track how often we
fall back to main thread scrolling because we couldn't
figure out what was going on.

R=enne@chromium.org
BUG=364090

Review URL: https://codereview.chromium.org/238803005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264306 0039d316-1c4b-4281-b951-d872f2087c98
cc/input/input_handler.h
cc/trees/layer_tree_host_common.cc
cc/trees/layer_tree_host_common.h
cc/trees/layer_tree_host_impl.cc
cc/trees/layer_tree_host_impl_unittest.cc
content/renderer/input/input_handler_proxy.cc
tools/metrics/histograms/histograms.xml