Web Inspector: add instrumentation for showing existing Web Animations
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Jan 2020 23:46:15 +0000 (23:46 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Jan 2020 23:46:15 +0000 (23:46 +0000)
commitbdbb0a03ab4e1accea6ecc1a5f1500fc5313cbb0
tree97d5cd6d35e3aad6408484bb2ae088ea464a33b3
parentdbfbe2329564f66ba2fcda72a88208f6939ea4e5
Web Inspector: add instrumentation for showing existing Web Animations
https://bugs.webkit.org/show_bug.cgi?id=205434
<rdar://problem/28328087>

Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/protocol/Animation.json:
Add types/commands/events for instrumenting the lifecycle of `Animation` objects, as well as
commands for getting the JavaScript wrapper object and the target DOM node.

Source/WebCore:

Add types/commands/events for instrumenting the lifecycle of `Animation` objects, as well as
commands for getting the JavaScript wrapper object and the target DOM node.

Tests: inspector/animation/effectChanged.html
       inspector/animation/lifecycle-css-animation.html
       inspector/animation/lifecycle-css-transition.html
       inspector/animation/lifecycle-web-animation.html
       inspector/animation/requestEffectTarget.html
       inspector/animation/resolveAnimation.html
       inspector/animation/targetChanged.html

* animation/WebAnimation.h:
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::instances): Added.
(WebCore::WebAnimation::instancesMutex): Added.
(WebCore::WebAnimation::create):
(WebCore::WebAnimation::WebAnimation):
(WebCore::WebAnimation::~WebAnimation):
(WebCore::WebAnimation::effectTimingDidChange):
(WebCore::WebAnimation::setEffectInternal):
(WebCore::WebAnimation::effectTargetDidChange):
* animation/CSSAnimation.cpp:
(WebCore::CSSAnimation::create):
* animation/CSSTransition.cpp:
(WebCore::CSSTransition::create):

* animation/KeyframeEffect.h:
(WebCore::KeyframeEffect::parsedKeyframes const): Added.
(WebCore::KeyframeEffect::blendingKeyframes const): Added.
(WebCore::KeyframeEffect::hasBlendingKeyframes const): Deleted.
Provide a way to access the list of keyframes.

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didSetWebAnimationEffect): Added.
(WebCore::InspectorInstrumentation::didChangeWebAnimationEffectTiming): Added.
(WebCore::InspectorInstrumentation::didChangeWebAnimationEffectTarget): Added.
(WebCore::InspectorInstrumentation::didCreateWebAnimation): Added.
(WebCore::InspectorInstrumentation::didChangeWebAnimationEffect): Deleted.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::InspectorInstrumentation::didSetWebAnimationEffectImpl): Added.
(WebCore::InspectorInstrumentation::didChangeWebAnimationEffectTimingImpl): Added.
(WebCore::InspectorInstrumentation::didChangeWebAnimationEffectTargetImpl): Added.
(WebCore::InspectorInstrumentation::didCreateWebAnimationImpl): Added.
(WebCore::InspectorInstrumentation::willDestroyWebAnimationImpl):
(WebCore::InspectorInstrumentation::didChangeWebAnimationEffectImpl): Deleted.

* inspector/InstrumentingAgents.h:
(WebCore::InstrumentingAgents::enabledInspectorAnimationAgent const): Added.
(WebCore::InstrumentingAgents::setEnabledInspectorAnimationAgent): Added.
* inspector/InstrumentingAgents.cpp:
(WebCore::InstrumentingAgents::reset):

