diff --git a/browser/devtools/animationinspector/animation-controller.js b/browser/devtools/animationinspector/animation-controller.js index e57ada4b8fe5..a2381a98ddd0 100644 --- a/browser/devtools/animationinspector/animation-controller.js +++ b/browser/devtools/animationinspector/animation-controller.js @@ -3,6 +3,8 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +/* globals ViewHelpers, Task, AnimationsPanel, promise, EventEmitter, + AnimationsFront */ "use strict"; @@ -35,7 +37,8 @@ let startup = Task.async(function*(inspector) { // Don't assume that AnimationsPanel is defined here, it's in another file. if (!typeof AnimationsPanel === "undefined") { - throw new Error("AnimationsPanel was not loaded in the animationinspector window"); + throw new Error("AnimationsPanel was not loaded in the " + + "animationinspector window"); } // Startup first initalizes the controller and then the panel, in sequence. @@ -170,7 +173,7 @@ let AnimationsController = { gInspector.sidebar.getCurrentTabID() == "animationinspector"; }, - onPanelVisibilityChange: Task.async(function*(e, id) { + onPanelVisibilityChange: Task.async(function*() { if (this.isPanelVisible()) { this.onNewNodeFront(); this.startAllAutoRefresh(); @@ -181,14 +184,15 @@ let AnimationsController = { onNewNodeFront: Task.async(function*() { // Ignore if the panel isn't visible or the node selection hasn't changed. - if (!this.isPanelVisible() || this.nodeFront === gInspector.selection.nodeFront) { + if (!this.isPanelVisible() || + this.nodeFront === gInspector.selection.nodeFront) { return; } let done = gInspector.updating("animationscontroller"); - if(!gInspector.selection.isConnected() || - !gInspector.selection.isElementNode()) { + if (!gInspector.selection.isConnected() || + !gInspector.selection.isElementNode()) { yield this.destroyAnimationPlayers(); this.emit(this.PLAYERS_UPDATED_EVENT); done(); @@ -207,7 +211,7 @@ let AnimationsController = { */ toggleAll: function() { if (!this.hasToggleAll) { - return promis.resolve(); + return promise.resolve(); } return this.animationsFront.toggleAll().catch(Cu.reportError); diff --git a/browser/devtools/animationinspector/components.js b/browser/devtools/animationinspector/components.js index b3a3e024f5f6..7478a42001bd 100644 --- a/browser/devtools/animationinspector/components.js +++ b/browser/devtools/animationinspector/components.js @@ -783,7 +783,8 @@ AnimationsTimeline.prototype = { drawHeaderAndBackground: function() { let width = this.timeHeaderEl.offsetWidth; let scale = width / (TimeScale.maxEndTime - TimeScale.minStartTime); - drawGraphElementBackground(this.win.document, "time-graduations", width, scale); + drawGraphElementBackground(this.win.document, "time-graduations", + width, scale); // And the time graduation header. this.timeHeaderEl.innerHTML = ""; diff --git a/browser/devtools/animationinspector/utils.js b/browser/devtools/animationinspector/utils.js index 33cff3884ca7..83227d4a4d5e 100644 --- a/browser/devtools/animationinspector/utils.js +++ b/browser/devtools/animationinspector/utils.js @@ -16,8 +16,10 @@ const TIME_INTERVAL_SCALES = 3; const TIME_GRADUATION_MIN_SPACING = 10; // RGB color for the time interval background. const TIME_INTERVAL_COLOR = [128, 136, 144]; -const TIME_INTERVAL_OPACITY_MIN = 32; // byte -const TIME_INTERVAL_OPACITY_ADD = 32; // byte +// byte +const TIME_INTERVAL_OPACITY_MIN = 32; +// byte +const TIME_INTERVAL_OPACITY_ADD = 32; /** * DOM node creation helper function.