With C++ APZ, axis locking behavior is not as good

RESOLVED FIXED in Firefox 46

Status

()

Firefox for Android
Toolbar
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: kats, Assigned: kats)

Tracking

Trunk
Firefox 46
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox46 fixed)

Details

(Whiteboard: [pref-tweak])

Attachments

(1 attachment, 1 obsolete attachment)

Using the C++ APZ build for my normal browsing, first thing I noticed was that the axis locking was a lot looser than with the JPZC code. We probably need to just fiddle with the prefs a bit. (in particular the lock angle seems narrower than it used to be)
The lock angle in both cases appears to be 30 degrees, so I'm not sure why it feels different. It might be an implementation difference between the JPZC and the C++ APZ, in which case I don't really want to change it since it will affect B2G as well. I'm getting used to the new behaviour after a day of using it and it's not really "worse", just "different".
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
We discovered the the axis lock breakout angle is lower than the lock angle by default, so that might explain why the locking is less flaky than it was before. Reopening to play with this.
Status: RESOLVED → REOPENED
Depends on: 1231504
Resolution: WONTFIX → ---
Whiteboard: [pref-tweak]
Created attachment 8708442 [details] [diff] [review]
Patch

This makes things better; now the axis lock angle is actually 30 degrees instead of being artificially restricted to 22.5 degrees because we enter and immediately exit axis lock.
Assignee: nobody → bugmail.mozilla
Attachment #8708442 - Flags: review?(snorp)
Comment on attachment 8708442 [details] [diff] [review]
Patch

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

OK, I thought maybe that's what was happening.
Attachment #8708442 - Flags: review?(snorp) → review+
This does seem to improve things for me, especially on Amazon's horizontally scrolled areas (which was really annoying before).

Anthony, it looks like we didn't allow breakout from the axis lock at all in the old APZ. Do we want to keep that behavior or allow breakout? With this patch the locking seems pretty good, but I don't know if allowing breakout is what we want or not.

To be a little more clear, the old behavior was that once you started panning along an axis (vertical or horizontal), we locked it there no matter which angle your touches went once. If you started a vertical pan and then only moved your finger horizontally, we just wouldn't pan at all. The new behavior allows you break out of the lock if you diverge more than 45 degrees from the axis, and it would then presumably also lock to that new axis if you are close enough to it (currently 30 degrees).
Flags: needinfo?(alam)
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #3)
> Created attachment 8708442 [details] [diff] [review]
> Patch
> 
> This makes things better; now the axis lock angle is actually 30 degrees
> instead of being artificially restricted to 22.5 degrees because we enter
> and immediately exit axis lock.

(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #5)
> This does seem to improve things for me, especially on Amazon's horizontally
> scrolled areas (which was really annoying before).
> 
> Anthony, it looks like we didn't allow breakout from the axis lock at all in
> the old APZ. Do we want to keep that behavior or allow breakout? With this
> patch the locking seems pretty good, but I don't know if allowing breakout
> is what we want or not.
>
> To be a little more clear, the old behavior was that once you started
> panning along an axis (vertical or horizontal), we locked it there no matter
> which angle your touches went once. If you started a vertical pan and then
> only moved your finger horizontally, we just wouldn't pan at all. The new
> behavior allows you break out of the lock if you diverge more than 45
> degrees from the axis, and it would then presumably also lock to that new
> axis if you are close enough to it (currently 30 degrees).

I think we should keep consistent with the previous experience. 

If I understand correctly, the previous scrolling mechanics didn't allow for ANY sort of breaking? I.e. once it's locked, it's locked. So I don't think we should allow for that right now. Especially since we're making a lot of other changes to our scrolling behaviour. 

I also just don't have a clear idea for what a good value here would be. So I'm hesitant to prescribe any significant change.

But, we can revisit this again after a while if we hear/feel that it needs it. 

Does that help?
Flags: needinfo?(alam)
Yup, that sounds reasonable. I'll update the patch.
Created attachment 8708587 [details] [diff] [review]
Patch v2
Attachment #8708442 - Attachment is obsolete: true
Attachment #8708587 - Flags: review?(snorp)
Attachment #8708587 - Flags: review?(snorp) → review+

Comment 10

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/74085d76282e
Status: REOPENED → RESOLVED
Last Resolved: 2 years ago2 years ago
status-firefox46: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
You need to log in before you can comment on or make changes to this bug.