* inspector/agents/InspectorAnimationAgent.h:
* inspector/agents/InspectorAnimationAgent.cpp:
(WebCore::protocolValueForSeconds): Added.
(WebCore::protocolValueForPlaybackDirection): Added.
(WebCore::protocolValueForFillMode): Added.
(WebCore::buildObjectForKeyframes): Added.
(WebCore::buildObjectForEffect): Added.
(WebCore::InspectorAnimationAgent::InspectorAnimationAgent):
(WebCore::InspectorAnimationAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorAnimationAgent::enable): Added.
(WebCore::InspectorAnimationAgent::disable): Added.
(WebCore::InspectorAnimationAgent::requestEffectTarget): Added.
(WebCore::InspectorAnimationAgent::resolveAnimation): Added.
(WebCore::InspectorAnimationAgent::didSetWebAnimationEffect): Added.
(WebCore::InspectorAnimationAgent::didChangeWebAnimationEffectTiming): Added.
(WebCore::InspectorAnimationAgent::didChangeWebAnimationEffectTarget): Added.
(WebCore::InspectorAnimationAgent::didCreateWebAnimation): Added.
(WebCore::InspectorAnimationAgent::willDestroyWebAnimation):
(WebCore::InspectorAnimationAgent::frameNavigated):
(WebCore::InspectorAnimationAgent::findAnimationId): Added.
(WebCore::InspectorAnimationAgent::assertAnimation): Added.
(WebCore::InspectorAnimationAgent::bindAnimation): Added.
(WebCore::InspectorAnimationAgent::unbindAnimation): Added.
(WebCore::InspectorAnimationAgent::animationDestroyedTimerFired): Added.
(WebCore::InspectorAnimationAgent::reset): Added.
(WebCore::InspectorAnimationAgent::didChangeWebAnimationEffect): Deleted.

* inspector/agents/InspectorDOMAgent.h:
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::pushNodeToFrontend):
(WebCore::InspectorDOMAgent::querySelector):
(WebCore::InspectorDOMAgent::pushNodePathToFrontend):
(WebCore::InspectorDOMAgent::setNodeName):
(WebCore::InspectorDOMAgent::setOuterHTML):
(WebCore::InspectorDOMAgent::moveTo):
(WebCore::InspectorDOMAgent::requestNode):
(WebCore::InspectorDOMAgent::pushNodeByPathToFrontend):
Add an overload for `pushNodePathToFrontend` that exposes an `ErrorString`.

Source/WebInspectorUI:

* UserInterface/Controllers/AnimationManager.js: Added.
(WI.AnimationManager):
(WI.AnimationManager.prototype.get domains):
(WI.AnimationManager.prototype.activateExtraDomain):
(WI.AnimationManager.prototype.initializeTarget):
(WI.AnimationManager.prototype.get animationCollection):
(WI.AnimationManager.prototype.get supported):
(WI.AnimationManager.prototype.enable):
(WI.AnimationManager.prototype.disable):
(WI.AnimationManager.prototype.animationCreated):
(WI.AnimationManager.prototype.effectChanged):
(WI.AnimationManager.prototype.targetChanged):
(WI.AnimationManager.prototype.animationDestroyed):
(WI.AnimationManager.prototype._handleMainResourceDidChange):
* UserInterface/Protocol/AnimationObserver.js:
(WI.AnimationObserver.prototype.animationCreated): Added.
(WI.AnimationObserver.prototype.effectChanged): Added.
(WI.AnimationObserver.prototype.targetChanged): Added.
(WI.AnimationObserver.prototype.animationDestroyed): Added.

* UserInterface/Models/AnimationCollection.js: Added.
(WI.AnimationCollection):
(WI.AnimationCollection.prototype.get animationType):
(WI.AnimationCollection.prototype.get displayName):
(WI.AnimationCollection.prototype.objectIsRequiredType):
(WI.AnimationCollection.prototype.animationCollectionForType):
(WI.AnimationCollection.prototype.itemAdded):
(WI.AnimationCollection.prototype.itemRemoved):
(WI.AnimationCollection.prototype.itemsCleared):
Similar to `WI.ResourceCollection`, create a subclass of `WI.Collection` that maintains it's
own sub-`WI.AnimationCollection`s for each type of `WI.Animation.Type`.

