Bug 1415863 - Rename mTabBox to tabbox. r=florian
authorDão Gottwald <dao@mozilla.com>
Thu, 09 Nov 2017 13:53:48 +0100
changeset 391791 fd3c9c0096fa2af87270ec6cbd2d256710403fb8
parent 391790 62b26140b19e391fba7fcf9657312744341ce196
child 391792 ab20e3b3ef7bbfe7d910f3c79028318cb14bf149
push id97352
push usernerli@mozilla.com
push dateWed, 15 Nov 2017 10:16:19 +0000
treeherdermozilla-inbound@76d469663b3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1415863
milestone59.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 1415863 - Rename mTabBox to tabbox. r=florian MozReview-Commit-ID: L2mzJnHHwNu
accessible/tests/mochitest/relations/test_tabbrowser.xul
accessible/tests/mochitest/tree/test_tabbrowser.xul
browser/base/content/browser-ctrlTab.js
browser/base/content/tabbrowser.xml
browser/base/content/test/general/browser_bug462673.js
browser/base/content/test/general/browser_tabkeynavigation.js
browser/components/sessionstore/SessionStore.jsm
--- a/accessible/tests/mochitest/relations/test_tabbrowser.xul
+++ b/accessible/tests/mochitest/relations/test_tabbrowser.xul
@@ -44,17 +44,17 @@
       }
 
       this.finalCheck = function testTabRelations_finalCheck(aEvent)
       {
         ////////////////////////////////////////////////////////////////////////
         // 'labelled by'/'label for' relations for xul:tab and xul:tabpanel
 
         var tabs = tabBrowser().tabContainer.childNodes;
-        var panels = tabBrowser().mTabBox.tabpanels.childNodes;
+        var panels = tabBrowser().tabbox.tabpanels.childNodes;
 
         testRelation(panels[0], RELATION_LABELLED_BY, tabs[0]);
         testRelation(tabs[0], RELATION_LABEL_FOR, panels[0]);
         testRelation(panels[1], RELATION_LABELLED_BY, tabs[1]);
         testRelation(tabs[1], RELATION_LABEL_FOR, panels[1]);
       }
 
       this.getID = function testTabRelations_getID()
--- a/accessible/tests/mochitest/tree/test_tabbrowser.xul
+++ b/accessible/tests/mochitest/tree/test_tabbrowser.xul
@@ -208,17 +208,17 @@
                     }
                   ]
                 }
               ]
             }
           ]
         };
 
-        testAccessibleTree(tabBrowser().mTabBox.tabpanels, tabboxAccTree);
+        testAccessibleTree(tabBrowser().tabbox.tabpanels, tabboxAccTree);
       }
 
       this.getID = function testTabHierarchy_getID()
       {
         return "hierarchy of tabs";
       }
     }
 
--- a/browser/base/content/browser-ctrlTab.js
+++ b/browser/base/content/browser-ctrlTab.js
@@ -542,17 +542,17 @@ var ctrlTab = {
 
     var tabContainer = gBrowser.tabContainer;
     tabContainer[toggleEventListener]("TabOpen", this);
     tabContainer[toggleEventListener]("TabAttrModified", this);
     tabContainer[toggleEventListener]("TabSelect", this);
     tabContainer[toggleEventListener]("TabClose", this);
 
     document[toggleEventListener]("keypress", this);
-    gBrowser.mTabBox.handleCtrlTab = !enable;
+    gBrowser.tabbox.handleCtrlTab = !enable;
 
     if (enable)
       PageThumbs.addExpirationFilter(this);
     else
       PageThumbs.removeExpirationFilter(this);
 
     // If we're not running, hide the "Show All Tabs" menu item,
     // as Shift+Ctrl+Tab will be handled by the tab bar.
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -64,17 +64,17 @@
       <field name="mURIFixup" readonly="true">
         Components.classes["@mozilla.org/docshell/urifixup;1"]
                   .getService(Components.interfaces.nsIURIFixup);
       </field>
       <field name="_unifiedComplete" readonly="true">
          Components.classes["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"]
                    .getService(Components.interfaces.mozIPlacesAutoComplete);
       </field>
-      <field name="mTabBox" readonly="true">
+      <field name="tabbox" readonly="true">
         document.getAnonymousElementByAttribute(this, "anonid", "tabbox");
       </field>
       <field name="mPanelContainer" readonly="true">
         document.getAnonymousElementByAttribute(this, "anonid", "panelcontainer");
       </field>
       <field name="mCurrentTab">
         null
       </field>
@@ -3930,20 +3930,20 @@
 
       <property name="selectedTab">
         <getter>
           return this.mCurrentTab;
         </getter>
         <setter>
           <![CDATA[
           if (gNavToolbox.collapsed && !this._allowTabChange) {
-            return this.mTabBox.selectedTab;
+            return this.tabbox.selectedTab;
           }
           // Update the tab
-          this.mTabBox.selectedTab = val;
+          this.tabbox.selectedTab = val;
           return val;
           ]]>
         </setter>
       </property>
 
       <property name="selectedBrowser"
                 onget="return this.mCurrentBrowser;"
                 readonly="true"/>
@@ -4620,17 +4620,17 @@
 
               // 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.mTabBox.tabs;
+                let tabs = this.tabbrowser.tabbox.tabs;
                 let tabPanel = this.tabbrowser.mPanelContainer;
                 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) {
@@ -6424,17 +6424,17 @@
         ]]>
       </destructor>
 
       <field name="tabbrowser" readonly="true">
         document.getElementById(this.getAttribute("tabbrowser"));
       </field>
 
       <field name="tabbox" readonly="true">
