Bug 1405377 - Remove trailing separator in recently closed tabs/windows subviews. r=mikedeboer, a=ritu
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 03 Oct 2017 19:29:36 +0100
changeset 432194 3d3e597d3b96eca3163c70ff0d2a263e2d7e9cf5
parent 432193 ecf9a5a692354b23e9d5d5fa1e607b8bbac207ed
child 432195 741fe314f3653716f032294b3fd0e02acedfe7ff
push id7897
push userryanvm@gmail.com
push dateThu, 05 Oct 2017 01:01:20 +0000
treeherdermozilla-beta@3d3e597d3b96 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer, ritu
bugs1405377
milestone57.0
Bug 1405377 - Remove trailing separator in recently closed tabs/windows subviews. r=mikedeboer, a=ritu The third param of 'getTabsFragment' and 'getWindowsFragment' toggles whether the 'restore all' item gets prefixed (true) or suffixed (false). The prefixed version doesn't get a separator, so this seems like the simplest fix. MozReview-Commit-ID: BzKWvndWUMp
browser/components/customizableui/CustomizableWidgets.jsm
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -210,17 +210,17 @@ const CustomizableWidgets = [
       let document = event.target.ownerDocument;
       let window = document.defaultView;
       let viewType = panelview.id == this.recentlyClosedTabsPanel ? "Tabs" : "Windows";
 
       this._panelMenuView.clearAllContents(panelview);
 
       let utils = RecentlyClosedTabsAndWindowsMenuUtils;
       let method = `get${viewType}Fragment`;
-      let fragment = utils[method](window, "toolbarbutton");
+      let fragment = utils[method](window, "toolbarbutton", true);
       let elementCount = fragment.childElementCount;
       this._panelMenuView._setEmptyPopupStatus(panelview, !elementCount);
       if (!elementCount)
         return;
 
       let body = document.createElement("vbox");
       body.className = "panel-subview-body";
       body.appendChild(fragment);