* UserInterface/Models/Animation.js: Added.
(WI.Animation):
(WI.Animation.fromPayload):
(WI.Animation.displayNameForAnimationType):
(WI.Animation.displayNameForPlaybackDirection):
(WI.Animation.displayNameForFillMode):
(WI.Animation.resetUniqueDisplayNameNumbers):
(WI.Animation.prototype.get animationId):
(WI.Animation.prototype.get backtrace):
(WI.Animation.prototype.get animationType):
(WI.Animation.prototype.get startDelay):
(WI.Animation.prototype.get endDelay):
(WI.Animation.prototype.get iterationCount):
(WI.Animation.prototype.get iterationStart):
(WI.Animation.prototype.get iterationDuration):
(WI.Animation.prototype.get timingFunction):
(WI.Animation.prototype.get playbackDirection):
(WI.Animation.prototype.get fillMode):
(WI.Animation.prototype.get keyframes):
(WI.Animation.prototype.get displayName):
(WI.Animation.prototype.requestEffectTarget):
(WI.Animation.prototype.effectChanged):
(WI.Animation.prototype.targetChanged):
(WI.Animation.prototype._updateEffect):
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.resolveAnimation): Added.

* UserInterface/Views/GraphicsTabContentView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js.
(WI.GraphicsTabContentView):
(WI.GraphicsTabContentView.tabInfo):
(WI.GraphicsTabContentView.isTabAllowed):
(WI.GraphicsTabContentView.prototype.get type):
(WI.GraphicsTabContentView.prototype.showRepresentedObject): Added.
(WI.GraphicsTabContentView.prototype.canShowRepresentedObject):
(WI.GraphicsTabContentView.prototype.closed):
(WI.GraphicsTabContentView.prototype.attached):
(WI.GraphicsTabContentView.prototype.detached):
(WI.GraphicsTabContentView.prototype.initialLayout): Added.
(WI.GraphicsTabContentView.prototype._handleOverviewTreeOutlineSelectionDidChange): Added.
* UserInterface/Views/GraphicsTabContentView.css: Renamed from Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.css.
Rename the Canvas Tab to Graphics Tab and display four sections:
 - Canvases
 - Web Animations
 - CSS Animations
 - CSS Transitions

* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype.canShowRepresentedObject):
Only appear if a `WI.Canvas` or `WI.Recording` is selected.

* UserInterface/Views/GraphicsOverviewContentView.js: Added.
(WI.GraphicsOverviewContentView):
(WI.GraphicsOverviewContentView.prototype.get supplementalRepresentedObjects):
(WI.GraphicsOverviewContentView.prototype.get navigationItems):
(WI.GraphicsOverviewContentView.prototype.attached):
(WI.GraphicsOverviewContentView.prototype.detached):
(WI.GraphicsOverviewContentView.prototype.initialLayout):
(WI.GraphicsOverviewContentView.prototype.dropZoneShouldAppearForDragEvent):
(WI.GraphicsOverviewContentView.prototype.dropZoneHandleDrop):
(WI.GraphicsOverviewContentView.prototype._handleRefreshButtonClicked):
(WI.GraphicsOverviewContentView.prototype._handleShowGridButtonClicked):
(WI.GraphicsOverviewContentView.prototype._handleShowImageGridSettingChanged):
(WI.GraphicsOverviewContentView.prototype._handleImportButtonNavigationItemClicked):
(WI.GraphicsOverviewContentView.prototype._handleOverviewViewSelectedItemChanged):
(WI.GraphicsOverviewContentView.prototype._handleOverviewViewSupplementalRepresentedObjectsDidChange):
(WI.GraphicsOverviewContentView.prototype._handleClick):
* UserInterface/Views/GraphicsOverviewContentView.css: Added.
(.content-view.graphics-overview):
(.content-view.graphics-overview > section):
(.content-view.graphics-overview > section:not(:first-child)):
(.content-view.graphics-overview > section > .header):
(.content-view.graphics-overview > section:not(:first-of-type) > .header):
(.content-view.graphics-overview > section > .header > h1):
(.content-view.graphics-overview > section > .header > .navigation-bar):
(.content-view.graphics-overview > .content-view.canvas-overview):
(@media (prefers-color-scheme: light) .content-view.graphics-overview):
(@media (prefers-color-scheme: light) .content-view.graphics-overview > section > .header):
Add sticky headers for each of the sections described above.

