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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/perf_ui/FilmStripView.js

Issue 2912563003: DevTools: cleanup button styles (Closed)
Patch Set: fix test Created 3 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 PerfUI.FilmStripView = class extends UI.HBox { 7 PerfUI.FilmStripView = class extends UI.HBox {
8 constructor() { 8 constructor() {
9 super(true); 9 super(true);
10 this.registerRequiredCSS('perf_ui/filmStripView.css'); 10 this.registerRequiredCSS('perf_ui/filmStripView.css');
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 this.contentElement.classList.add('filmstrip-dialog'); 216 this.contentElement.classList.add('filmstrip-dialog');
217 this.contentElement.tabIndex = 0; 217 this.contentElement.tabIndex = 0;
218 218
219 this._frames = filmStripFrame.model().frames(); 219 this._frames = filmStripFrame.model().frames();
220 this._index = filmStripFrame.index; 220 this._index = filmStripFrame.index;
221 this._zeroTime = zeroTime || filmStripFrame.model().zeroTime(); 221 this._zeroTime = zeroTime || filmStripFrame.model().zeroTime();
222 222
223 this._imageElement = this.contentElement.createChild('img'); 223 this._imageElement = this.contentElement.createChild('img');
224 var footerElement = this.contentElement.createChild('div', 'filmstrip-dialog -footer'); 224 var footerElement = this.contentElement.createChild('div', 'filmstrip-dialog -footer');
225 footerElement.createChild('div', 'flex-auto'); 225 footerElement.createChild('div', 'flex-auto');
226 var prevButton = 226 var prevButton = UI.createTextButton('\u25C0', this._onPrevFrame.bind(this)) ;
227 UI.createTextButton('\u25C0', this._onPrevFrame.bind(this), undefined, C ommon.UIString('Previous frame')); 227 prevButton.title = Common.UIString('Previous frame');
228 footerElement.appendChild(prevButton); 228 footerElement.appendChild(prevButton);
229 this._timeLabel = footerElement.createChild('div', 'filmstrip-dialog-label') ; 229 this._timeLabel = footerElement.createChild('div', 'filmstrip-dialog-label') ;
230 var nextButton = 230 var nextButton = UI.createTextButton('\u25B6', this._onNextFrame.bind(this)) ;
231 UI.createTextButton('\u25B6', this._onNextFrame.bind(this), undefined, C ommon.UIString('Next frame')); 231 nextButton.title = Common.UIString('Next frame');
232 footerElement.appendChild(nextButton); 232 footerElement.appendChild(nextButton);
233 footerElement.createChild('div', 'flex-auto'); 233 footerElement.createChild('div', 'flex-auto');
234 234
235 this.contentElement.addEventListener('keydown', this._keyDown.bind(this), fa lse); 235 this.contentElement.addEventListener('keydown', this._keyDown.bind(this), fa lse);
236 this.setDefaultFocusedElement(this.contentElement); 236 this.setDefaultFocusedElement(this.contentElement);
237 this._render(); 237 this._render();
238 } 238 }
239 239
240 _resize() { 240 _resize() {
241 if (!this._dialog) { 241 if (!this._dialog) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 * @return {!Promise<undefined>} 301 * @return {!Promise<undefined>}
302 */ 302 */
303 _render() { 303 _render() {
304 var frame = this._frames[this._index]; 304 var frame = this._frames[this._index];
305 this._timeLabel.textContent = Number.millisToString(frame.timestamp - this._ zeroTime); 305 this._timeLabel.textContent = Number.millisToString(frame.timestamp - this._ zeroTime);
306 return frame.imageDataPromise() 306 return frame.imageDataPromise()
307 .then(PerfUI.FilmStripView._setImageData.bind(null, this._imageElement)) 307 .then(PerfUI.FilmStripView._setImageData.bind(null, this._imageElement))
308 .then(this._resize.bind(this)); 308 .then(this._resize.bind(this));
309 } 309 }
310 }; 310 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698