-        this.tabbrowser.mTabBox;
+        this.tabbrowser.tabbox;
       </field>
 
       <field name="contextMenu" readonly="true">
         document.getElementById("tabContextMenu");
       </field>
 
       <field name="arrowScrollbox">
         document.getAnonymousElementByAttribute(this, "anonid", "arrowscrollbox");
--- a/browser/base/content/test/general/browser_bug462673.js
+++ b/browser/base/content/test/general/browser_bug462673.js
@@ -24,13 +24,13 @@ add_task(async function() {
   var newBrowser = newTab.linkedBrowser;
   win.gBrowser.removeTab(tab);
   ok(!win.closed, "Window stays open");
   if (!win.closed) {
     is(win.gBrowser.tabContainer.childElementCount, 1, "Window has one tab");
     is(win.gBrowser.browsers.length, 1, "Window has one browser");
     is(win.gBrowser.selectedTab, newTab, "Remaining tab is selected");
     is(win.gBrowser.selectedBrowser, newBrowser, "Browser for remaining tab is selected");
-    is(win.gBrowser.mTabBox.selectedPanel, newBrowser.parentNode.parentNode.parentNode.parentNode, "Panel for remaining tab is selected");
+    is(win.gBrowser.tabbox.selectedPanel, newBrowser.parentNode.parentNode.parentNode.parentNode, "Panel for remaining tab is selected");
   }
 
   await promiseWindowClosed(win);
 });
--- a/browser/base/content/test/general/browser_tabkeynavigation.js
+++ b/browser/base/content/test/general/browser_tabkeynavigation.js
@@ -52,21 +52,21 @@ add_task(async function test() {
   EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true });
   is(gBrowser.selectedTab, tab2,
      "Tab2 should be activated by pressing Ctrl+PageUp on Tab3");
 
   EventUtils.synthesizeKey("VK_PAGE_UP", { ctrlKey: true });
   is(gBrowser.selectedTab, tab1,
      "Tab1 should be activated by pressing Ctrl+PageUp on Tab2");
 
-  if (gBrowser.mTabBox._handleMetaAltArrows) {
+  if (gBrowser.tabbox._handleMetaAltArrows) {
     gBrowser.selectedTab = tab1;
     browser1.focus();
 
-    let ltr = window.getComputedStyle(gBrowser.mTabBox).direction == "ltr";
+    let ltr = window.getComputedStyle(gBrowser.tabbox).direction == "ltr";
     let advanceKey = ltr ? "VK_RIGHT" : "VK_LEFT";
     let reverseKey = ltr ? "VK_LEFT" : "VK_RIGHT";
 
     is(gBrowser.selectedTab, tab1,
        "Tab1 should be activated");
     EventUtils.synthesizeKey(advanceKey, { altKey: true, metaKey: true });
     is(gBrowser.selectedTab, tab2,
        "Tab2 should be activated by pressing Ctrl+" + advanceKey + " on Tab1");
@@ -104,17 +104,17 @@ add_task(async function test() {
 
   if (navigator.platform.indexOf("Mac") == 0) {
     gBrowser.selectedTab = tab1;
     browser1.focus();
 
     // XXX Currently, Command + "{" and "}" don't work if keydown event is
     //     consumed because following keypress event isn't fired.
 
-    let ltr = window.getComputedStyle(gBrowser.mTabBox).direction == "ltr";
+    let ltr = window.getComputedStyle(gBrowser.tabbox).direction == "ltr";
     let advanceKey = ltr ? "}" : "{";
     let reverseKey = ltr ? "{" : "}";
 
     is(gBrowser.selectedTab, tab1,
        "Tab1 should be activated");
 
     EventUtils.synthesizeKey(advanceKey, { metaKey: true });
     is(gBrowser.selectedTab, tab2,
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -3274,17 +3274,17 @@ var SessionStoreInternal = {
     let tabsData = winData.tabs = [];
 
     // update the internal state data for this window
     for (let tab of tabs) {
       let tabData = TabState.collect(tab);
       tabMap.set(tab, tabData);
       tabsData.push(tabData);
     }
-    winData.selected = tabbrowser.mTabBox.selectedIndex + 1;
+    winData.selected = tabbrowser.tabbox.selectedIndex + 1;
 
     this._updateWindowFeatures(aWindow);
 
     // Make sure we keep __SS_lastSessionWindowID around for cases like entering
     // or leaving PB mode.
     if (aWindow.__SS_lastSessionWindowID)
       this._windows[aWindow.__SSi].__lastSessionWindowID =
         aWindow.__SS_lastSessionWindowID;