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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/BezierEditor.js

Issue 2261933002: DevTools: Use JS symbols instead of strings for eligible events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 */ 8 */
9 WebInspector.BezierEditor = function() 9 WebInspector.BezierEditor = function()
10 { 10 {
(...skipping 25 matching lines...) Expand all
36 WebInspector.installDragHandle(this._curve, this._dragStart.bind(this), this ._dragMove.bind(this), this._dragEnd.bind(this), "default"); 36 WebInspector.installDragHandle(this._curve, this._dragStart.bind(this), this ._dragMove.bind(this), this._dragEnd.bind(this), "default");
37 37
38 this._header = this.contentElement.createChild("div", "bezier-header"); 38 this._header = this.contentElement.createChild("div", "bezier-header");
39 var minus = this._createPresetModifyIcon(this._header, "bezier-preset-minus" , "M 12 6 L 8 10 L 12 14"); 39 var minus = this._createPresetModifyIcon(this._header, "bezier-preset-minus" , "M 12 6 L 8 10 L 12 14");
40 var plus = this._createPresetModifyIcon(this._header, "bezier-preset-plus", "M 8 6 L 12 10 L 8 14"); 40 var plus = this._createPresetModifyIcon(this._header, "bezier-preset-plus", "M 8 6 L 12 10 L 8 14");
41 minus.addEventListener("click", this._presetModifyClicked.bind(this, false)) ; 41 minus.addEventListener("click", this._presetModifyClicked.bind(this, false)) ;
42 plus.addEventListener("click", this._presetModifyClicked.bind(this, true)); 42 plus.addEventListener("click", this._presetModifyClicked.bind(this, true));
43 this._label = this._header.createChild("span", "source-code bezier-display-v alue"); 43 this._label = this._header.createChild("span", "source-code bezier-display-v alue");
44 } 44 }
45 45
46 /** @enum {symbol} */
46 WebInspector.BezierEditor.Events = { 47 WebInspector.BezierEditor.Events = {
47 BezierChanged: "BezierChanged" 48 BezierChanged: Symbol("BezierChanged")
48 } 49 }
49 50
50 WebInspector.BezierEditor.Presets = [ 51 WebInspector.BezierEditor.Presets = [
51 [ 52 [
52 { name: "ease-in-out", value: "ease-in-out" }, 53 { name: "ease-in-out", value: "ease-in-out" },
53 { name: "In Out · Sine", value: "cubic-bezier(0.45, 0.05, 0.55, 0.95)" } , 54 { name: "In Out · Sine", value: "cubic-bezier(0.45, 0.05, 0.55, 0.95)" } ,
54 { name: "In Out · Quadratic", value: "cubic-bezier(0.46, 0.03, 0.52, 0.9 6)" }, 55 { name: "In Out · Quadratic", value: "cubic-bezier(0.46, 0.03, 0.52, 0.9 6)" },
55 { name: "In Out · Cubic", value: "cubic-bezier(0.65, 0.05, 0.36, 1)" }, 56 { name: "In Out · Cubic", value: "cubic-bezier(0.65, 0.05, 0.36, 1)" },
56 { name: "Fast Out, Slow In", value: "cubic-bezier(0.4, 0, 0.2, 1)" }, 57 { name: "Fast Out, Slow In", value: "cubic-bezier(0.4, 0, 0.2, 1)" },
57 { name: "In Out · Back", value: "cubic-bezier(0.68, -0.55, 0.27, 1.55)" } 58 { name: "In Out · Back", value: "cubic-bezier(0.68, -0.55, 0.27, 1.55)" }
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 var slice = this._previewOnion.createChild("div", "bezier-preview-an imation"); 273 var slice = this._previewOnion.createChild("div", "bezier-preview-an imation");
273 var player = slice.animate([{ transform: "translateX(0px)", easing: this._bezier.asCSSText() }, { transform: "translateX(218px)" }], 274 var player = slice.animate([{ transform: "translateX(0px)", easing: this._bezier.asCSSText() }, { transform: "translateX(218px)" }],
274 { duration: animationDuration, fill: "forwards" }); 275 { duration: animationDuration, fill: "forwards" });
275 player.pause(); 276 player.pause();
276 player.currentTime = animationDuration * i / numberOnionSlices; 277 player.currentTime = animationDuration * i / numberOnionSlices;
277 } 278 }
278 }, 279 },
279 280
280 __proto__: WebInspector.VBox.prototype 281 __proto__: WebInspector.VBox.prototype
281 } 282 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698