Bug 1521046 - Remove padding for browser/composeAction panels. r=darktrojan
authorPhilipp Kewisch <mozilla@kewis.ch>
Fri, 18 Jan 2019 12:35:11 +0100
changeset 34251 751f07fd6874551f47f0bf65ea96b95cccef5498
parent 34250 ba263124fbff63f1e7808c6780658d8bc2b195b8
child 34252 46da56762ba591510abeccfc6c8dd59c7e4fdcc7
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
reviewersdarktrojan
bugs1521046
Bug 1521046 - Remove padding for browser/composeAction panels. r=darktrojan
mail/components/extensions/ExtensionPopups.jsm
mail/themes/shared/mail/messenger.css
--- a/mail/components/extensions/ExtensionPopups.jsm
+++ b/mail/components/extensions/ExtensionPopups.jsm
@@ -4,22 +4,27 @@
 
 /* This file is a much-modified copy of browser/components/extensions/ExtensionPopups.jsm. */
 
 var EXPORTED_SYMBOLS = ["BasePopup", "ViewPopup"];
 
 ChromeUtils.defineModuleGetter(this, "ExtensionParent",
                                "resource://gre/modules/ExtensionParent.jsm");
 ChromeUtils.import("resource://gre/modules/ExtensionUtils.jsm");
+ChromeUtils.import("resource://gre/modules/ExtensionCommon.jsm");
 
 const {
   DefaultWeakMap,
   promiseEvent,
 } = ExtensionUtils;
 
+const {
+  makeWidgetId
+} = ExtensionCommon
+
 class BasePopup {
   constructor(extension, viewNode, popupURL, browserStyle, fixedWidth = false, blockParser = false) {
     this.extension = extension;
     this.popupURL = popupURL;
     this.viewNode = viewNode;
     this.browserStyle = browserStyle;
     this.window = viewNode.ownerGlobal;
     this.destroyed = false;
@@ -283,17 +288,20 @@ class BasePopup {
   }
 }
 
 class ViewPopup extends BasePopup {
   constructor(extension, window, popupURL, browserStyle, fixedWidth, blockParser) {
     let document = window.document;
 
     let panel = document.createXULElement("panel");
+    panel.setAttribute("id", makeWidgetId(extension.id) + "-panel");
+    panel.setAttribute("class", "mail-extension-panel");
     panel.setAttribute("type", "arrow");
+    panel.setAttribute("role", "group");
     document.getElementById("mainPopupSet").appendChild(panel);
 
     super(extension, panel, popupURL, browserStyle, fixedWidth, blockParser);
 
     this.ignoreResizes = true;
 
     this.shown = false;
     this.tempPanel = panel;
--- a/mail/themes/shared/mail/messenger.css
+++ b/mail/themes/shared/mail/messenger.css
@@ -292,16 +292,27 @@ statusbarpanel,
   color: GrayText;
 }
 
 toolbarpaletteitem toolbarspacer,
 toolbarpaletteitem toolbarspring {
   -moz-window-dragging: no-drag;
 }
 
+/* ::::: MailExtension panels ::::: */
+
+.mail-extension-panel {
+  font: menu;
+}
+
+.mail-extension-panel > .panel-arrowcontainer > .panel-arrowcontent {
+  padding: 0;
+  overflow: hidden;
+}
+
 /* :::: autocomplete labels :::: */
 
 html|span.ac-emphasize-text {
   font-weight: bold;
 }
 
 .autocomplete-richlistitem:not([ac-comment=""]) > .ac-url,
 .autocomplete-richlistitem:not([ac-comment=""]) > .ac-separator {