| 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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 */ | 751 */ |
| 752 WebInspector.AnimationTimeline.StepTimingFunction.parse = function(text) { | 752 WebInspector.AnimationTimeline.StepTimingFunction.parse = function(text) { |
| 753 var match = text.match(/^step-(start|middle|end)$/); | 753 var match = text.match(/^step-(start|middle|end)$/); |
| 754 if (match) | 754 if (match) |
| 755 return new WebInspector.AnimationTimeline.StepTimingFunction(1, match[1]
); | 755 return new WebInspector.AnimationTimeline.StepTimingFunction(1, match[1]
); |
| 756 match = text.match(/^steps\((\d+), (start|middle|end)\)$/); | 756 match = text.match(/^steps\((\d+), (start|middle|end)\)$/); |
| 757 if (match) | 757 if (match) |
| 758 return new WebInspector.AnimationTimeline.StepTimingFunction(parseInt(ma
tch[1], 10), match[2]); | 758 return new WebInspector.AnimationTimeline.StepTimingFunction(parseInt(ma
tch[1], 10), match[2]); |
| 759 return null; | 759 return null; |
| 760 } | 760 } |
| 761 | |
| 762 /** | |
| 763 * @constructor | |
| 764 * @implements {WebInspector.ToolbarItem.Provider} | |
| 765 */ | |
| 766 WebInspector.AnimationTimeline.ButtonProvider = function() | |
| 767 { | |
| 768 this._button = new WebInspector.ToolbarButton(WebInspector.UIString("Animati
ons"), "animation-toolbar-item"); | |
| 769 this._button.addEventListener("click", this._clicked, this); | |
| 770 } | |
| 771 | |
| 772 WebInspector.AnimationTimeline.ButtonProvider.prototype = { | |
| 773 _clicked: function() | |
| 774 { | |
| 775 WebInspector.inspectorView.showViewInDrawer("animations"); | |
| 776 }, | |
| 777 | |
| 778 /** | |
| 779 * @override | |
| 780 * @return {!WebInspector.ToolbarItem} | |
| 781 */ | |
| 782 item: function() | |
| 783 { | |
| 784 return this._button; | |
| 785 } | |
| 786 } | |
| OLD | NEW |