OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |