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

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

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 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 * @param {!WebInspector.AnimationModel.Animation} animation 7 * @param {!WebInspector.AnimationModel.Animation} animation
8 * @param {!WebInspector.AnimationTimeline} timeline 8 * @param {!WebInspector.AnimationTimeline} timeline
9 * @param {!Element} parentElement 9 * @param {!Element} parentElement
10 */ 10 */
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 this._downMouseX = event.clientX; 314 this._downMouseX = event.clientX;
315 event.consume(true); 315 event.consume(true);
316 if (this._node) 316 if (this._node)
317 WebInspector.Revealer.reveal(this._node); 317 WebInspector.Revealer.reveal(this._node);
318 return true; 318 return true;
319 }, 319 },
320 320
321 /** 321 /**
322 * @param {!Event} event 322 * @param {!Event} event
323 */ 323 */
324 _mouseMove: function (event) 324 _mouseMove: function(event)
325 { 325 {
326 this._movementInMs = (event.clientX - this._downMouseX) / this._timeline .pixelMsRatio(); 326 this._movementInMs = (event.clientX - this._downMouseX) / this._timeline .pixelMsRatio();
327 if (this._delay() + this._duration() > this._timeline.duration() * 0.8) 327 if (this._delay() + this._duration() > this._timeline.duration() * 0.8)
328 this._timeline.setDuration(this._timeline.duration() * 1.2); 328 this._timeline.setDuration(this._timeline.duration() * 1.2);
329 this.redraw(); 329 this.redraw();
330 }, 330 },
331 331
332 /** 332 /**
333 * @param {!Event} event 333 * @param {!Event} event
334 */ 334 */
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 /** 396 /**
397 * @param {!WebInspector.AnimationModel.Animation} animation 397 * @param {!WebInspector.AnimationModel.Animation} animation
398 * @return {string} 398 * @return {string}
399 */ 399 */
400 WebInspector.AnimationUI.Color = function(animation) 400 WebInspector.AnimationUI.Color = function(animation)
401 { 401 {
402 var names = Object.keys(WebInspector.AnimationUI.Colors); 402 var names = Object.keys(WebInspector.AnimationUI.Colors);
403 var color = WebInspector.AnimationUI.Colors[names[String.hashCode(animation. name() || animation.id()) % names.length]]; 403 var color = WebInspector.AnimationUI.Colors[names[String.hashCode(animation. name() || animation.id()) % names.length]];
404 return color.asString(WebInspector.Color.Format.RGB); 404 return color.asString(WebInspector.Color.Format.RGB);
405 } 405 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698