Minor cleanup to GenericScrollAnimation constructor
Categories
(Core :: Panning and Zooming, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: botond, Assigned: botond)
References
Details
Attachments
(4 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1847689 - Explicitly enable general.smoothScroll in gtests that use SmoothWheel(). r=dlrobertson
48 bytes,
text/x-phabricator-request
|
Details | Review |
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
This allows only computing the Bezier physics in the branch where we
actually use it.
Depends on D185634
Comment 4•2 years ago
|
||
Backed out for causing windows Gtest failures.
Failure logs:
- Assertion failure: aOther.mValue != 0 (Division by zero), at /builds/worker/workspace/obj-build/dist/include/mozilla/TimeStamp.h:214 - https://treeherder.mozilla.org/logviewer?job_id=425460848&repo=autoland
- TEST-UNEXPECTED-FAIL | APZCTransformNotificationTester.PanFollowedByWheelTransformNotifications | - https://treeherder.mozilla.org/logviewer?job_id=425457254&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/e6f2508469f04d04626f34ee53d95cdcf6e33796
Assignee | ||
Comment 5•2 years ago
|
||
The reason for the failures is that the first patch introduces a subtle behaviour change: ComputeBezierAnimationSettingsForOrigin()
has a check such that it only sets the min/max duration settings to a nonzero value if smooth scrolling is enabled. If smooth scrolling is disabled, we get an animation with a zero duration, which is technically supported but somewhat fragile (e.g. we can get a division by zero if the animation is sampled with a timestamp "in the past").
Production scenarios shouldn't be affected because we don't get into this code if smooth scrolling is disabled in the first place (due to checks like this one). However, some gtests use a helper called SmoothWheel which bypasses those checks. If general.smoothScroll
is in fact false (as it seem to be in Windows gtest runs for some reason, maybe prefers-reduced-motion related), we get those zero-duration animations. This then results in two failures:
APZCSnappingTesterMock.Bug1265510
is not careful with timestamps and tries sampling an animation with a past timestampAPZCTransformNotificationTester.PanFollowedByWheelTransformNotifications
just doesn't expect a zero-duration animation (it expects to receive aTransformEnd
only after spinning the event loop)
I plan to do some further cleanup here (e.g. assert that the branch where we get the zero-duration animation doesn't happen in production, and eventually remove it), but for now a fix is to explicitly pref on smooth scrolling for gtests that use SmoothWheel()
.
Assignee | ||
Comment 6•2 years ago
|
||
Assignee | ||
Comment 7•2 years ago
|
||
Depends on D185890
Updated•2 years ago
|
Updated•2 years ago
|
Comment 9•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/43273ef51cbb
https://hg.mozilla.org/mozilla-central/rev/f252c38d6ed2
https://hg.mozilla.org/mozilla-central/rev/84a1eb3a6f16
https://hg.mozilla.org/mozilla-central/rev/b94b68f70671
Description
•