Bug 1506497 - Walk up to the in-flow parent when computing touch-action. r=botond
When walking up the frame parent chain to compute the touch-action on an
element, we should use the in-flow parent. This produces different
values for out-of-flow frames (e.g. fixed-position frames). This is more
in line with the actual spec for touch-action, which propagates down the
DOM.
Differential Revision: https://phabricator.services.mozilla.com/D23570

--- a/gfx/layers/apz/util/TouchActionHelper.cpp+++ b/gfx/layers/apz/util/TouchActionHelper.cpp@@ -82,17 +82,17 @@ TouchBehaviorFlags TouchActionHelper::Ge // For panning we walk up until we meet the first scrollable element (the // element that supports panning) or root element. For zooming we walk up // until the root element since Firefox currently supports only zooming of the // root frame but not the subframes. bool considerPanning = true; for (nsIFrame* frame = target; frame && frame->GetContent() && behavior;- frame = frame->GetParent()) {+ frame = frame->GetInFlowParent()) { UpdateAllowedBehavior(nsLayoutUtils::GetTouchActionFromFrame(frame), considerPanning, behavior); if (frame == nearestScrollableFrame) { // We met the scrollable element, after it we shouldn't consider // touch-action values for the purpose of panning but only for zooming. considerPanning = false; }