Bug 212618 - Web Inspector: Graphics: should use the `id` (name) of the animation if it exists
Summary: Web Inspector: Graphics: should use the `id` (name) of the animation if it ex...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-01 16:17 PDT by Devin Rousso
Modified: 2020-06-01 18:13 PDT (History)
11 users (show)

See Also:


Attachments
Patch (36.72 KB, patch)
2020-06-01 16:20 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
[Image] after Patch is applied (672.19 KB, image/png)
2020-06-01 16:21 PDT, Devin Rousso
no flags Details
Patch (36.70 KB, patch)
2020-06-01 16:29 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-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>