Web Inspector: Graphics: should use the id
(name) of the animation if it exists
https://bugs.webkit.org/show_bug.cgi?id=212618
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
- inspector/protocol/Animation.json:
- added an optional
name
property to the Animation.Animation
type
- created a new
Animation.nameChanged
event
Source/WebCore:
Test: inspector/animation/lifecycle-css-animation.html:
inspector/animation/lifecycle-css-transition.html:
inspector/animation/lifecycle-web-animation.html:
inspector/animation/nameChanged.html
- animation/WebAnimation.h:
(WebCore::WebAnimation::setId): Deleted.
- animation/WebAnimation.cpp:
(WebCore::WebAnimation::setId): Added.
- inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didChangeWebAnimationName): Added.
- inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didChangeWebAnimationNameImpl): Added.
- inspector/agents/InspectorAnimationAgent.h:
- inspector/agents/InspectorAnimationAgent.cpp:
(WebCore::InspectorAnimationAgent::didChangeWebAnimationName): Added.
(WebCore::InspectorAnimationAgent::bindAnimation):
Source/WebInspectorUI:
- UserInterface/Protocol/AnimationObserver.js:
(WI.AnimationObserver.prototype.nameChanged): Added.
- UserInterface/Controllers/AnimationManager.js:
(WI.AnimationManager.prototype.nameChanged): Added.
- UserInterface/Models/Animation.js:
(WI.Animation):
(WI.Animation.fromPayload):
(WI.Animation.prototype.get name): Added.
(WI.Animation.prototype.get cssAnimationName): Added.
(WI.Animation.prototype.get cssTransitionProperty): Added.
(WI.Animation.prototype.get displayName):
(WI.Animation.prototype.nameChanged): Added.
- UserInterface/Views/AnimationContentView.js:
(WI.AnimationContentView.prototype.initialLayout):
(WI.AnimationContentView.prototype.layout):
(WI.AnimationContentView.prototype.attached):
(WI.AnimationContentView.prototype.detached):
(WI.AnimationContentView.prototype._refreshTitle): Added.
(WI.AnimationContentView.prototype._handleNameChanged): Added.
- UserInterface/Views/AnimationContentView.css:
(.content-view.animation):
(.content-view.animation > header > .titles):
(.content-view.animation > header > .titles > .title > code): Added.
Show the animation-name
/transition-property
/count in parenthesis after the id
(only if
it has been specified).
Drive-by: ensure that the <header>
doesn't overflow.
- UserInterface/Views/AnimationDetailsSidebarPanel.js:
(WI.AnimationDetailsSidebarPanel.prototype.set animation):
(WI.AnimationDetailsSidebarPanel.prototype.initialLayout):
(WI.AnimationDetailsSidebarPanel.prototype._refreshIdentitySection):
(WI.AnimationDetailsSidebarPanel.prototype._handleAnimationNameChanged): Added.
Only show the "Identifier" row if an id
is actually set. If there is a CSS
animation-name
/transition-property
, show it in a separate row.
- Localizations/en.lproj/localizedStrings.js:
LayoutTests:
- inspector/animation/nameChanged.html: Added.
- inspector/animation/nameChanged-expected.txt: Added.
- inspector/animation/resources/lifecycle-utilities.js:
- inspector/animation/lifecycle-css-animation-expected.txt:
- inspector/animation/lifecycle-css-transition-expected.txt:
- inspector/animation/lifecycle-web-animation.html:
- inspector/animation/lifecycle-web-animation-expected.txt:
Print out the name of the animation after it's created.