Closed Bug 918086 Opened 7 years ago Closed 7 years ago

Disable pinch-zoom overscroll

Categories

(Firefox for Android :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 27
Tracking Status
firefox27 --- verified

People

(Reporter: wesj, Assigned: wesj)

Details

Attachments

(1 file)

Since we're disabling overscroll, we should also not allow pinch zooming beyond the page boundaries.
Attached patch Patch v1Splinter Review
Here's a pretty simple way to do this. There may be something more efficient?
Attachment #807246 - Flags: review?(bugmail.mozilla)
Comment on attachment 807246 [details] [diff] [review]
Patch v1

Review of attachment 807246 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/gfx/JavaPanZoomController.java
@@ +1182,5 @@
> +
> +            // If overscroll is diabled, prevent zooming outside the normal document pans.
> +            if (mX.getOverScrollMode() == View.OVER_SCROLL_NEVER || mY.getOverScrollMode() == View.OVER_SCROLL_NEVER) {
> +                target = getValidViewportMetrics(target);
> +            }

Does the scrollBy call above this need to be clamped somehow too? It should only affect the toolbar hiding behaviour so if that looks fine with this then this patch should be sufficient.
Attachment #807246 - Flags: review?(bugmail.mozilla) → review+
Toolbar showing/hiding seems fine with this. It will pan in or out if you pan while pinch-zooming, but will snap to an edge when you let go.

https://hg.mozilla.org/integration/fx-team/rev/dc02e5225fbe
https://hg.mozilla.org/mozilla-central/rev/dc02e5225fbe
Assignee: nobody → wjohnston
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.