Bug 1506497 - Walk up to the in-flow parent when computing touch-action. r=botond
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 15 Mar 2019 18:00:08 +0000
changeset 464423 db7eb307e78b
parent 464422 007b5a2e825a
child 464424 e925aaf5ac9a
push id35716
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:42:17 +0000
treeherdermozilla-central@8ee97c045359 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1506497
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
gfx/layers/apz/util/TouchActionHelper.cpp
--- 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;
     }