Bug 1446060 - Rename mPanelContainer to tabpanels r=dao
authorVivek Dhingra <vivek3zero@gmail.com>
Fri, 16 Mar 2018 10:23:00 -0400
changeset 408522 86bf83ac969071303e8380973dda6bedb64e0a4c
parent 408521 db3858c71406fa3929322e93e14bf225ebadb398
child 408523 1844f2f666237323616c67178f515e2fb14483ca
push id61244
push userdgottwald@mozilla.com
push dateFri, 16 Mar 2018 14:33:43 +0000
treeherderautoland@86bf83ac9690 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1446060
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1446060 - Rename mPanelContainer to tabpanels r=dao MozReview-Commit-ID: 85PNkl3OeBE
browser/base/content/browser-fullScreenAndPointerLock.js
browser/base/content/browser.js
browser/base/content/tabbrowser.js
browser/modules/AsyncTabSwitcher.jsm
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -586,17 +586,17 @@ var FullScreen = {
     gNavToolbox.style.marginTop = "";
 
     if (!this._isChromeCollapsed) {
       return;
     }
 
     // Track whether mouse is near the toolbox
     if (trackMouse && !this.useLionFullScreen) {
-      let rect = gBrowser.mPanelContainer.getBoundingClientRect();
+      let rect = gBrowser.tabpanels.getBoundingClientRect();
       this._mouseTargetRect = {
         top: rect.top + 50,
         bottom: rect.bottom,
         left: rect.left,
         right: rect.right
       };
       MousePosTracker.addListener(this);
     }
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1316,17 +1316,17 @@ var gBrowserInit = {
     mm.loadFrameScript("chrome://browser/content/content-UITour.js", true);
     mm.loadFrameScript("chrome://global/content/content-HybridContentTelemetry.js", true);
     mm.loadFrameScript("chrome://global/content/manifestMessages.js", true);
 
     window.messageManager.addMessageListener("Browser:LoadURI", RedirectLoad);
 
     if (!gMultiProcessBrowser) {
       // There is a Content:Click message manually sent from content.
-      Services.els.addSystemEventListener(gBrowser.mPanelContainer, "click",
+      Services.els.addSystemEventListener(gBrowser.tabpanels, "click",
         contentAreaClick, true);
     }
 
     // hook up UI through progress listener
     gBrowser.addProgressListener(window.XULBrowserWindow);
     gBrowser.addTabsProgressListener(window.TabsProgressListener);
 
     SidebarUI.init();
--- a/browser/base/content/tabbrowser.js
+++ b/browser/base/content/tabbrowser.js
@@ -23,32 +23,32 @@ window._gBrowser = {
       Services.els.addSystemEventListener(document, "keypress", this, false);
     }
     window.addEventListener("sizemodechange", this);
     window.addEventListener("occlusionstatechange", this);
 
     this._setupInitialBrowserAndTab();
 
     if (Services.prefs.getBoolPref("browser.display.use_system_colors")) {
-      this.mPanelContainer.style.backgroundColor = "-moz-default-background-color";
+      this.tabpanels.style.backgroundColor = "-moz-default-background-color";
     } else if (Services.prefs.getIntPref("browser.display.document_color_use") == 2) {
-      this.mPanelContainer.style.backgroundColor =
+      this.tabpanels.style.backgroundColor =
         Services.prefs.getCharPref("browser.display.background_color");
     }
 
     let messageManager = window.getGroupMessageManager("browsers");
     if (gMultiProcessBrowser) {
       messageManager.addMessageListener("DOMTitleChanged", this);
       messageManager.addMessageListener("DOMWindowClose", this);
       window.messageManager.addMessageListener("contextmenu", this);
       messageManager.addMessageListener("Browser:Init", this);
 
       // If this window has remote tabs, switch to our tabpanels fork
       // which does asynchronous tab switching.
-      this.mPanelContainer.classList.add("tabbrowser-tabpanels");
+      this.tabpanels.classList.add("tabbrowser-tabpanels");
     } else {
       this._outerWindowIDBrowserMap.set(this.selectedBrowser.outerWindowID,
         this.selectedBrowser);
     }
     messageManager.addMessageListener("DOMWindowFocus", this);
     messageManager.addMessageListener("RefreshBlocker:Blocked", this);
     messageManager.addMessageListener("Browser:WindowCreated", this);
 
@@ -194,34 +194,34 @@ window._gBrowser = {
     return this.tabs = this.tabContainer.childNodes;
   },
 
   get tabbox() {
     delete this.tabbox;
     return this.tabbox = document.getElementById("tabbrowser-tabbox");
   },
 
-  get mPanelContainer() {
-    delete this.mPanelContainer;
-    return this.mPanelContainer = document.getElementById("tabbrowser-tabpanels");
+  get tabpanels() {
+    delete this.tabpanels;
+    return this.tabpanels = document.getElementById("tabbrowser-tabpanels");
   },
 
   get addEventListener() {
     delete this.addEventListener;
-    return this.addEventListener = this.mPanelContainer.addEventListener.bind(this.mPanelContainer);
+    return this.addEventListener = this.tabpanels.addEventListener.bind(this.tabpanels);
   },
 
   get removeEventListener() {
     delete this.removeEventListener;
-    return this.removeEventListener = this.mPanelContainer.removeEventListener.bind(this.mPanelContainer);
+    return this.removeEventListener = this.tabpanels.removeEventListener.bind(this.tabpanels);
   },
 
   get dispatchEvent() {
     delete this.dispatchEvent;
-    return this.dispatchEvent = this.mPanelContainer.dispatchEvent.bind(this.mPanelContainer);
+    return this.dispatchEvent = this.tabpanels.dispatchEvent.bind(this.tabpanels);
   },
 
   get visibleTabs() {
     if (!this._visibleTabs)
       this._visibleTabs = Array.filter(this.tabs,
         tab => !tab.hidden && !tab.closing);
     return this._visibleTabs;
   },
@@ -294,17 +294,17 @@ window._gBrowser = {
     for (let attribute in this._defaultBrowserAttributes) {
       this._defaultBrowserAttributes[attribute] = browser.getAttribute(attribute);
     }
 
     let tab = this.tabs[0];
     this._selectedTab = tab;
 
     let uniqueId = this._generateUniquePanelID();
-    this.mPanelContainer.childNodes[0].id = uniqueId;
+    this.tabpanels.childNodes[0].id = uniqueId;
     tab.linkedPanel = uniqueId;
     tab.permanentKey = browser.permanentKey;
     tab._tPos = 0;
     tab._fullyOpen = true;
     tab.linkedBrowser = browser;
     this._tabForBrowser.set(browser, tab);
 
     // Hook the browser up with a progress listener.
@@ -1794,17 +1794,17 @@ window._gBrowser = {
 
     let remoteType =
       E10SUtils.getRemoteTypeForURI(BROWSER_NEW_TAB_URL,
         gMultiProcessBrowser);
     let browser = this._createBrowser({ isPreloadBrowser: true, remoteType });
     this._preloadedBrowser = browser;
 
     let notificationbox = this.getNotificationBox(browser);
-    this.mPanelContainer.appendChild(notificationbox);
+    this.tabpanels.appendChild(notificationbox);
 
     if (remoteType != E10SUtils.NOT_REMOTE) {
       // For remote browsers, we need to make sure that the webProgress is
       // instantiated, otherwise the parent won't get informed about the state
       // of the preloaded browser until it gets attached to a tab.
       browser.webProgress;
     }
 
@@ -2049,17 +2049,17 @@ window._gBrowser = {
 
     // Inject the <browser> into the DOM if necessary.
     if (!notificationbox.parentNode) {
       // NB: this appendChild call causes us to run constructors for the
       // browser element, which fires off a bunch of notifications. Some
       // of those notifications can cause code to run that inspects our
       // state, so it is important that the tab element is fully
       // initialized by this point.
-      this.mPanelContainer.appendChild(notificationbox);
+      this.tabpanels.appendChild(notificationbox);
     }
 
     // wire up a progress listener for the new browser object.
     let tabListener = new TabProgressListener(aTab, browser, uriIsAboutBlank, usingPreloadedContent);
     const filter = Cc["@mozilla.org/appshell/component/browser-status-filter;1"]
       .createInstance(Ci.nsIWebProgress);
     filter.addProgressListener(tabListener, Ci.nsIWebProgress.NOTIFY_ALL);
     browser.webProgress.addProgressListener(filter, Ci.nsIWebProgress.NOTIFY_ALL);
@@ -2140,17 +2140,17 @@ window._gBrowser = {
       tab._findBar.close(true);
       tab._findBar.remove();
       delete tab._findBar;
     }
 
     aBrowser.destroy();
 
     let notificationbox = this.getNotificationBox(aBrowser);
-    this.mPanelContainer.removeChild(notificationbox);
+    this.tabpanels.removeChild(notificationbox);
     tab.removeAttribute("linkedpanel");
 
     this._createLazyBrowser(tab);
 
     let evt = new CustomEvent("TabBrowserDiscarded", { bubbles: true });
     tab.dispatchEvent(evt);
   },
 
--- a/browser/modules/AsyncTabSwitcher.jsm
+++ b/browser/modules/AsyncTabSwitcher.jsm
@@ -383,39 +383,39 @@ class AsyncTabSwitcher {
 
     // Show or hide the spinner as needed.
     let needSpinner = this.getTabState(showTab) != this.STATE_LOADED &&
                       !this.minimizedOrFullyOccluded &&
                       !shouldBeBlank;
 
     if (!needSpinner && this.spinnerTab) {
       this.spinnerHidden();
-      this.tabbrowser.mPanelContainer.removeAttribute("pendingpaint");
+      this.tabbrowser.tabpanels.removeAttribute("pendingpaint");
       this.spinnerTab.linkedBrowser.removeAttribute("pendingpaint");
       this.spinnerTab = null;
     } else if (needSpinner && this.spinnerTab !== showTab) {
       if (this.spinnerTab) {
         this.spinnerTab.linkedBrowser.removeAttribute("pendingpaint");
       } else {
         this.spinnerDisplayed();
       }
       this.spinnerTab = showTab;
-      this.tabbrowser.mPanelContainer.setAttribute("pendingpaint", "true");
+      this.tabbrowser.tabpanels.setAttribute("pendingpaint", "true");
       this.spinnerTab.linkedBrowser.setAttribute("pendingpaint", "true");
     }
 
     // Switch to the tab we've decided to make visible.
     if (this.visibleTab !== showTab) {
       this.tabbrowser._adjustFocusBeforeTabSwitch(this.visibleTab, showTab);
       this.visibleTab = showTab;
 
       this.maybeVisibleTabs.add(showTab);
 
       let tabs = this.tabbrowser.tabbox.tabs;
-      let tabPanel = this.tabbrowser.mPanelContainer;
+      let tabPanel = this.tabbrowser.tabpanels;
       let showPanel = tabs.getRelatedElement(showTab);
       let index = Array.indexOf(tabPanel.childNodes, showPanel);
       if (index != -1) {
         this.log(`Switch to tab ${index} - ${this.tinfo(showTab)}`);
         tabPanel.setAttribute("selectedIndex", index);
         if (showTab === this.requestedTab) {
           if (this._requestingTab) {
             /*