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

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

Issue 2560553004: Revert of [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: Created 4 years 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 * @implements {SDK.TargetManager.Observer} 5 * @implements {SDK.TargetManager.Observer}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Animation.AnimationTimeline = class extends UI.VBox { 8 Animation.AnimationTimeline = class extends UI.VBox {
9 constructor() { 9 constructor() {
10 super(true); 10 super(true);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 this._timelineScrubberLine = this._timelineScrubber.createChild('div', 'anim ation-scrubber-line'); 105 this._timelineScrubberLine = this._timelineScrubber.createChild('div', 'anim ation-scrubber-line');
106 this._timelineScrubberLine.createChild('div', 'animation-scrubber-head'); 106 this._timelineScrubberLine.createChild('div', 'animation-scrubber-head');
107 this._timelineScrubber.createChild('div', 'animation-time-overlay'); 107 this._timelineScrubber.createChild('div', 'animation-time-overlay');
108 return this._timelineScrubber; 108 return this._timelineScrubber;
109 } 109 }
110 110
111 _createHeader() { 111 _createHeader() {
112 var toolbarContainer = this.contentElement.createChild('div', 'animation-tim eline-toolbar-container'); 112 var toolbarContainer = this.contentElement.createChild('div', 'animation-tim eline-toolbar-container');
113 var topToolbar = new UI.Toolbar('animation-timeline-toolbar', toolbarContain er); 113 var topToolbar = new UI.Toolbar('animation-timeline-toolbar', toolbarContain er);
114 var clearButton = new UI.ToolbarButton(Common.UIString('Clear all'), 'largei con-clear'); 114 var clearButton = new UI.ToolbarButton(Common.UIString('Clear all'), 'largei con-clear');
115 clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._reset.bind (this)); 115 clearButton.addEventListener('click', this._reset.bind(this));
116 topToolbar.appendToolbarItem(clearButton); 116 topToolbar.appendToolbarItem(clearButton);
117 topToolbar.appendSeparator(); 117 topToolbar.appendSeparator();
118 118
119 this._pauseButton = new UI.ToolbarToggle(Common.UIString('Pause all'), 'larg eicon-pause', 'largeicon-resume'); 119 this._pauseButton = new UI.ToolbarToggle(Common.UIString('Pause all'), 'larg eicon-pause', 'largeicon-resume');
120 this._pauseButton.addEventListener('click', this._togglePauseAll.bind(this)) ; 120 this._pauseButton.addEventListener('click', this._togglePauseAll.bind(this)) ;
121 topToolbar.appendToolbarItem(this._pauseButton); 121 topToolbar.appendToolbarItem(this._pauseButton);
122 122
123 var playbackRateControl = toolbarContainer.createChild('div', 'animation-pla yback-rate-control'); 123 var playbackRateControl = toolbarContainer.createChild('div', 'animation-pla yback-rate-control');
124 this._playbackRateButtons = []; 124 this._playbackRateButtons = [];
125 for (var playbackRate of Animation.AnimationTimeline.GlobalPlaybackRates) { 125 for (var playbackRate of Animation.AnimationTimeline.GlobalPlaybackRates) {
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 static parse(text) { 734 static parse(text) {
735 var match = text.match(/^steps\((\d+), (start|middle)\)$/); 735 var match = text.match(/^steps\((\d+), (start|middle)\)$/);
736 if (match) 736 if (match)
737 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1 ], 10), match[2]); 737 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1 ], 10), match[2]);
738 match = text.match(/^steps\((\d+)\)$/); 738 match = text.match(/^steps\((\d+)\)$/);
739 if (match) 739 if (match)
740 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1 ], 10), 'end'); 740 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1 ], 10), 'end');
741 return null; 741 return null;
742 } 742 }
743 }; 743 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698