Open Bug 2012001 Opened 17 days ago Updated 16 days ago

Consider lock the other axis if scrolling can never happen on the other axis

Categories

(Core :: Panning and Zooming, enhancement)

enhancement

Tracking

()

People

(Reporter: hiro, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug)

User Story

user-impact-score:300
  diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp
  index 36ad4f2a6386..0fe8f1015453 100644
  --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
  +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
  @@ -3571,8 +3571,14 @@ void AsyncPanZoomController::HandlePanningWithTouchAction(double aAngle) {
         } else {
           SetState(PANNING);
         }
  -    } else if (canScrollHorizontal || canScrollVertical) {
  -      SetState(PANNING);
  +    } else if (canScrollHorizontal) {
  +      // Lock the other axis where it's impossible to scroll.
  +      mY.SetAxisLocked(true);
  +      SetState(PANNING_LOCKED_X);
  +    } else if (canScrollVertical) {
  +      // Lock the other axis where it's impossible to scroll.
  +      mX.SetAxisLocked(true);
  +      SetState(PANNING_LOCKED_Y);
       } else {
         SetState(NOTHING);
       }

Like this.

I think this change should fix bug 2007318, a webcompat issue on reddit.

I am filing this bug independent from bug 1915260, since I am not sure whether the reddit case is the scope of bug 1915260.

User Story: (updated)
You need to log in before you can comment on or make changes to this bug.