Closed Bug 1888657 Opened 2 months ago Closed 1 month ago

Useless CSS animation is running while the viewer is doing nothing

Categories

(Firefox :: PDF Viewer, defect, P1)

defect

Tracking

()

VERIFIED FIXED
126 Branch
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)

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

Keywords: power

: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 ?

Flags: needinfo?(emilio)

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.

Flags: needinfo?(emilio)
Duplicate of this bug: 1888877

(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?

It's a regression from bug 1866850 and especially from:
https://github.com/mozilla/pdf.js/pull/17287

Keywords: regression
Regressed by: 1866850

Set release status flags based on info from the regressing bug 1866850

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Attachment #9395610 - Flags: approval-mozilla-release?

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
Flags: qe-verify+
Attachment #9395610 - Flags: approval-mozilla-release? → approval-mozilla-release+

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!

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: