Closed Bug 1472859 Opened 6 years ago Closed 6 years ago

currentColor animation breaks animation inspector

Categories

(DevTools :: Inspector: Animations, defect, P1)

defect

Tracking

(firefox62 fixed, firefox63 fixed)

RESOLVED FIXED
Firefox 63
Tracking Status
firefox62 --- fixed
firefox63 --- fixed

People

(Reporter: hiro, Assigned: daisuke)

Details

Attachments

(3 files)

Open the attachment file, open animation inspector and reload the file.

There is an error message in browser console;

 TypeError: rgba1 is undefined[Learn More] ColorPath.js:177:9

I think there is another issue on platform though. :/
(In reply to Hiroyuki Ikezoe (:hiro) from comment #0)
> I think there is another issue on platform though. :/

Never mind about this, I think I might write a wrong script there.
Thanks Hiro.
Priority: -- → P1
Assignee: nobody → dakatsuka
Ok, so the crash is caused by the same colors both on 'from' and 'to', right?  I think, as for this bug, just fixing the crash is fine.   You can leave currentColor problem in a later bug.

What I am concerned is here[1];

+        expectedValues: [
+          {
+            title: "rgb(0, 0, 255)",
+            marginInlineStart: "0%",
+          },

If I understand correctly this test case, this 'rgb(0, 0, 255)' is drawn as a text in a tooltip when user hovers on a dot in the animation inspector, right?  If so, I think we should use 'currentColor' keyword as it is, and I think using the computed RGB color to draw the graph is fine.

[1] https://hg.mozilla.org/try/rev/64cf060591dddf2bf43d60e55dc9cc13efcbad0a#l2.39
Thanks for the feedback.
Yes, the reason of crash was in case of same colors.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #4)
> 
> What I am concerned is here[1];
> 
> +        expectedValues: [
> +          {
> +            title: "rgb(0, 0, 255)",
> +            marginInlineStart: "0%",
> +          },
> 
> If I understand correctly this test case, this 'rgb(0, 0, 255)' is drawn as
> a text in a tooltip when user hovers on a dot in the animation inspector,
> right?  If so, I think we should use 'currentColor' keyword as it is, and I
> think using the computed RGB color to draw the graph is fine.

Yes, that is of tooltip. 
Also, yes, I had thought so that we should use 'currentColor' as it is.
However, even if we set 'inherit' or 'unset' and so on, we get computed value(e.g. rgb(0, 255, 0)) from KeyframeEffect::GetProperties(). So, I had wanted to keep the consistency.
Also, if we send 'currentColor' to the client as it is, the color of graph should differ from actual animation since we can't get computed value in client side.

From both reasons, I had thought to change to computed value from 'currentColor' in this time.
Ideally, KeyframeEffect::GetProperties() returns both specified and computed values, then send them to client, then use them, I think.

What do you think??
I'd prefer 'currentColor' in the tooltip since color might be also animating there.  That's said, currentColor animation with color animation doesn't work now, so it's not a big deal though.
Okay, thanks! I will do along to your opinion.
Comment on attachment 8989345 [details]
Bug 1472859 - Part 1: Avoid crashing which is in case the all values of keyframes are same.

https://reviewboard.mozilla.org/r/254422/#review261460
Attachment #8989345 - Flags: review?(gl) → review+
Comment on attachment 8989346 [details]
Bug 1472859 - Part 2: Add test for same colors and currentcolor.

https://reviewboard.mozilla.org/r/254424/#review261462
Attachment #8989346 - Flags: review?(gl) → review+
Pushed by dakatsuka@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f94c634c79d0
Part 1: Avoid crashing which is in case the all values of keyframes are same. r=gl
https://hg.mozilla.org/integration/autoland/rev/262572362be8
Part 2: Add test for same colors and currentcolor. r=gl
https://hg.mozilla.org/mozilla-central/rev/f94c634c79d0
https://hg.mozilla.org/mozilla-central/rev/262572362be8
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Comment on attachment 8989345 [details]
Bug 1472859 - Part 1: Avoid crashing which is in case the all values of keyframes are same.

Approval Request Comment
[Feature/Bug causing the regression]: bug 1399830
[User impact if declined]: If user inspects animation which has keyframes that all are same colors, animation inspector will crash.
[Is this code covered by automated tests?]: Yes
[Has the fix been verified in Nightly?]: It has baked on Nightly for 1 day.
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: No
[Is the change risky?]: Low
[Why is the change risky/not risky?]: This change is one line only except tests. Also, this affects only animation inspector.
[String changes made/needed]: None
Attachment #8989345 - Flags: approval-mozilla-beta?
Attachment #8989346 - Flags: approval-mozilla-beta?
Comment on attachment 8989345 [details]
Bug 1472859 - Part 1: Avoid crashing which is in case the all values of keyframes are same.

Low-risk fix for animation inspector, includes new tests.
Let's uplift for beta 7.
Attachment #8989345 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #8989346 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Based on comment 15, marking as qe-.
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: