android/source/src/java/org/mozilla/gecko/gfx/Axis.java | 19 +--------- android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java | 6 +-- 2 files changed, 4 insertions(+), 21 deletions(-)
New commits: commit 910ef4786a6cd62462996aae9932250e48dc7b4a Author: Michael Weghorn <[email protected]> AuthorDate: Wed Nov 12 15:51:36 2025 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Nov 14 11:52:15 2025 +0100 android: Stop using SubdocumentScrollHelper in Axis As demonstrated by (and obvious since) previous commit Change-Id: I01794dedc7b5d3582d67eef6b9f8c36cce4e686f Author: Michael Weghorn <[email protected]> Date: Wed Nov 12 15:42:48 2025 +0100 android: Drop dead SubdocumentScrollHelper logic , the SubdocumentScrollHelper class doesn't add any value, so stop using it in Axis. Change-Id: I17342ef84fb4b3f716ff1592381c43a763721cd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193893 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/android/source/src/java/org/mozilla/gecko/gfx/Axis.java b/android/source/src/java/org/mozilla/gecko/gfx/Axis.java index d4a7ac2ce5a7..253985852c1f 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/Axis.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/Axis.java @@ -98,8 +98,6 @@ abstract class Axis { BOTH, // Overscrolled in both directions (page is zoomed to smaller than screen) } - private final SubdocumentScrollHelper mSubscroller; - private int mOverscrollMode; /* Default to only overscrolling if we're allowed to scroll in a direction */ private float mFirstTouchPos; /* Position of the first touch event on the current drag. */ private float mTouchPos; /* Position of the most recent touch event on the current drag. */ @@ -116,8 +114,7 @@ abstract class Axis { protected abstract float getPageStart(); protected abstract float getPageLength(); - Axis(SubdocumentScrollHelper subscroller) { - mSubscroller = subscroller; + Axis() { mOverscrollMode = View.OVER_SCROLL_IF_CONTENT_SCROLLS; } @@ -207,12 +204,6 @@ abstract class Axis { * possible and this axis has not been scroll locked while panning. Otherwise, returns false. */ boolean scrollable() { - // If we're scrolling a subdocument, ignore the viewport length restrictions (since those - // apply to the top-level document) and only take into account axis locking. - if (mSubscroller.scrolling()) { - return !mScrollingDisabled; - } - // if we are axis locked, return false if (mScrollingDisabled) { return false; @@ -248,7 +239,7 @@ abstract class Axis { } void startFling(boolean stopped) { - mDisableSnap = mSubscroller.scrolling(); + mDisableSnap = false; if (stopped) { mFlingState = FlingStates.STOPPED; @@ -262,12 +253,6 @@ abstract class Axis { if (mFlingState != FlingStates.FLINGING) { return false; } - if (mSubscroller.scrolling() && !mSubscroller.lastScrollSucceeded()) { - // if the subdocument stopped scrolling, it's because it reached the end - // of the subdocument. we don't do overscroll on subdocuments, so there's - // no point in continuing this fling. - return false; - } float excess = getExcess(); Overscroll overscroll = getOverscroll(); diff --git a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java index 4b72b732f658..49044ec33ee7 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java @@ -101,8 +101,8 @@ class JavaPanZoomController MAX_SCROLL = 0.075f * LOKitShell.getDpi(view.getContext()); mTarget = target; mSubscroller = new SubdocumentScrollHelper(); - mX = new AxisX(mSubscroller); - mY = new AxisY(mSubscroller); + mX = new AxisX(); + mY = new AxisY(); mTouchEventHandler = new TouchEventHandler(view.getContext(), view, this); mMainThread = mContext.getMainLooper().getThread(); @@ -750,7 +750,6 @@ class JavaPanZoomController } private class AxisX extends Axis { - AxisX(SubdocumentScrollHelper subscroller) { super(subscroller); } @Override public float getOrigin() { return getMetrics().viewportRectLeft; } @Override @@ -762,7 +761,6 @@ class JavaPanZoomController } private class AxisY extends Axis { - AxisY(SubdocumentScrollHelper subscroller) { super(subscroller); } @Override public float getOrigin() { return getMetrics().viewportRectTop; } @Override