* UserInterface/Views/AnimationCollectionContentView.js: Added.
(WI.AnimationCollectionContentView):
(WI.AnimationCollectionContentView.prototype.handleRefreshButtonClicked):
(WI.AnimationCollectionContentView.prototype.contentViewAdded):
(WI.AnimationCollectionContentView.prototype.contentViewRemoved):
(WI.AnimationCollectionContentView.prototype.detached):
(WI.AnimationCollectionContentView.prototype._handleContentViewMouseEnter):
(WI.AnimationCollectionContentView.prototype._handleContentViewMouseLeave):
* UserInterface/Views/AnimationCollectionContentView.css: Added.
(.content-view.animation-collection):

* UserInterface/Views/AnimationContentView.js: Added.
(WI.AnimationContentView):
(WI.AnimationContentView.get previewHeight):
(WI.AnimationContentView.prototype.handleRefreshButtonClicked):
(WI.AnimationContentView.prototype.initialLayout):
(WI.AnimationContentView.prototype.layout):
(WI.AnimationContentView.prototype.sizeDidChange):
(WI.AnimationContentView.prototype.attached):
(WI.AnimationContentView.prototype.detached):
(WI.AnimationContentView.prototype._refreshSubtitle):
(WI.AnimationContentView.prototype._refreshPreview.addTitle):
(WI.AnimationContentView.prototype._refreshPreview):
(WI.AnimationContentView.prototype._handleEffectChanged):
(WI.AnimationContentView.prototype._handleTargetChanged):
(WI.AnimationContentView.prototype._populateAnimationTargetButtonContextMenu):
* UserInterface/Views/AnimationContentView.css: Added.
(.content-view.animation):
(.content-view.animation.selected):
(.content-view.animation > header):
(.content-view.animation > header > .titles):
(.content-view.animation > header > .titles > .title):
(.content-view.animation > header > .titles > .subtitle):
(.content-view.animation > header > .titles > .subtitle:not(:empty)::before):
(.content-view.animation > header > .navigation-bar):
(.content-view.animation:hover > header > .navigation-bar):
(.content-view.animation > .preview):
(.content-view.animation > .preview > svg):
(body[dir=rtl] .content-view.animation > .preview > svg):
(.content-view.animation > .preview > svg rect):
(.content-view.animation > .preview > svg > .delay line):
(.content-view.animation > .preview > svg > .active path):
(.content-view.animation > .preview > svg > .active circle):
(.content-view.animation > .preview > svg > .active line):
(.content-view.animation > .preview > span):
(@media (prefers-color-scheme: dark) .content-view.animation > header > .titles > .title):
(@media (prefers-color-scheme: dark) .content-view.animation > header > .titles > .subtitle):
(@media (prefers-color-scheme: dark) .content-view.animation > .preview):
Visualize the start/end delay and keyframes of the given animation as a series of bezier
curves separated by markers.

* UserInterface/Views/AnimationDetailsSidebarPanel.js: Added.
(WI.AnimationDetailsSidebarPanel):
(WI.AnimationDetailsSidebarPanel.prototype.inspect):
(WI.AnimationDetailsSidebarPanel.prototype.get animation):
(WI.AnimationDetailsSidebarPanel.prototype.set animation):
(WI.AnimationDetailsSidebarPanel.prototype.initialLayout):
(WI.AnimationDetailsSidebarPanel.prototype.layout):
(WI.AnimationDetailsSidebarPanel.prototype._refreshIdentitySection):
(WI.AnimationDetailsSidebarPanel.prototype._refreshEffectSection):
(WI.AnimationDetailsSidebarPanel.prototype._refreshBacktraceSection):
(WI.AnimationDetailsSidebarPanel.prototype._handleAnimationEffectChanged):
(WI.AnimationDetailsSidebarPanel.prototype._handleAnimationTargetChanged):
(WI.AnimationDetailsSidebarPanel.prototype._handleDetailsSectionCollapsedStateChanged):
* UserInterface/Views/AnimationDetailsSidebarPanel.css: Added.
(.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .header > .subtitle):
(.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section):
(.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section .row.styles):
(.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section .row.styles .CodeMirror):
(.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section):
Show collected information about the selected animation, its effect, and its target.

* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager):
(WI.CanvasManager.prototype.get canvasCollection): Added.
(WI.CanvasManager.prototype.disable):
(WI.CanvasManager.prototype.canvasAdded):
(WI.CanvasManager.prototype.canvasRemoved):
(WI.CanvasManager.prototype._saveRecordings): Added.
(WI.CanvasManager.prototype._mainResourceDidChange):
(WI.CanvasManager.prototype.get canvases): Deleted.
(WI.CanvasManager.prototype._removeCanvas): Deleted.
Rather than have the `WI.CanvasTabContentView` mainain the `WI.CanvasCollection` and have to
listen for events from the `WI.CanvasManager`, just have the `WI.CanvasManager` hold on to
it instead and provide a getter for it.

* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView):
(WI.CanvasOverviewContentView.prototype.get navigationItems):
(WI.CanvasOverviewContentView.prototype.handleRefreshButtonClicked):
(WI.CanvasOverviewContentView.prototype.contentViewAdded):
(WI.CanvasOverviewContentView.prototype.contentViewRemoved):
(WI.CanvasOverviewContentView.prototype.attached):
(WI.CanvasOverviewContentView.prototype.detached):
(WI.CanvasOverviewContentView.prototype._addSavedRecording):
(WI.CanvasOverviewContentView.prototype.hidden): Deleted.
(WI.CanvasOverviewContentView.prototype.get _itemMargin): Deleted.
(WI.CanvasOverviewContentView.prototype._refreshPreviews): Deleted.
(WI.CanvasOverviewContentView.prototype._updateNavigationItems): Deleted.
(WI.CanvasOverviewContentView.prototype._showGridButtonClicked): Deleted.
(WI.CanvasOverviewContentView.prototype._updateShowImageGrid): Deleted.
* UserInterface/Views/CanvasOverviewContentView.css:
(.content-view.canvas-overview):
(.content-view.canvas-overview > .content-view.canvas):
(@media (prefers-color-scheme: dark) .content-view.canvas-overview): Deleted.

* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView):
(WI.CanvasContentView.prototype.handleRefreshButtonClicked): Added.
(WI.CanvasContentView.prototype.dropZoneShouldAppearForDragEvent): Added.
(WI.CanvasContentView.prototype.dropZoneHandleDrop): Added.
(WI.CanvasContentView.prototype.initialLayout):
(WI.CanvasContentView.prototype.attached):
(WI.CanvasContentView.prototype._populateCanvasElementButtonContextMenu):
(WI.CanvasContentView.prototype.shown): Deleted.
Move the "Log Canvas Context" to be the first item in the canvas element button context menu.
Drive-by: add a `WI.DropZoneView` for when recording JSON files are dragged on top.
* UserInterface/Views/CanvasContentView.css:
Drive-by: drop `:not(.tab)` from all selectors since the Canvas Tab doesn't exist anymore.
* UserInterface/Views/CollectionContentView.js:
(WI.CollectionContentView):
(WI.CollectionContentView.prototype.get selectedItem): Added.
(WI.CollectionContentView.prototype.set selectedItem): Added.
(WI.CollectionContentView.prototype.addContentViewForItem):
(WI.CollectionContentView.prototype.removeContentViewForItem):
(WI.CollectionContentView.prototype.showContentPlaceholder):
(WI.CollectionContentView.prototype.initialLayout):
(WI.CollectionContentView.prototype._selectItem):
(WI.CollectionContentView.prototype._handleClick): Added.
(WI.CollectionContentView.prototype.setSelectedItem): Deleted.
* UserInterface/Views/CollectionContentView.css:
(.content-view.collection > .placeholder:not(.message-text-view)): Added.
(.content-view.collection .resource.image img): Deleted.
(.content-view.collection .resource.image img:hover): Deleted.
When selection is enabled, clicking outside of any of the content views should dismiss the
current selection. Clients should also be able to get the currently selected item.

