Skip to content

Commit

Permalink
Bug 1631518 - Don't treat overflow:hidden divs as scrollframes for to…
Browse files Browse the repository at this point in the history
…uch-action purposes with WR enabled. r=tnikkel

Depends on D75143

Differential Revision: https://phabricator.services.mozilla.com/D75144
  • Loading branch information
staktrace committed May 13, 2020
1 parent 584ae5d commit fc36c15
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions layout/generic/nsFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11591,16 +11591,20 @@ CompositorHitTestInfo nsIFrame::GetCompositorHitTestInfo(
nsIFrame* touchActionFrame = this;
if (nsIScrollableFrame* scrollFrame =
nsLayoutUtils::GetScrollableFrameFor(this)) {
touchActionFrame = do_QueryFrame(scrollFrame);
// On scrollframes, stop inheriting the pan-x and pan-y flags; instead,
// reset them back to zero to allow panning on the scrollframe unless we
// encounter an element that disables it that's inside the scrollframe.
// This is equivalent to the |considerPanning| variable in
// TouchActionHelper.cpp, but for a top-down traversal.
CompositorHitTestInfo panMask(
CompositorHitTestFlags::eTouchActionPanXDisabled,
CompositorHitTestFlags::eTouchActionPanYDisabled);
inheritedTouchAction -= panMask;
ScrollStyles ss = scrollFrame->GetScrollStyles();
if (ss.mVertical != StyleOverflow::Hidden ||
ss.mHorizontal != StyleOverflow::Hidden) {
touchActionFrame = do_QueryFrame(scrollFrame);
// On scrollframes, stop inheriting the pan-x and pan-y flags; instead,
// reset them back to zero to allow panning on the scrollframe unless we
// encounter an element that disables it that's inside the scrollframe.
// This is equivalent to the |considerPanning| variable in
// TouchActionHelper.cpp, but for a top-down traversal.
CompositorHitTestInfo panMask(
CompositorHitTestFlags::eTouchActionPanXDisabled,
CompositorHitTestFlags::eTouchActionPanYDisabled);
inheritedTouchAction -= panMask;
}
}

result += inheritedTouchAction;
Expand Down

0 comments on commit fc36c15

Please sign in to comment.