Bug 209682 - [Web Animations] Crash under `KeyframeEffect::getKeyframes` for a `DeclarativeAnimation`
Summary: [Web Animations] Crash under `KeyframeEffect::getKeyframes` for a `Declarativ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
: 210161 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-03-27 14:52 PDT by Devin Rousso
Modified: 2020-04-07 17:05 PDT (History)
8 users (show)

See Also:


Attachments
Patch (7.36 KB, patch)
2020-03-27 14:56 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2020-03-27 14:52:47 PDT
# STEPS TO REPRODUCE:
1. inspect any page with a CSS animation/transition
2. select a node with an active CSS animation/transition in the Elements Tab
3. evaluate:

```
let effect = $0.getAnimations()[0].effect;
effect.getKeyframes(); // should not crash
effect.target = null;
effect.getKeyframes(); // will crash
```
Comment 1 Devin Rousso 2020-03-27 14:53:06 PDT
<rdar://problem/60962458>
Comment 2 Devin Rousso 2020-03-27 14:56:25 PDT
Created attachment 394761 [details]
Patch
Comment 3 Antoine Quint 2020-03-28 02:40:54 PDT
Comment on attachment 394761 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394761&action=review

Very nice, thanks for spotting – and fixing – that!

> LayoutTests/webanimations/css-animation-effect-target-change-and-get-keyframes-crash.html:1
> +<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->

We really don't need this but anymore, this is the default and there's No Going Back.
Comment 4 Devin Rousso 2020-03-30 10:04:59 PDT
Comment on attachment 394761 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394761&action=review

Thanks for the review Antoine!

>> LayoutTests/webanimations/css-animation-effect-target-change-and-get-keyframes-crash.html:1
>> +<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->
> 
> We really don't need this but anymore, this is the default and there's No Going Back.

I appreciate that, but given that the flag still exists, I think it's safe to still have it.  Not to mention, it adds more information about what this test is actually testing.
Comment 5 EWS 2020-03-30 10:15:19 PDT
Committed r259205: <https://trac.webkit.org/changeset/259205>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 394761 [details].
Comment 6 Devin Rousso 2020-04-07 17:05:00 PDT
*** Bug 210161 has been marked as a duplicate of this bug. ***