Bug 1553778 - Thunderbird adjustments for toolbarbutton de-XBL in bug 1519577. rs=bustage-fix,jorgk
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Thu, 23 May 2019 13:15:09 +0300
changeset 35668 8b1dd67d46b10cdca793bec4617f75435de3964e
parent 35667 42690276c3c0db3b7998943338800dd82933cdc6
child 35669 cec9658e7919fbd898c51009ffe6651b12e4d939
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersbustage-fix, jorgk
bugs1553778, 1519577
Bug 1553778 - Thunderbird adjustments for toolbarbutton de-XBL in bug 1519577. rs=bustage-fix,jorgk
mail/components/extensions/test/browser/browser_ext_composeAction.js
mail/themes/shared/mail/messageHeader.css
--- a/mail/components/extensions/test/browser/browser_ext_composeAction.js
+++ b/mail/components/extensions/test/browser/browser_ext_composeAction.js
@@ -40,37 +40,32 @@ async function test_it(extensionDetails,
   await promiseAnimationFrame(composeWindow);
 
   try {
     let toolbar = composeDocument.getElementById(toolbarId);
     ok(!toolbar.getAttribute("currentset"), "No toolbar current set");
 
     let button = composeDocument.getElementById(buttonId);
     ok(button, "Button created");
-    is(getComputedStyle(button).MozBinding,
-      `url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-badged")`);
     is(toolbar.id, button.parentNode.id, "Button added to toolbar");
     ok(toolbar.currentSet.split(",").includes(buttonId), "Button added to toolbar current set");
 
-    let icon = composeDocument.getAnonymousElementByAttribute(button, "class", "toolbarbutton-icon");
+    let icon = button.querySelector(".toolbarbutton-icon");
     is(getComputedStyle(icon).listStyleImage,
        `url("chrome://messenger/content/extension.svg")`, "Default icon");
-    let label = composeDocument.getAnonymousElementByAttribute(
-      button, "class", "toolbarbutton-text"
-    );
+    let label = button.querySelector(".toolbarbutton-text");
     is(label.value, "This is a test", "Correct label");
 
     EventUtils.synthesizeMouseAtCenter(button, { clickCount: 1 }, composeWindow);
     await extension.awaitFinish("composeAction");
     await promiseAnimationFrame(composeWindow);
 
     is(composeDocument.getElementById(buttonId), button);
-    label = composeDocument.getAnonymousElementByAttribute(
-      button, "class", "toolbarbutton-text"
-    );
+
+    label = button.querySelector(".toolbarbutton-text");
     is(label.value, "New title", "Correct label");
   } finally {
     await extension.unload();
     await promiseAnimationFrame(composeWindow);
     ok(!composeDocument.getElementById(buttonId), "Button destroyed");
     composeWindow.close();
   }
 }
--- a/mail/themes/shared/mail/messageHeader.css
+++ b/mail/themes/shared/mail/messageHeader.css
@@ -14,20 +14,16 @@
   display: none;
 }
 
 .toolbarbutton-1.msgHeaderView-button {
   -moz-box-orient: horizontal;
   fill: currentColor;
 }
 
-.msgHeaderView-button[type="menu"] {
-  -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton");
-}
-
 .msgHeaderView-button[type="menu-button"] > toolbarbutton {
   -moz-box-orient: horizontal;
 }
 
 /* ::::: msg header toolbars ::::: */
 
 #expandedHeaderRows > row,
 #expandedHeader2Rows > row {