Bug 1364333 - remove leftover code and strings from standalone about:addons UI r=rhelmer
authorsajattack <sajattack@gmail.com>
Thu, 14 Sep 2017 13:44:36 -0700
changeset 383422 f0d6d70e39ae3893893a56ff6ee9aeef03db9e51
parent 383421 f4b5a83e20e92dd32fc5b151d7f61c96ff6ba51f
child 383423 8d4f4b54141ac107d52688bf2b4392e860ab554d
push id32594
push userkwierso@gmail.com
push dateThu, 28 Sep 2017 22:49:33 +0000
treeherdermozilla-central@6dea0ee45b66 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhelmer
bugs1364333
milestone58.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 1364333 - remove leftover code and strings from standalone about:addons UI r=rhelmer MozReview-Commit-ID: SmDGrX0fz5
toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/extensions.xul
toolkit/mozapps/extensions/test/browser/browser_bug562797.js
toolkit/themes/shared/extensions/extensions.inc.css
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
+++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
@@ -18,18 +18,16 @@
 <!ENTITY listEmpty.button.label               "Learn more about add-ons">
 <!ENTITY installAddonFromFile.label           "Install Add-on From Fileā€¦">
 <!ENTITY installAddonFromFile.accesskey       "I">
 <!ENTITY toolsMenu.tooltip                    "Tools for all add-ons">
 
 <!ENTITY getThemes.description                "Looking to personalize your browser?">
 <!ENTITY getThemes.learnMore                  "Choose from thousands of themes.">
 
-<!ENTITY cmd.back.tooltip                     "Go back one page">
-<!ENTITY cmd.forward.tooltip                  "Go forward one page">
 
 <!ENTITY showUnsignedExtensions.button.label  "Some extensions could not be verified">
 <!ENTITY showAllExtensions.button.label       "Show all extensions">
 <!ENTITY debugAddons.label                    "Debug Add-ons">
 <!ENTITY debugAddons.accesskey                "B">
 
 <!-- global warnings -->
 <!ENTITY warning.safemode.label                    "All add-ons have been disabled by safe mode.">
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -2078,29 +2078,16 @@ var gHeader = {
 
     this._search.addEventListener("command", function(aEvent) {
       var query = aEvent.target.value;
       if (query.length == 0)
         return;
 
       gViewController.loadView("addons://search/" + encodeURIComponent(query));
     });
-
-    function updateNavButtonVisibility() {
-      var shouldShow = gHeader.shouldShowNavButtons;
-      document.getElementById("back-btn").hidden = !shouldShow;
-      document.getElementById("forward-btn").hidden = !shouldShow;
-    }
-
-    window.addEventListener("focus", function(aEvent) {
-      if (aEvent.target == window)
-        updateNavButtonVisibility();
-    });
-
-    updateNavButtonVisibility();
   },
 
   focusSearchBox() {
     this._search.focus();
   },
 
   onKeyPress(aEvent) {
     if (String.fromCharCode(aEvent.charCode) == "/") {
--- a/toolkit/mozapps/extensions/content/extensions.xul
+++ b/toolkit/mozapps/extensions/content/extensions.xul
@@ -127,32 +127,16 @@
   </commandset>
 
   <keyset>
     <key id="focusSearch" key="&search.commandkey;" modifiers="accel"
          command="cmd_focusSearch"/>
   </keyset>
   <hbox flex="1">
     <vbox>
-      <hbox id="nav-header"
-            align="center"
-            pack="center">
-        <toolbarbutton id="back-btn"
-                       class="nav-button header-button"
-                       command="cmd_back"
-                       tooltiptext="&cmd.back.tooltip;"
-                       hidden="true"
-                       disabled="true"/>
-        <toolbarbutton id="forward-btn"
-                       class="nav-button header-button"
-                       command="cmd_forward"
-                       tooltiptext="&cmd.forward.tooltip;"
-                       hidden="true"
-                       disabled="true"/>
-      </hbox>
       <!-- category list -->
       <richlistbox id="categories" flex="1">
         <richlistitem id="category-search" value="addons://search/"
                       class="category"
                       name="&view.search.label;" priority="0"
                       tooltiptext="&view.search.label;" disabled="true"/>
         <richlistitem id="category-discover" value="addons://discover/"
                       class="category"
--- a/toolkit/mozapps/extensions/test/browser/browser_bug562797.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug562797.js
@@ -800,48 +800,16 @@ add_test(function() {
         });
 
         go_back();
       });
     });
   });
 });
 
-// Tests that when displaying in-content and opened in the background the back
-// and forward buttons still appear when switching tabs
-add_test(function() {
-
-  var tab = BrowserTestUtils.addTab(gBrowser, "about:addons");
-  var browser = gBrowser.getBrowserForTab(tab);
-
-  browser.addEventListener("pageshow", function listener(event) {
-    if (event.target.location.href != "about:addons")
-      return;
-    browser.removeEventListener("pageshow", listener, true);
-
-    wait_for_manager_load(browser.contentWindow.wrappedJSObject, function() {
-      wait_for_view_load(browser.contentWindow.wrappedJSObject, function(aManager) {
-        gBrowser.selectedTab = tab;
-
-        var doc = aManager.document;
-        var btn = document.getElementById("back-button");
-        if (!btn || is_hidden(btn)) {
-          is_element_visible(doc.getElementById("back-btn"), "Back button should not be hidden");
-          is_element_visible(doc.getElementById("forward-btn"), "Forward button should not be hidden");
-        } else {
-          is_element_hidden(doc.getElementById("back-btn"), "Back button should be hidden");
-          is_element_hidden(doc.getElementById("forward-btn"), "Forward button should be hidden");
-        }
-
-        close_manager(aManager, run_next_test);
-      });
-    });
-  }, true);
-});
-
 // Tests that refreshing the disicovery pane integrates properly with history
 add_test(function() {
   open_manager("addons://list/plugin", function(aManager) {
     is_in_list(aManager, "addons://list/plugin", false, false);
 
     EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("category-discover"), { }, aManager);
 
     wait_for_view_load(aManager, function(aManager) {
--- a/toolkit/themes/shared/extensions/extensions.inc.css
+++ b/toolkit/themes/shared/extensions/extensions.inc.css
@@ -293,22 +293,16 @@ button.warning {
   list-style-image: url(chrome://mozapps/skin/extensions/navigation.svg);
   margin-top: 15px;
   margin-bottom: 15px;
   border-color: transparent;
   -moz-context-properties: fill;
   fill: currentColor;
 }
 
-#back-btn:-moz-locale-dir(rtl),
-#forward-btn:-moz-locale-dir(ltr) {
-  transform: scaleX(-1);
-}
-
-
 /*** sorters ***/
 
 .sort-controls {
   -moz-appearance: none;
 }
 
 .sorter {
   height: 35px;