Skip to content

Commit ef7e70f

Browse files
ergunshDevtools-frontend LUCI CQ
authored andcommitted
[Animations] Move AnimationModel to sdk/
For adding the swatch, Elements panel will need to use AnimationModel too. For this, to not have a dependency from animations panel, we need to move AnimationModel to a common place. Bug: 349566091 Change-Id: I78f59bbf7c7183da34e8b1d09e9409b81c62a281 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5961996 Reviewed-by: Danil Somsikov <[email protected]> Commit-Queue: Ergün Erdoğmuş <[email protected]>
1 parent a6e03a1 commit ef7e70f

File tree

12 files changed

+362
-373
lines changed

12 files changed

+362
-373
lines changed

config/gni/devtools_grd_files.gni

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ grd_files_debug_sources = [
802802
"front_end/core/protocol_client/NodeURL.js",
803803
"front_end/core/root/Runtime.js",
804804
"front_end/core/sdk/AccessibilityModel.js",
805+
"front_end/core/sdk/AnimationModel.js",
805806
"front_end/core/sdk/AutofillModel.js",
806807
"front_end/core/sdk/CPUProfileDataModel.js",
807808
"front_end/core/sdk/CPUProfilerModel.js",
@@ -1129,9 +1130,7 @@ grd_files_debug_sources = [
11291130
"front_end/panels/accessibility/accessibilityNode.css.js",
11301131
"front_end/panels/accessibility/accessibilityProperties.css.js",
11311132
"front_end/panels/accessibility/axBreadcrumbs.css.js",
1132-
"front_end/panels/animation/AnimationDOMNode.js",
11331133
"front_end/panels/animation/AnimationGroupPreviewUI.js",
1134-
"front_end/panels/animation/AnimationModel.js",
11351134
"front_end/panels/animation/AnimationScreenshotPopover.js",
11361135
"front_end/panels/animation/AnimationTimeline.js",
11371136
"front_end/panels/animation/AnimationUI.js",

front_end/panels/animation/AnimationModel.test.ts renamed to front_end/core/sdk/AnimationModel.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
setMockConnectionResponseHandler,
1111
} from '../../testing/MockConnection.js';
1212

13-
import * as Animation from './animation.js';
13+
import * as SDK from './sdk.js';
1414

1515
describeWithMockConnection('AnimationModel', () => {
1616
afterEach(() => {
@@ -20,16 +20,16 @@ describeWithMockConnection('AnimationModel', () => {
2020
it('can be instantiated', () => {
2121
assert.doesNotThrow(() => {
2222
const target = createTarget();
23-
new Animation.AnimationModel.AnimationModel(target);
23+
new SDK.AnimationModel.AnimationModel(target);
2424
});
2525
});
2626

2727
describe('AnimationImpl', () => {
2828
it('setPayload should update values returned from the relevant value functions for time based animations',
2929
async () => {
3030
const target = createTarget();
31-
const model = new Animation.AnimationModel.AnimationModel(target);
32-
const animationImpl = await Animation.AnimationModel.AnimationImpl.parsePayload(model, {
31+
const model = new SDK.AnimationModel.AnimationModel(target);
32+
const animationImpl = await SDK.AnimationModel.AnimationImpl.parsePayload(model, {
3333
id: '1',
3434
name: 'animation-name',
3535
pausedState: false,
@@ -102,8 +102,8 @@ describeWithMockConnection('AnimationModel', () => {
102102
};
103103
});
104104
const target = createTarget();
105-
const model = new Animation.AnimationModel.AnimationModel(target);
106-
const animationImpl = await Animation.AnimationModel.AnimationImpl.parsePayload(model, {
105+
const model = new SDK.AnimationModel.AnimationModel(target);
106+
const animationImpl = await SDK.AnimationModel.AnimationImpl.parsePayload(model, {
107107
id: '1',
108108
name: 'animation-name',
109109
pausedState: false,

0 commit comments

Comments
 (0)