Bug 1392352 - Part 2.2 - To fold: remove build instructions and reorganize things a bit;r=dao draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Tue, 27 Feb 2018 09:19:07 -0800
changeset 760461 bfe1433b7ccb93db1fda0e59ae23bc41aeecfdaf
parent 760460 3c7adddf2d137919508c6ee64eec40a9ce62f3ed
child 760462 24b6b40786e286e6b397dc83bf8f432a16cc708f
push id100651
push userbgrinstead@mozilla.com
push dateTue, 27 Feb 2018 17:19:18 +0000
reviewersdao
bugs1392352
milestone60.0a1
Bug 1392352 - Part 2.2 - To fold: remove build instructions and reorganize things a bit;r=dao MozReview-Commit-ID: AMZbgh9Ri2f
browser/base/content/tabbrowser.js
--- a/browser/base/content/tabbrowser.js
+++ b/browser/base/content/tabbrowser.js
@@ -1,53 +1,15 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
  * 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/. */
 
 /* eslint-env mozilla/browser-window */
 
-// STEPS TO BUILD:
-// Generate the class with `npm run elements` from https://github.com/bgrins/xbl-analysis
-// Delete `this.tabs =` this.tabContainer =` `this.tabbox =` and `this.mPanelContainer = ` lines
-// Get rid of all calls to getService except for nsIEventListenerService.
-// Replace document.getAnonymousElementByAttribute(this, ..) with document.getAnonymousElementByAttribute(this.container)
-// Add: `// eslint-disable-next-line complexity` before `  addTab(`
-// Replace `window.getComputedStyle(this` with `window.getComputedStyle(this.container`
-// Replace `otherState = (otherBrowser.docShellIsActive ?` statement to all be on one line and remove parens around it.
-// Re-indent `? this.STATE_LOADED` with the ':' below it on the next line
-// Un-indent case blocks for the `switch (aMessage.name)` statement
-// Un-indent case blocks for the `switch (aTopic)` statement
-// Indent `gNavigatorBundle.getFormattedString("customizeMode.tabTitle"` so the array is on a new line
-// Re-indent `gNavigatorBundle.getFormattedString("refreshBlocked."` as:
-/*
-          gNavigatorBundle.getFormattedString("refreshBlocked." +
-                                              (data.sameURI ? "refreshLabel"
-                                                            : "redirectLabel"),
-                                              [brandShortName]);
-*/
-// Indent calls to `getInterface` inline with the QueryInterface `.` on the line above.
-// Re-indent `this._callProgressListeners` so the array starts on the next line below the `(`. Special case:
-/*
-        this._callProgressListeners("onProgressChange",
-                                    [aWebProgress, aRequest,
-                                     aCurSelfProgress, aMaxSelfProgress,
-                                     aCurTotalProgress, aMaxTotalProgress]);
-*/
-// Move the "The tab switcher is responsible for asynchronously switching" comment down by getSwitcher
-// Move all the functions starting with goBack() and ending with gotoIndex after `get canGoForward`
-// Add the following comment above duplicateTab:
-  /**
-   * @param   aTab
-   *          Can be from a different window as well
-   * @param   aRestoreTabImmediately
-   *          Can defer loading of the tab contents
-   */
-// Run `./mach eslint browser/base/content/tabbrowser.js --fix`
-
 class TabBrowser {
   constructor(container) {
     this.container = container;
     this.requiresAddonInterpositions = true;
 
     // Pass along any used DOM methods to the container node. When this object turns
     // into a custom element this won't be needed anymore.
     this.addEventListener = this.container.addEventListener.bind(this.container);
@@ -80,17 +42,16 @@ class TabBrowser {
     });
     XPCOMUtils.defineLazyGetter(this, "tabbox", () => {
       return document.getAnonymousElementByAttribute(this.container, "anonid", "tabbox");
     });
     XPCOMUtils.defineLazyGetter(this, "mPanelContainer", () => {
       return document.getAnonymousElementByAttribute(this.container, "anonid", "panelcontainer");
     });
 
-    // For upgrading replace below here:
     this.closingTabsEnum = { ALL: 0, OTHER: 1, TO_END: 2 };
 
     this._visibleTabs = null;
 
     this.mCurrentTab = null;
 
     this._lastRelatedTabMap = new WeakMap();