Bug 1381321: Support <select> dropdowns in OOP options browsers. r?aswan
MozReview-Commit-ID: 1hYgY7s0a6V
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -1010,16 +1010,17 @@ menulist {
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist");
}
menulist[popuponly="true"] {
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist-popuponly");
-moz-appearance: none !important;
margin: 0 !important;
height: 0 !important;
+ min-height: 0 !important;
border: 0 !important;
}
menulist[editable="true"] {
-moz-binding: url("chrome://global/content/bindings/menulist.xml#menulist-editable");
}
menulist[type="description"] {
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -3709,16 +3709,17 @@ var gDetailView = {
async createOptionsBrowser(parentNode) {
let browser = document.createElement("browser");
browser.setAttribute("type", "content");
browser.setAttribute("disableglobalhistory", "true");
browser.setAttribute("id", "addon-options");
browser.setAttribute("class", "inline-options-browser");
browser.setAttribute("forcemessagemanager", "true");
+ browser.setAttribute("selectmenulist", "ContentSelectDropdown");
let {optionsURL} = this._addon;
let remote = !E10SUtils.canLoadURIInProcess(optionsURL, Services.appinfo.PROCESS_TYPE_DEFAULT);
let readyPromise;
if (remote) {
browser.setAttribute("remote", "true");
browser.setAttribute("remoteType", E10SUtils.EXTENSION_REMOTE_TYPE);
--- a/toolkit/mozapps/extensions/content/extensions.xul
+++ b/toolkit/mozapps/extensions/content/extensions.xul
@@ -64,16 +64,26 @@
<menuitem id="menuitem_findUpdates" command="cmd_findItemUpdates"
label="&cmd.findUpdates.label;"
accesskey="&cmd.findUpdates.accesskey;"/>
<menuitem id="menuitem_about" command="cmd_showItemAbout"
label="&cmd.about.label;"
accesskey="&cmd.about.accesskey;"/>
</menupopup>
+ <menulist popuponly="true" id="ContentSelectDropdown" hidden="true">
+ <menupopup rolluponmousewheel="true"
+ activateontab="true" position="after_start"
+ level="parent"
+#ifdef XP_WIN
+ consumeoutsideclicks="false" ignorekeys="shortcuts"
+#endif
+ />
+ </menulist>
+
<tooltip id="addonitem-tooltip"/>
</popupset>
<!-- global commands - these act on all addons, or affect the addons manager
in some other way -->
<commandset id="globalCommandSet">
<!-- XXXsw remove useless oncommand attribute once bug 371900 is fixed -->
<command id="cmd_focusSearch" oncommand=";"/>