From 2cc00e18ce2d9e657bcc800e79b81a5fe37dc407 Mon Sep 17 00:00:00 2001 From: samli Date: Thu, 18 Feb 2016 20:59:10 -0800 Subject: [PATCH] Animation: Add optional specified animation id See http://w3c.github.io/web-animations/#dom-animation-id for spec Review URL: https://codereview.chromium.org/1695633002 Cr-Commit-Position: refs/heads/master@{#376387} --- front_end/animation/AnimationModel.js | 10 +--------- protocol.json | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/front_end/animation/AnimationModel.js b/front_end/animation/AnimationModel.js index f79c51853c..ca45d51288 100644 --- a/front_end/animation/AnimationModel.js +++ b/front_end/animation/AnimationModel.js @@ -264,7 +264,7 @@ WebInspector.AnimationModel.Animation.prototype = { */ name: function() { - return this.source().name(); + return this._payload.name; }, /** @@ -513,14 +513,6 @@ WebInspector.AnimationModel.AnimationEffect.prototype = { return this._payload.fill; }, - /** - * @return {string} - */ - name: function() - { - return this._payload.name; - }, - /** * @return {!Promise.} */ diff --git a/protocol.json b/protocol.json index 6e4822de51..1baa4757f7 100644 --- a/protocol.json +++ b/protocol.json @@ -5025,6 +5025,7 @@ "hidden": true, "properties": [ { "name": "id", "type": "string", "description": "Animation's id." }, + { "name": "name", "type": "string", "description": "Animation's name." }, { "name": "pausedState", "type": "boolean", "hidden": "true", "description": "Animation's internal paused state." }, { "name": "playState", "type": "string", "description": "Animation's play state." }, { "name": "playbackRate", "type": "number", "description": "Animation's playback rate." }, @@ -5049,7 +5050,6 @@ { "name": "duration", "type": "number", "description": "AnimationEffect's iteration duration." }, { "name": "direction", "type": "string", "description": "AnimationEffect's playback direction." }, { "name": "fill", "type": "string", "description": "AnimationEffect's fill mode." }, - { "name": "name", "type": "string", "description": "AnimationEffect's name." }, { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "description": "AnimationEffect's target node." }, { "name": "keyframesRule", "$ref": "KeyframesRule", "optional": true, "description": "AnimationEffect's keyframes." }, { "name": "easing", "type": "string", "description": "AnimationEffect's timing function." }