Merge to M65: Have GestureScrollBegin ACK consider local child frames.

TBR=creis@chromium.org

Have GestureScrollBegin ACK consider local child frames.

Consider a page with a nested iframe such that the main frame is
navigated to site A, the outer iframe is site B, and the inner iframe
is site B. With Site Isolation, the outer iframe is an OOPIF and the
inner frame is local to said OOPIF.

When attempting to scroll in the inner iframe,
ScrollManager::HandleGestureScrollBegin for the outer frame passes
the event along to its local child, but ignores the return value
which indicates whether the child has a non-empty scroll chain. It goes
on to create a scroll chain for the outer frame and bases the event
ACK on that. Hence, if a local child frame is scrollable in a given
direction, but the OOPIF containing it isn't, then the GSB will be
acknowledged as unconsumed which will cause the browser to bubble
scroll to an ancestor of the OOPIF.

We now use the return value for the local child to inform the GSB
ACK. In order to do this, we also no longer unconditionally add the
document element for a local subframe to the scroll chain.

(cherry picked from commit 612feb71496d3492dadd3d60cb61414d987797be)

Bug: 807683
Change-Id: I4cd76888f8362e14aa660d7727dfcb0d24323a40
Reviewed-on: https://chromium-review.googlesource.com/939522
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Reviewed-by: Kevin McNee <mcnee@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#539955}
Reviewed-on: https://chromium-review.googlesource.com/946548
Cr-Commit-Position: refs/branch-heads/3325@{#646}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
5 files changed