Closed
Bug 1289915
Opened 8 years ago
Closed 8 years ago
Allow scroll-driven animations to run without being paused
Categories
(Core :: DOM: Animation, defect, P3)
Core
DOM: Animation
Tracking
()
RESOLVED
DUPLICATE
of bug 1321428
Tracking | Status | |
---|---|---|
firefox50 | --- | affected |
People
(Reporter: botond, Unassigned)
References
Details
Attachments
(7 files, 4 obsolete files)
58 bytes,
text/x-review-board-request
|
Details | |
58 bytes,
text/x-review-board-request
|
Details | |
58 bytes,
text/x-review-board-request
|
Details | |
58 bytes,
text/x-review-board-request
|
Details | |
58 bytes,
text/x-review-board-request
|
Details | |
58 bytes,
text/x-review-board-request
|
Details | |
58 bytes,
text/x-review-board-request
|
Details |
In the initial scroll-driven animations prototype by Mantaroh, the animation had to be paused to be driven by scrolling, because if it was playing it would also be driven by time. I have some patches that fix this. They are a requirement for prototyping OMTA support for scroll-driven animations (bug 1289909), because the OMTA codepath will not pick up an animation that's paused. The patches are a bit rough around the edges; they currently cause a crash during shutdown, and they cause the refresh driver to tick while a scroll-driven animation is in the Playing state even if the page isn't currently being scrolled. However, they accomplish the main goal of the scroll position being propagated through the scroll timeline's current time. With these patches, the demo page here [1] (which is a modified version of Mantaroh's original demo [2]) can be scrolled to drive the animation of a transform. The last patch explicitly disables OMTA for scroll-driven animations until that's implemented properly; otherwise, the current OMTA code would cause it to be driven by time on the compositor thread. [1] https://people.mozilla.org/~bballo/scroll-driven-animations/test.html [2] https://people.mozilla.org/~mantaroh/scroll-animation/test.html
Reporter | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67492/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/67492/
Reporter | ||
Comment 2•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67494/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/67494/
Reporter | ||
Comment 3•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67496/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/67496/
Reporter | ||
Comment 4•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67498/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/67498/
Reporter | ||
Comment 5•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67500/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/67500/
Reporter | ||
Comment 6•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67502/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/67502/
Reporter | ||
Comment 7•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67504/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/67504/
Reporter | ||
Comment 8•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67506/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/67506/
Reporter | ||
Comment 9•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67508/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/67508/
Reporter | ||
Comment 10•8 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #0) > they currently cause a crash during shutdown More precisely, a crash when the current document is unloaded. The reason for this is that no one calls ScrollTimeline::NotifyRefreshDriverDestroying(). I'm not exactly sure who's supposed to be calling it; Mantaroh, perhaps you might have an idea.
Reporter | ||
Comment 11•8 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #0) > they cause the refresh driver to tick while a > scroll-driven animation is in the Playing state even if the page isn't > currently being scrolled. This could be avoided if, instead of registering itself as a refresh observer, the scroll timeline just called Animation::Tick() from the scroll observer. That would also solve the above problem of needing to call NotifyRefreshDriverDestroying(). I also discovered that there is an existing interface, nsIScrollPositionListener, which could be reused instead of ScrollHandler/ScrollObserver.
Reporter | ||
Comment 12•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/68100/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/68100/
Attachment #8775326 -
Attachment description: Keep track of a scroll timeline's scroll range, calculated as the maximum of its animations' effect end times → Derive a scroll timeline's current time from the scroll progress
Reporter | ||
Comment 13•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/68102/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/68102/
Reporter | ||
Comment 14•8 years ago
|
||
Comment on attachment 8775323 [details] Initial prototype by Mantaroh Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67492/diff/1-2/
Reporter | ||
Comment 15•8 years ago
|
||
Comment on attachment 8775324 [details] Support vertical scrolling Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67494/diff/1-2/
Reporter | ||
Comment 16•8 years ago
|
||
Comment on attachment 8775325 [details] Add Max() and Min() methods to TimeDuration Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67496/diff/1-2/
Reporter | ||
Comment 17•8 years ago
|
||
Comment on attachment 8775326 [details] Derive a scroll timeline's current time from the scroll progress Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67498/diff/1-2/
Reporter | ||
Comment 18•8 years ago
|
||
Comment on attachment 8775331 [details] Disable OMTA for animations with a ScrollTimeline until it's implemented properly Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67508/diff/1-2/
Reporter | ||
Updated•8 years ago
|
Attachment #8775327 -
Attachment is obsolete: true
Reporter | ||
Updated•8 years ago
|
Attachment #8775328 -
Attachment is obsolete: true
Reporter | ||
Updated•8 years ago
|
Attachment #8775329 -
Attachment is obsolete: true
Reporter | ||
Updated•8 years ago
|
Attachment #8775330 -
Attachment is obsolete: true
Reporter | ||
Comment 19•8 years ago
|
||
Implemented the suggestions described in comment 11. Now it no longer crashes on shutdown, and it doesn't tick the refresh driver unnecessarily.
Updated•8 years ago
|
Priority: -- → P3
Reporter | ||
Comment 20•8 years ago
|
||
The changes in these patches will land as part of bug 1321428.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•