Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1295)

Unified Diff: third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js

Issue 2330283004: Fix serialization of step timing functions (Closed)
Patch Set: Update step timing function parsing in devtools Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js
diff --git a/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js b/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js
index 71aba877044d69e0f1c201644413993fed4ef5be..0c608e10e5c26be13b71bc06ab61cdb9c7d5c3b2 100644
--- a/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js
+++ b/third_party/WebKit/Source/devtools/front_end/animation/AnimationTimeline.js
@@ -762,11 +762,11 @@ WebInspector.AnimationTimeline.StepTimingFunction = function(steps, stepAtPositi
* @return {?WebInspector.AnimationTimeline.StepTimingFunction}
*/
WebInspector.AnimationTimeline.StepTimingFunction.parse = function(text) {
- var match = text.match(/^step-(start|middle|end)$/);
- if (match)
- return new WebInspector.AnimationTimeline.StepTimingFunction(1, match[1]);
- match = text.match(/^steps\((\d+), (start|middle|end)\)$/);
+ var match = text.match(/^steps\((\d+), (start|middle)\)$/);
if (match)
return new WebInspector.AnimationTimeline.StepTimingFunction(parseInt(match[1], 10), match[2]);
+ match = text.match(/^steps\((\d+)\)$/);
+ if (match)
+ return new WebInspector.AnimationTimeline.StepTimingFunction(parseInt(match[1], 10), "end");
return null;
}

Powered by Google App Engine
This is Rietveld 408576698