Files
sousa-gecko/dom/animation
Jonathan Watt a07f52555b Bug 2018678 p3. Make ViewTimeline ranges account for sticky positioning. r=layout-scroll-driven-animation-reviewers,boris
Sticky positioning displaces a view timeline subject by a piecewise-linear function d(s) of the scroll offset s, which StickyDisplacement models using the per-axis sticky scroll ranges added in p2. UpdateCachedCurrentTime() now removes the current displacement from the cached subject position so that it is scroll-invariant, and caches the displacement model alongside it. Timeline range boundaries are then computed by solving s - d(s) == offset for the earliest or latest scroll offset, as appropriate for each boundary, matching the earliest/latest wording in the spec. If more than one sticky ancestor affects the subject we fall back to treating the current displacement as permanent.

Differential Revision: https://phabricator.services.mozilla.com/D317569
2026-08-27 07:32:18 +00:00
..