Bug 1169563 - 1 - Minor ESLint code cleanup; r=ednapiranha

--HG--
extra : rebase_source : c2988581bdbf47ab76d5ee55268badd4d5c4c826
extra : histedit_source : b114e695cb80781a95fc03e535d56c2d39e45035
This commit is contained in:
Patrick Brosset 2015-08-13 14:07:51 +02:00
Родитель 01a7a08973
Коммит a0d7365b19
3 изменённых файлов: 16 добавлений и 9 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -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 = "";

Просмотреть файл

@ -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.