Backed out changeset 69a878129f88 (bug 1365637) for failures in browser_ext_sidebarAction_windows.js

MozReview-Commit-ID: JNs7zYG7XVZ
This commit is contained in:
Phil Ringnalda 2017-05-29 14:34:58 -07:00
parent abe687ad09
commit 7d85239f44
3 changed files with 2 additions and 24 deletions

View File

@ -321,8 +321,6 @@
<observes element="viewTabsSidebar" attribute="checked"/>
</toolbarbutton>
<toolbarseparator/>
<vbox id="sidebar-extensions"></vbox>
<toolbarseparator/>
<toolbarbutton id="sidebar-reverse-position"
class="subviewbutton"
oncommand="SidebarUI.reversePosition()"/>

View File

@ -42,7 +42,6 @@ this.sidebarAction = class extends ExtensionAPI {
let widgetId = makeWidgetId(extension.id);
this.id = `${widgetId}-sidebar-action`;
this.menuId = `menu_${this.id}`;
this.buttonId = `button_${this.id}`;
// We default browser_style to true because this is a new API and
// we therefore don't need to worry about breaking existing add-ons.
@ -91,10 +90,6 @@ this.sidebarAction = class extends ExtensionAPI {
if (menu) {
menu.remove();
}
let button = document.getElementById(this.buttonId);
if (button) {
button.remove();
}
let broadcaster = document.getElementById(this.id);
if (broadcaster) {
broadcaster.remove();
@ -157,25 +152,17 @@ this.sidebarAction = class extends ExtensionAPI {
// oncommand gets attached to menuitem, so we use the observes attribute to
// get the command id we pass to SidebarUI.
broadcaster.setAttribute("oncommand", "SidebarUI.show(this.getAttribute('observes'))");
broadcaster.setAttribute("oncommand", "SidebarUI.toggle(this.getAttribute('observes'))");
// Insert a menuitem for View->Show Sidebars.
let menuitem = document.createElementNS(XUL_NS, "menuitem");
menuitem.setAttribute("id", this.menuId);
menuitem.setAttribute("observes", this.id);
menuitem.setAttribute("class", "menuitem-iconic webextension-menuitem");
this.setMenuIcon(menuitem, details);
// Insert a toolbarbutton for the sidebar dropdown selector.
let toolbarbutton = document.createElementNS(XUL_NS, "toolbarbutton");
toolbarbutton.setAttribute("id", this.buttonId);
toolbarbutton.setAttribute("observes", this.id);
toolbarbutton.setAttribute("class", "subviewbutton subviewbutton-iconic webextension-menuitem");
this.setMenuIcon(toolbarbutton, details);
this.setMenuIcon(menuitem, details);
document.getElementById("mainBroadcasterSet").appendChild(broadcaster);
document.getElementById("viewSidebarMenu").appendChild(menuitem);
document.getElementById("sidebar-extensions").appendChild(toolbarbutton);
return menuitem;
}
@ -220,9 +207,6 @@ this.sidebarAction = class extends ExtensionAPI {
this.setMenuIcon(menu, tabData);
let button = document.getElementById(this.buttonId);
this.setMenuIcon(button, tabData);
// Update the sidebar if this extension is the current sidebar.
if (SidebarUI.currentID === this.id) {
SidebarUI.title = title;

View File

@ -89,10 +89,6 @@
min-width: 190px;
}
#sidebar-extensions:empty + toolbarseparator {
display: none;
}
%ifndef XP_MACOSX
/* Allow room for the checkbox drawn as a background image at the start of the toolbarbutton */
#sidebarMenu-popup .subviewbutton-iconic > .toolbarbutton-icon {