Bug 1363485 - Move the Back, Forward, Reload and Stop buttons outside of the location bar container to the start of the toolbar along with the Home button draft
authorUK992 <urbankrajnc92@gmail.com>
Sun, 25 Jun 2017 03:07:36 +0200
changeset 600291 c6892b94f65463cb3b87391c5638d89db8245805
parent 600225 c01aa84ded7eb0b3e691f8bcc5cd887c960a779e
child 634948 f8dbbd4e23857b9a680fdb1836429c0c320a2339
push id65709
push userbmo:urbankrajnc92@gmail.com
push dateSun, 25 Jun 2017 13:51:02 +0000
bugs1363485
milestone56.0a1
Bug 1363485 - Move the Back, Forward, Reload and Stop buttons outside of the location bar container to the start of the toolbar along with the Home button MozReview-Commit-ID: 5VbCl3SpD2Y
browser/base/content/browser.xul
browser/components/customizableui/CustomizableUI.jsm
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -756,47 +756,58 @@
              customizationtarget="nav-bar-customization-target"
              overflowable="true"
              overflowbutton="nav-bar-overflow-button"
              overflowtarget="widget-overflow-list"
              overflowpanel="widget-overflow"
              context="toolbar-context-menu">
 
       <hbox id="nav-bar-customization-target" flex="1">
+#ifdef MOZ_PHOTON_THEME
+        <toolbaritem id="back-forward-button"
+                     removable="false" overflows="false"
+                     class="chromeclass-toolbar-additional">
+          <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+                         label="&backCmd.label;"
+                         command="Browser:BackOrBackDuplicate"
+                         onclick="checkForMiddleClick(this, event);"
+                         tooltip="back-button-tooltip"
+                         context="backForwardMenu"/>
+          <toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+                         label="&forwardCmd.label;"
+                         command="Browser:ForwardOrForwardDuplicate"
+                         onclick="checkForMiddleClick(this, event);"
+                         tooltip="forward-button-tooltip"
+                         context="backForwardMenu"/>
+        </toolbaritem>
+        <toolbaritem id="stop-reload-button"
+                     removable="true" overflows="false"
+                     class="chromeclass-toolbar-additional">
+          <toolbarbutton id="reload-button"
+                         class="toolbarbutton-1"
+                         command="Browser:ReloadOrDuplicate"
+                         onclick="checkForMiddleClick(this, event);"
+                         tooltip="dynamic-shortcut-tooltip"/>
+          <toolbarbutton id="stop-button"
+                         class="toolbarbutton-1"
+                         command="Browser:Stop"
+                         tooltip="dynamic-shortcut-tooltip"/>
+        </toolbaritem>
+#endif
         <toolbaritem id="urlbar-container" flex="400" persist="width"
                      removable="false"
                      class="chromeclass-location" overflows="false">
+#ifndef MOZ_PHOTON_THEME
           <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                          removable="false" overflows="false"
                          label="&backCmd.label;"
                          command="Browser:BackOrBackDuplicate"
                          onclick="checkForMiddleClick(this, event);"
                          tooltip="back-button-tooltip"
                          context="backForwardMenu"/>
-#ifdef MOZ_PHOTON_THEME
-          <toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-                         removable="false" overflows="false"
-                         label="&forwardCmd.label;"
-                         command="Browser:ForwardOrForwardDuplicate"
-                         onclick="checkForMiddleClick(this, event);"
-                         tooltip="forward-button-tooltip"
-                         context="backForwardMenu"/>
-          <toolbaritem id="stop-reload-button"
-                       removable="false" overflows="false"
-                       class="chromeclass-toolbar-additional">
-            <toolbarbutton id="reload-button"
-                           class="toolbarbutton-1"
-                           command="Browser:ReloadOrDuplicate"
-                           onclick="checkForMiddleClick(this, event);"
-                           tooltip="dynamic-shortcut-tooltip"/>
-            <toolbarbutton id="stop-button"
-                           class="toolbarbutton-1"
-                           command="Browser:Stop"
-                           tooltip="dynamic-shortcut-tooltip"/>
-          </toolbaritem>
 #endif
           <hbox id="urlbar-wrapper" flex="1">
 #ifndef MOZ_PHOTON_THEME
             <toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                            label="&forwardCmd.label;"
                            command="Browser:ForwardOrForwardDuplicate"
                            onclick="checkForMiddleClick(this, event);"
                            tooltip="forward-button-tooltip"
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -238,21 +238,25 @@ var CustomizableUIInternal = {
     gDefaultPanelPlacements = panelPlacements;
     this._updateAreasForPhoton();
 
     let navbarPlacements = [
       "urlbar-container",
       "search-container",
       "bookmarks-menu-button",
       "downloads-button",
-      "home-button",
     ];
 
     if (AppConstants.MOZ_PHOTON_THEME) {
+      navbarPlacements.splice(0, 0, "back-forward-button");
+      navbarPlacements.splice(1, 0, "stop-reload-button");
+      navbarPlacements.splice(2, 0, "home-button");
       navbarPlacements.push("sidebar-button");
+    } else {
+      navbarPlacements.push("home-button");
     }
     if (AppConstants.MOZ_DEV_EDITION) {
       navbarPlacements.splice(2, 0, "developer-button");
     }
 
     // Place this last, when createWidget is called for pocket, it will
     // append to the toolbar.
     if (Services.prefs.getPrefType("extensions.pocket.enabled") != Services.prefs.PREF_INVALID &&