Closed Bug 984794 Opened 6 years ago Closed 6 years ago

Tune and enable axis-locking on B2G

Categories

(Core :: Panning and Zooming, defect)

All
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla31
Tracking Status
firefox29 --- wontfix
firefox30 --- fixed
firefox31 --- fixed
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: cwiiis, Assigned: kats)

Details

Attachments

(1 file)

It would appear the APZC has no axis lock, making it very hard to scroll vertically when a page has horizontal scrolling (for example, after you've zoomed in slightly).

I think we should mimic the Android JPZC behaviour here.
We have axis locking implemented (bug 892684), but it's off by default. It can be turned on using the "apz.axis_lock_mode" preference (see http://dxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.js?from=all.js#324).
(In reply to Botond Ballo [:botond] from comment #1)
> We have axis locking implemented (bug 892684), but it's off by default. It
> can be turned on using the "apz.axis_lock_mode" preference (see
> http://dxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.
> js?from=all.js#324).

Well that's an interesting choice. I guess we can use this bug to track turning it on?
(In reply to Chris Lord [:cwiiis] from comment #2)
> (In reply to Botond Ballo [:botond] from comment #1)
> > We have axis locking implemented (bug 892684), but it's off by default. It
> > can be turned on using the "apz.axis_lock_mode" preference (see
> > http://dxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.
> > js?from=all.js#324).
> 
> Well that's an interesting choice. 

Kats said in https://bugzilla.mozilla.org/show_bug.cgi?id=892684#c11 that "with axis locking turned on it's pretty hard to do a pan that's not axis-locked, so that might need some tuning but we can do that if/when we turn it on on B2G by default." I'm not sure whether there is anything besides that tuning holding this up from being turned on by default.

> I guess we can use this bug to track turning it on?

Sure.
Summary: It's very hard to scroll exactly vertically or horizontally → Tune and enable axis-locking on B2G
Using the "sticky" mode (apzc.axis_lock_mode = 2) helps avoid problems caused by unintended locking.  This is the mode we used in Firefox for Metro.
Assignee: nobody → bugmail.mozilla
Attachment #8397970 - Flags: review?(chrislord.net)
Comment on attachment 8397970 [details] [diff] [review]
Switch to sticky axis locking

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

LGTM, do we want to uplift this to Aurora too?
Attachment #8397970 - Flags: review?(chrislord.net) → review+
Maybe. Let's let it bake a bit on m-c first.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2fbe01ee3955
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Comment on attachment 8397970 [details] [diff] [review]
Switch to sticky axis locking

[Approval Request Comment]
Bug caused by (feature/regressing bug #): none
User impact if declined: very easy to scroll on the secondary axis even when not desired. this also results in more painting which is bad for performance
Testing completed (on m-c, etc.): on m-c
Risk to taking this patch (and alternatives if risky): low risk, affects b2g only.
String or IDL/UUID changes made by this patch: none
Attachment #8397970 - Flags: approval-mozilla-aurora?
Attachment #8397970 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
OS: All → Gonk (Firefox OS)
You need to log in before you can comment on or make changes to this bug.