Useless CSS animation is running while the viewer is doing nothing
Categories
(Firefox :: PDF Viewer, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox124 | --- | wontfix |
firefox125 | --- | verified |
firefox126 | --- | verified |
People
(Reporter: calixte, Assigned: calixte)
References
(Regression)
Details
(Keywords: power, regression)
Attachments
(2 files)
44 bytes,
text/x-github-pull-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
STR:
- open a pdf
- wait a little and take a profile
Actual result:
In the marker chart we can see that a CSS animation is running (named spinLoadingIcon
).
Expected result:
Nothing is running.
Here's a profile:
https://share.firefox.dev/3vtsL0X
Comment 1•2 months ago
|
||
Assignee | ||
Comment 2•2 months ago
|
||
:emilio, I'm wondering if more generally it could be a bug with the animation in the SVG image, I mean once the icon has its visibility set to hidden, then the animation in the SVG should be cancelled, wdyt ?
Comment 3•2 months ago
|
||
Visibility: hidden doesn't cancel animations per spec (because visibility: visible descendants may be visible and depend on the animation, yes, it sucks). But we should be able to throttle them and I think they're throttled in this case.
Comment 5•1 month ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
Visibility: hidden doesn't cancel animations per spec (because visibility: visible descendants may be visible and depend on the animation, yes, it sucks). But we should be able to throttle them and I think they're throttled in this case.
Could we detect that there's no visibility: visible
descendants and cancel the animation anyway?
For every tick, there are 2 "RefreshDriverTick" markers, one with "Tick reasons: HasObservers (DocumentTimeline animations [Style])" (that's the CSS animation) and one with "Tick reasons: HasImageAnimations". Do we know which image is being animated here?
Assignee | ||
Comment 6•1 month ago
|
||
The image being animated is:
https://github.com/mozilla/pdf.js/blob/master/web/images/loading.svg
Assignee | ||
Comment 7•1 month ago
|
||
It's a regression from bug 1866850 and especially from:
https://github.com/mozilla/pdf.js/pull/17287
Comment 8•1 month ago
|
||
Set release status flags based on info from the regressing bug 1866850
Updated•1 month ago
|
Updated•1 month ago
|
Assignee | ||
Comment 9•1 month ago
|
||
Updated•1 month ago
|
Comment 10•1 month ago
|
||
release Uplift Approval Request
- User impact if declined: Some power will be uselessly used
- Code covered by automated testing: no
- Fix verified in Nightly: no
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: See STR in comment#0
- Risk associated with taking this patch: Low
- Explanation of risk level: Self contained and very small change.
- String changes made/needed: No
- Is Android affected?: no
Updated•1 month ago
|
Updated•1 month ago
|
Comment 11•1 month ago
|
||
uplift |
https://hg.mozilla.org/releases/mozilla-release/rev/10f793276d1a
Comment 12•1 month ago
|
||
Hello! I have managed to reproduce the issue with firefox 124.0.2 on Ubuntu 22.04, I can confirm that the issue is fixed with firefox 125.0 and 126.0a1(2024-04-08) on Ubuntu 22.04, MacOS 12.6 and Windows 10. I will update the status and flags of this bug and also will remove the qe-verify+ marker.
Have a nice day!
Description
•