* UserInterface/Views/DetailsSectionSimpleRow.js:
(WI.DetailsSectionSimpleRow.prototype.set value):
Ensure that `0` is considered as a valid value.

* UserInterface/Base/Main.js:
(WI.loaded):
(WI.contentLoaded):
(WI.tabContentViewClassForRepresentedObject):
* UserInterface/Views/ContentView.js:
(WI.ContentView.createFromRepresentedObject):
(WI.ContentView.isViewable):
Allow `WI.Animation` to be viewable.

* UserInterface/Views/Main.css:
(.navigation-item-help): Added.
(.navigation-item-help > .navigation-bar): Added.
(.navigation-item-help > .navigation-bar > .item): Added.
(.message-text-view .navigation-item-help): Deleted.
(.message-text-view .navigation-item-help .navigation-bar): Deleted.
(.message-text-view .navigation-item-help .navigation-bar > .item): Deleted.
Allow `WI.createNavigationItemHelp` to be used independently of `WI.createMessageTextView`.

* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.nodeForId):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.animationTrackingUpdated):
* UserInterface/Models/AuditTestCaseResult.js:
(WI.AuditTestCaseResult.async fromPayload):
Add a fallback so callers don't need to.

* UserInterface/Views/ResourceCollectionContentView.js:
(WI.ResourceCollectionContentView):
* UserInterface/Views/ResourceCollectionContentView.css:
(.content-view.resource-collection > .resource.image img): Added.
(.content-view.resource-collection > .resource.image img:hover): Added.
Drive-by: move these styles to the right file and make them more specific.
* UserInterface/Models/Canvas.js:
(WI.Canvas.displayNameForContextType):
* UserInterface/Models/Recording.js:
(WI.Recording.displayNameForRecordingType): Added.
Drive-by: fix localized strings.
* UserInterface/Views/RecordingContentView.css:
Drive-by: drop `:not(.tab)` from all selectors since the Recording Tab doesn't exist anymore.
* UserInterface/Main.html:
* UserInterface/Images/Graphics.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/Canvas.svg.
* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Test.html:
* UserInterface/Test/Test.js:
(WI.loaded):

* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.expectEmpty): Added.
(TestHarness.prototype.expectNotEmpty): Added.
(TestHarness.prototype._expectationMessageFormat):
(TestHarness.prototype._expectedValueFormat):
Add utility function for checking whether the given value is empty:
 - Array `length === 0`
 - String `length === 0`
 - Set `size === 0`
 - Map `size === 0`
 - Object `isEmptyObject`
Any other type will automatically fail, as non-objects can't be "empty" (e.g. `42`).

LayoutTests:

* inspector/animation/effectChanged.html: Added.
* inspector/animation/effectChanged-expected.txt: Added.
* inspector/animation/lifecycle-css-animation.html: Added.
* inspector/animation/lifecycle-css-animation-expected.txt: Added.
* inspector/animation/lifecycle-css-transition.html: Added.
* inspector/animation/lifecycle-css-transition-expected.txt: Added.
* inspector/animation/lifecycle-web-animation.html: Added.
* inspector/animation/lifecycle-web-animation-expected.txt: Added.
* inspector/animation/requestEffectTarget.html: Added.
* inspector/animation/requestEffectTarget-expected.txt: Added.
* inspector/animation/resolveAnimation.html: Added.
* inspector/animation/resolveAnimation-expected.txt: Added.
* inspector/animation/targetChanged.html: Added.
* inspector/animation/targetChanged-expected.txt: Added.
* inspector/animation/resources/lifecycle-utilities.js: Added.
(createAnimation):
(destroyAnimations):
(InspectorTest.AnimationLifecycleUtilities.async awaitAnimationCreated):
(InspectorTest.AnimationLifecycleUtilities.async awaitAnimationDestroyed):
(InspectorTest.AnimationLifecycleUtilities.async createAnimation):
(InspectorTest.AnimationLifecycleUtilities.async destroyAnimations):

