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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 * @implements {WebInspector.TargetManager.Observer} 8 * @implements {WebInspector.TargetManager.Observer}
9 */ 9 */
10 WebInspector.AnimationTimeline = function() 10 WebInspector.AnimationTimeline = function()
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 { 755 {
756 this.steps = steps; 756 this.steps = steps;
757 this.stepAtPosition = stepAtPosition; 757 this.stepAtPosition = stepAtPosition;
758 } 758 }
759 759
760 /** 760 /**
761 * @param {string} text 761 * @param {string} text
762 * @return {?WebInspector.AnimationTimeline.StepTimingFunction} 762 * @return {?WebInspector.AnimationTimeline.StepTimingFunction}
763 */ 763 */
764 WebInspector.AnimationTimeline.StepTimingFunction.parse = function(text) { 764 WebInspector.AnimationTimeline.StepTimingFunction.parse = function(text) {
765 var match = text.match(/^step-(start|middle|end)$/); 765 var match = text.match(/^steps\((\d+), (start|middle)\)$/);
766 if (match)
767 return new WebInspector.AnimationTimeline.StepTimingFunction(1, match[1] );
768 match = text.match(/^steps\((\d+), (start|middle|end)\)$/);
769 if (match) 766 if (match)
770 return new WebInspector.AnimationTimeline.StepTimingFunction(parseInt(ma tch[1], 10), match[2]); 767 return new WebInspector.AnimationTimeline.StepTimingFunction(parseInt(ma tch[1], 10), match[2]);
768 match = text.match(/^steps\((\d+)\)$/);
769 if (match)
770 return new WebInspector.AnimationTimeline.StepTimingFunction(parseInt(ma tch[1], 10), "end");
771 return null; 771 return null;
772 } 772 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698