Bug 1599948 - Remove uses of <xul:text> in mail; r=mkmelin
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 28 Nov 2019 14:44:44 +1300
changeset 36750 2277b9c74c7d3f8852521f4c8d48e032b5431893
parent 36749 e370eb044bf92725cc890db47d56b771ba1c09ce
child 36751 a5a20755812560254bda1c712ef36d27c491d529
push id2534
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:52:51 +0000
treeherdercomm-beta@055c50840778 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1599948
Bug 1599948 - Remove uses of <xul:text> in mail; r=mkmelin
mail/base/content/mailWidgets.js
mail/themes/shared/mail/messageHeader.css
--- a/mail/base/content/mailWidgets.js
+++ b/mail/base/content/mailWidgets.js
@@ -129,17 +129,17 @@
     addNewsgroupView(aNewsgroup) {
       this.mNewsgroups.push(aNewsgroup);
     }
 
     buildViews() {
       for (let i = 0; i < this.mNewsgroups.length; i++) {
         const newNode = document.createXULElement("mail-newsgroup");
         if (i > 0) {
-          const textNode = document.createXULElement("text");
+          const textNode = document.createXULElement("label");
           textNode.setAttribute("value", ",");
           textNode.setAttribute("class", "newsgroupSeparator");
           this.appendChild(textNode);
         }
 
         newNode.textContent = this.mNewsgroups[i];
         newNode.setAttribute("newsgroup", this.mNewsgroups[i]);
         this.appendChild(newNode);
@@ -269,17 +269,17 @@
             i + 1,
             this.mMessageIds[i],
             this.mMessageIds.length
           );
         } else {
           let newMessageIdNode = document.createXULElement("mail-messageid");
 
           if (i > 0) {
-            let textNode = document.createXULElement("text");
+            let textNode = document.createXULElement("label");
             textNode.setAttribute("value", ", ");
             textNode.setAttribute("class", "messageIdSeparator");
             this.headerValue.appendChild(textNode);
           }
           let itemInDocument = this.headerValue.appendChild(newMessageIdNode);
           this._updateMessageIdNode(
             itemInDocument,
             i + 1,
@@ -1110,17 +1110,17 @@
     }
 
     /**
      * Append a comma after the (currently) final (email address, we hope!) node of
      * this.emailAddresses.
      */
     appendComma() {
       // Create and append a comma.
-      let commaNode = document.createXULElement("text");
+      let commaNode = document.createXULElement("label");
       commaNode.setAttribute("value", ",");
       commaNode.setAttribute("class", "emailSeparator");
       this.emailAddresses.appendChild(commaNode);
     }
 
     /**
      * Add a (N more) widget which can be clicked to reveal the rest.
      */
--- a/mail/themes/shared/mail/messageHeader.css
+++ b/mail/themes/shared/mail/messageHeader.css
@@ -205,28 +205,34 @@ mail-emailaddress[selected="true"] > .em
   color: HighlightText;
   background-color: Highlight;
   border-bottom-left-radius: 0;
   border-bottom-right-radius: 0;
 }
 
 /* this is for the comma in between email addresses */
 .emailSeparator {
+  margin: 0;
   margin-inline-start: -3px; /* squeeze it inside the bubble, by the star */
 }
 
 /* Because there's no star for newsgroups like there is for email addresses,
  * pushing it back the same number of pixels as emailSeparator causes
  * the comma to be drawn too close to the last letter, which looks bad, so
  * using a separate rule here.
  */
 .newsgroupSeparator {
+  margin: 0;
   margin-inline-start: -2px;
 }
 
+.messageIdSeparator {
+  margin: 0;
+}
+
 .emailStar {
   width: 1em;
   height: 1em;
   margin-inline-start: 2px;
   list-style-image: url("chrome://messenger/skin/icons/star.svg");
   -moz-context-properties: fill;
   fill: currentColor;
 }