* inspector/canvas/create-context-webgpu.html:
* inspector/canvas/resources/create-context-utilities.js:
(destroyCanvases):
(awaitCanvasAdded):
(InspectorTest.CreateContextUtilities.initializeTestSuite):

* inspector/canvas/context-attributes.html:
* inspector/canvas/extensions.html:
* inspector/canvas/memory.html:
* inspector/canvas/requestClientNodes.html:
* inspector/canvas/requestContent-2d.html:
* inspector/canvas/requestContent-bitmaprenderer.html:
* inspector/canvas/requestContent-webgl.html:
* inspector/canvas/requestContent-webgl2.html:
* inspector/canvas/requestNode.html:
* inspector/canvas/resolveContext-2d.html:
* inspector/canvas/resolveContext-bitmaprenderer.html:
* inspector/canvas/resolveContext-webgl.html:
* inspector/canvas/resolveContext-webgl2.html:
* inspector/canvas/resolveContext-webgpu.html:

* inspector/canvas/recording.html:
* inspector/canvas/setRecordingAutoCaptureFrameCount.html:
* inspector/canvas/resources/recording-utilities.js:
(window.getCanvas):

* inspector/canvas/shaderProgram-add-remove-webgpu.html:
* inspector/canvas/updateShader-webgpu-sharedVertexFragment.html:
* inspector/canvas/resources/shaderProgram-utilities-webgpu.js:
* inspector/canvas/resources/shaderProgram-utilities-webgl.js:
(deleteContext):
(whenProgramAdded):
(window.initializeTestSuite):
(window.addParentCanvasRemovedTestCase):

