| Index: Source/devtools/front_end/sdk/AnimationModel.js
|
| diff --git a/Source/devtools/front_end/sdk/AnimationModel.js b/Source/devtools/front_end/sdk/AnimationModel.js
|
| index fbd2bb69d655949321f04f73a0cb3c5e310d210d..c1c33ce57408e6984fadd4958106ff38880f51f6 100644
|
| --- a/Source/devtools/front_end/sdk/AnimationModel.js
|
| +++ b/Source/devtools/front_end/sdk/AnimationModel.js
|
| @@ -264,6 +264,31 @@ WebInspector.AnimationModel.AnimationPlayer.prototype = {
|
| this._source.deferredNode().resolve(nodeResolved.bind(this));
|
| },
|
|
|
| + /**
|
| + * @param {string} value
|
| + */
|
| + setEasing: function(value)
|
| + {
|
| + /**
|
| + * @param {?WebInspector.DOMNode} node
|
| + * @this {!WebInspector.AnimationModel.AnimationPlayer}
|
| + */
|
| + function nodeResolved(node)
|
| + {
|
| + if (!node)
|
| + return;
|
| + var animationProperty = this.type() === "CSSTransition" ? "transition" : "animation";
|
| + var style = node.getAttribute("style") || "";
|
| + style = style.replace(new RegExp("\\s*(-webkit-)?" + animationProperty + "-timing-function:[^;]*;?\\s*", "g"), "");
|
| + node.setAttributeValue("style", String.sprintf("%s %s-timing-function: %s !important;", style, animationProperty, value));
|
| + }
|
| +
|
| + this.target().animationAgent().setEasing(this.id(), value);
|
| + // TODO (samli): Update CSS rules instead. (crbug.com/492937)
|
| + if (this.type() !== "WebAnimation")
|
| + this._source.deferredNode().resolve(nodeResolved.bind(this));
|
| + },
|
| +
|
| __proto__: WebInspector.SDKObject.prototype
|
| }
|
|
|
|
|