Bug 212618

Summary: Web Inspector: Graphics: should use the `id` (name) of the animation if it exists
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, hi, inspector-bugzilla-changes, joepeck, keith_miller, mark.lam, msaboff, saam, timothy, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
[Image] after Patch is applied
none
Patch none

Description Devin Rousso 2020-06-01 16:17:04 PDT
```
    window.animation = document.body.animate([], {id: "OldName"});
```
should appear as "OldName" in Web Inspector, not "Animation 1"
Comment 1 Devin Rousso 2020-06-01 16:20:33 PDT
Created attachment 400765 [details]
Patch
Comment 2 Devin Rousso 2020-06-01 16:21:31 PDT
Created attachment 400766 [details]
[Image] after Patch is applied
Comment 3 Timothy Hatcher 2020-06-01 16:24:19 PDT
Comment on attachment 400765 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/AnimationContentView.js:162
> +        }

This formatting looks wrong, but what else could we do?

> Source/WebInspectorUI/UserInterface/Views/AnimationDetailsSidebarPanel.js:168
> +            this._idRow.value = cssAnimationName === displayName ? null : displayName;

I’d almost flip this so null is last.

> Source/WebInspectorUI/UserInterface/Views/AnimationDetailsSidebarPanel.js:172
> +            this._idRow.value = cssTransitionProperty === displayName ? null : displayName;

Ditto.
Comment 4 Devin Rousso 2020-06-01 16:28:01 PDT
Comment on attachment 400765 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Views/AnimationContentView.js:162
>> +        }
> 
> This formatting looks wrong, but what else could we do?

oh, i actually don't need the braces here anymore :P

>> Source/WebInspectorUI/UserInterface/Views/AnimationDetailsSidebarPanel.js:168
>> +            this._idRow.value = cssAnimationName === displayName ? null : displayName;
> 
> I’d almost flip this so null is last.

i wish there was a shorthand for `foo === bar ? bar : null` :(
Comment 5 Devin Rousso 2020-06-01 16:29:54 PDT
Created attachment 400768 [details]
Patch
Comment 6 EWS Watchlist 2020-06-01 17:55:46 PDT
This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
Comment 7 EWS 2020-06-01 18:12:05 PDT
Committed r262404: <https://trac.webkit.org/changeset/262404>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 400768 [details].
Comment 8 Radar WebKit Bug Importer 2020-06-01 18:13:19 PDT
<rdar://problem/63852510>