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 522096 db7eb307e78b6d4831dd36804f5c1b5933a093f8
parent 522095 007b5a2e825a543d24783e7b5b65e9e44db34cb7
child 522097 e925aaf5ac9a8a9f4e9dcf493bd2e04f46bb757f
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [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;
     }