Fix APZ test failures introduced by AndroidFlingPhysics and AndroidVelocityTracker, and enable the affected tests
Categories
(Core :: Panning and Zooming, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox84 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
(Blocks 1 open bug)
Details
Attachments
(8 files, 1 obsolete file)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
Bug 1674279 - Only call OnPan from OnPanEnd if the pan end event comes with a displacement. r=botond
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
Broken out from bug 1545234.
| Assignee | ||
Comment 1•5 years ago
|
||
This only really makes a difference when the pref is set to zero: Now we will no
longer attempt to kick off no-op flings. Many of the APZ gtests are manually
setting the pref to zero, and were unintentionally kicking off no-op flings.
As a result, they were crashing on an assertion in APZFlingPhysics which checks
that flings always start with a non-zero velocity.
When the pref is set to a non-zero value, which is the case for our users, it
doesn't really make a difference whether we check > or >=, because users are
very unlikely to hit the "==" case. So this patch shouldn't affect the user
experience.
As a result of this change, the following test starts passing on Android:
APZCFlingStopTester.FlingStopTap
There are a lot more tests that were hitting this assertion, but those are still
failing for other reasons.
On non-Android, this change causes the following test to fail:
APZCPinchGestureDetectorTester.Panning_TwoFingerFling_ZoomDisabled
That's because the regular velocity tracker determines a velocity of zero, and
the test checks that a fling is started. This test will be fixed in an upcoming
patch in this series.
| Assignee | ||
Comment 2•5 years ago
|
||
This makes the following tests pass on Android:
APZCFlingStopTester.FlingStop
APZCFlingStopTester.FlingStopSlowListener
APZCFlingStopTester.FlingStopPreventDefault
APZScrollHandoffTester.SimultaneousFlings
APZScrollHandoffTester.ScrollgrabFling
APZScrollHandoffTester.ScrollgrabFlingAcceleration1
APZScrollHandoffTester.ImmediateHandoffDisallowed_Fling
It cases the following test to start failing on non-Android:
APZScrollHandoffTester.ScrollgrabFlingAcceleration2
That's because the reduced time between the pan events causes a higher scroll
speed, so the fling goes faster and farther, and hits overscroll. This will be
fixed in a later patch in this series.
Depends on D95246
| Assignee | ||
Comment 3•5 years ago
|
||
This makes the following tests pass on Android:
APZCBasicTester.Fling
APZScrollHandoffTester.PartialFlingHandoff
Depends on D95247
| Assignee | ||
Comment 4•5 years ago
|
||
This fixes the following test:
APZCPinchGestureDetectorTester.Panning_TwoFingerFling_ZoomDisabled
Depends on D95248
| Assignee | ||
Comment 5•5 years ago
|
||
This fixes APZScrollHandoffTester.ScrollgrabFlingAcceleration2.
Depends on D95249
| Assignee | ||
Comment 6•5 years ago
|
||
On macOS, the pan end events usually don't come with a displacement, so the call
to OnPan is unnecessary.
This change fixes the test APZCSnappingOnMomentumTester.Snap_On_Momentum when
the Android velocity tracker is used. The test was failing in the following way:
The test executes a pan gesture where the pan end event has a zero delta.
The pan end event is dispatched after a delay after the last delta-ful pan.
Calling OnPon for the zero-delta event at the end added an additional data point
to the velocity tracker's history, making it look like the pan had come to an
abrupt stop.
After the pan end event, the test dispatches a pan momentum start event, again
after a small delay. This event kicks off the scroll snap.
The scroll snap computes a velocity at this timestamp. Compared to the last
position in the velocity tracker's history, this timestamp is "in the future",
so the tracker has to extrapolate. It fits a quadratic polynomial to the data
points it has. After the fast pan down and the abrupt stop, it now predicts a
reversal of the velocity.
This reversal causes the scroll snap to be initiated in the wrong direction.
We snap upwards instead of downwards, and the test fails.
This patch fixes the failure because the velocity tracker no longer sees an
abrupt stop, so it no longer predicts a reversal of the pan direction.
For the regular velocity tracker, we add another delta-ful pan event to the test,
to have enough deltas to compute a velocity from. This test will fail if a zero
velocity is computed, due to a problem described in bug 1674308.
| Assignee | ||
Comment 7•5 years ago
|
||
Depends on D95251
| Assignee | ||
Comment 8•5 years ago
|
||
We were (correctly) negating the velocity in ComputeVelocity, but not in
AddPosition, so the velocity was upside down during the pan and then flipped its
sign at the end of the pan.
Depends on D95252
| Assignee | ||
Comment 9•5 years ago
|
||
Updated•5 years ago
|
| Assignee | ||
Comment 10•5 years ago
|
||
This fixes APZScrollHandoffTester.ScrollgrabFlingAcceleration2.
Depends on D95249
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a503b1f051f9
https://hg.mozilla.org/mozilla-central/rev/3791ee43d731
https://hg.mozilla.org/mozilla-central/rev/0a16a7912b76
https://hg.mozilla.org/mozilla-central/rev/f085fc122290
https://hg.mozilla.org/mozilla-central/rev/910d09932ee7
https://hg.mozilla.org/mozilla-central/rev/d9c73a8e374e
https://hg.mozilla.org/mozilla-central/rev/0bc86da80d18
https://hg.mozilla.org/mozilla-central/rev/14c3f00d80bc
| Comment hidden (obsolete) |
Comment 14•5 years ago
|
||
It's unlikely that this patch for Android tests caused a startup regression on Windows. I suspect this is actually bug 1672517 and should be reassigned to alert 27363 (the improvement should probably be reassigned to alert 27535.
Description
•