Closed Bug 1151018 Opened 5 years ago Closed 5 years ago

animation panel doesn't show animation when first opened

Categories

(DevTools :: Inspector: Animations, defect)

defect
Not set

Tracking

(firefox40 fixed)

RESOLVED FIXED
Firefox 40
Tracking Status
firefox40 --- fixed

People

(Reporter: tromey, Assigned: pbro)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached file css-t3.html
Open the attached html and then open the inspector.

When the inspector opens, the <body> is selected.
However, the animations panel is empty.

Click on the <div> or <head>, and then back to the <body>.
Now the animation is visible.

I think it should be visible when the inspector is first opened.
Interestingly, if the "Rules" sidebar tab is selected by default when the inspector opens, and you then click on the "Animations" tab, it works.
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86_64 → All
I found the issue, the animation-panel only reacts to AnimationsController.PLAYERS_UPDATED_EVENT events, which tells it when to update the list of players in the panel. But when it initializes, it should also update the list, in case there has been players retrieved by the AnimationsController before.
It's a one line fix, but I also need to add a new test for this.
Blocks: 1120900
/r/6697 - Bug 1151018 - Refresh the list of Animation widgets when the animation panel loads; r=bgrins

Pull down this commit:

hg pull -r 9813acd9e6edb455434f2ed06bc2e71f5a772032 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8589093 - Flags: review?(bgrinstead)
Attachment #8589093 - Flags: review?(bgrinstead) → review+
Comment on attachment 8589093 [details]
MozReview Request: bz://1151018/pbrosset

https://reviewboard.mozilla.org/r/6695/#review5585

This does add a bit more work on initialization (even if the animation tab isn't active), but it's such a simple solution to fix the bug that it's worth it.
(In reply to Brian Grinstead [:bgrins] from comment #5)
> This does add a bit more work on initialization (even if the animation tab
> isn't active)
Not much in fact because createPlayerWidgets will first call destroyPlayerWidgets but that will early return because there are no widgets, and will then check `AnimationsController.animationPlayers.length` which will be 0 (because the panel is hidden) and will therefore early return.
So this shouldn't be too bad.
https://hg.mozilla.org/mozilla-central/rev/eb88757dd17b
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Attachment #8589093 - Attachment is obsolete: true
Attachment #8619966 - Flags: review+
Component: Developer Tools: Inspector → Developer Tools: Animation Inspector
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.