* inspector/unit-tests/test-harness-expect-functions.html:
* inspector/unit-tests/test-harness-expect-functions-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
97 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/animation/effectChanged-expected.txt [new file with mode: 0644]
LayoutTests/inspector/animation/effectChanged.html [new file with mode: 0644]
LayoutTests/inspector/animation/lifecycle-css-animation-expected.txt [new file with mode: 0644]
LayoutTests/inspector/animation/lifecycle-css-animation.html [new file with mode: 0644]
LayoutTests/inspector/animation/lifecycle-css-transition-expected.txt [new file with mode: 0644]
LayoutTests/inspector/animation/lifecycle-css-transition.html [new file with mode: 0644]
LayoutTests/inspector/animation/lifecycle-web-animation-expected.txt [new file with mode: 0644]
LayoutTests/inspector/animation/lifecycle-web-animation.html [new file with mode: 0644]
LayoutTests/inspector/animation/resolveAnimation-expected.txt [new file with mode: 0644]
LayoutTests/inspector/animation/resolveAnimation.html [new file with mode: 0644]
LayoutTests/inspector/animation/resources/lifecycle-utilities.js [new file with mode: 0644]
LayoutTests/inspector/animation/targetChanged-expected.txt [new file with mode: 0644]
LayoutTests/inspector/animation/targetChanged.html [new file with mode: 0644]
LayoutTests/inspector/canvas/context-attributes.html
LayoutTests/inspector/canvas/create-context-webgpu.html
LayoutTests/inspector/canvas/extensions.html
LayoutTests/inspector/canvas/memory.html
LayoutTests/inspector/canvas/recording.html
LayoutTests/inspector/canvas/requestClientNodes.html
LayoutTests/inspector/canvas/requestContent-2d.html
LayoutTests/inspector/canvas/requestContent-bitmaprenderer.html
LayoutTests/inspector/canvas/requestContent-webgl.html
LayoutTests/inspector/canvas/requestContent-webgl2.html
LayoutTests/inspector/canvas/requestNode.html
LayoutTests/inspector/canvas/resolveContext-2d.html
LayoutTests/inspector/canvas/resolveContext-bitmaprenderer.html
LayoutTests/inspector/canvas/resolveContext-webgl.html
LayoutTests/inspector/canvas/resolveContext-webgl2.html
LayoutTests/inspector/canvas/resolveContext-webgpu.html
LayoutTests/inspector/canvas/resources/create-context-utilities.js
LayoutTests/inspector/canvas/resources/recording-utilities.js
LayoutTests/inspector/canvas/resources/shaderProgram-utilities-webgl.js
LayoutTests/inspector/canvas/resources/shaderProgram-utilities-webgpu.js
LayoutTests/inspector/canvas/setRecordingAutoCaptureFrameCount.html
LayoutTests/inspector/canvas/shaderProgram-add-remove-webgpu.html
LayoutTests/inspector/canvas/updateShader-webgpu-sharedVertexFragment.html
LayoutTests/inspector/unit-tests/test-harness-expect-functions-expected.txt
LayoutTests/inspector/unit-tests/test-harness-expect-functions.html
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/protocol/Animation.json
Source/WebCore/ChangeLog
Source/WebCore/animation/CSSAnimation.cpp
Source/WebCore/animation/CSSTransition.cpp
Source/WebCore/animation/KeyframeEffect.h
Source/WebCore/animation/WebAnimation.cpp
Source/WebCore/animation/WebAnimation.h
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/InstrumentingAgents.cpp
Source/WebCore/inspector/InstrumentingAgents.h
Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp
Source/WebCore/inspector/agents/InspectorAnimationAgent.h
Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
Source/WebCore/inspector/agents/InspectorDOMAgent.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Controllers/AnimationManager.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Controllers/CanvasManager.js
Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js
Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js
Source/WebInspectorUI/UserInterface/Images/Graphics.svg [moved from Source/WebInspectorUI/UserInterface/Images/Canvas.svg with 82% similarity]
Source/WebInspectorUI/UserInterface/Main.html
Source/WebInspectorUI/UserInterface/Models/Animation.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Models/AnimationCollection.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Models/AuditTestCaseResult.js
Source/WebInspectorUI/UserInterface/Models/Canvas.js
Source/WebInspectorUI/UserInterface/Models/Recording.js
Source/WebInspectorUI/UserInterface/Protocol/AnimationObserver.js
Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js
Source/WebInspectorUI/UserInterface/Test.html
Source/WebInspectorUI/UserInterface/Test/Test.js
Source/WebInspectorUI/UserInterface/Test/TestHarness.js
Source/WebInspectorUI/UserInterface/Views/AnimationCollectionContentView.css [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/AnimationCollectionContentView.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/AnimationContentView.css [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/AnimationContentView.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/AnimationDetailsSidebarPanel.css [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/AnimationDetailsSidebarPanel.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/CanvasContentView.css
Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js
Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.css
Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js
Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/CollectionContentView.css
Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js
Source/WebInspectorUI/UserInterface/Views/ContentView.js
Source/WebInspectorUI/UserInterface/Views/DetailsSectionSimpleRow.js
Source/WebInspectorUI/UserInterface/Views/GraphicsOverviewContentView.css [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/GraphicsOverviewContentView.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/GraphicsTabContentView.css [moved from Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.css with 70% similarity]
Source/WebInspectorUI/UserInterface/Views/GraphicsTabContentView.js [moved from Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js with 57% similarity]
Source/WebInspectorUI/UserInterface/Views/Main.css
Source/WebInspectorUI/UserInterface/Views/RecordingContentView.css
Source/WebInspectorUI/UserInterface/Views/ResourceCollectionContentView.css
Source/WebInspectorUI/UserInterface/Views/ResourceCollectionContentView.js