Bug 1594123 - Fix lookup of toolbarbutton-icon in TabsList r=mconley
authorBrian Grinstead <bgrinstead@mozilla.com>
Tue, 05 Nov 2019 18:22:38 +0000
changeset 500645 7271753097f953121de6e4a7881abf1111c3794d
parent 500644 baf4f9cc8ff3342f3a671b2791c64a8886a0b33c
child 500646 e31f18a526623e868887ec8bd285d3706a32e129
push id36768
push usershindli@mozilla.com
push dateTue, 05 Nov 2019 22:07:34 +0000
treeherdermozilla-central@e96c1ca93d25 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1594123
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1594123 - Fix lookup of toolbarbutton-icon in TabsList r=mconley document.getAnonymousElementByAttribute is dead code now, and even when it wasn't this would have returned null ever since <toolbarbutton> stopped using XBL. Differential Revision: https://phabricator.services.mozilla.com/D51727
browser/modules/TabsList.jsm
--- a/browser/modules/TabsList.jsm
+++ b/browser/modules/TabsList.jsm
@@ -274,27 +274,17 @@ class TabsPanel extends TabsListBase {
       soundplaying: tab.soundPlaying,
       pictureinpicture: tab.pictureinpicture,
       hidden: !(tab.muted || tab.soundPlaying),
     });
   }
 
   _setImageAttributes(row, tab) {
     let button = row.firstElementChild;
-    let image =
-      this.doc.getAnonymousElementByAttribute(
-        button,
-        "class",
-        "toolbarbutton-icon"
-      ) ||
-      this.doc.getAnonymousElementByAttribute(
-        button,
-        "class",
-        "toolbarbutton-icon tab-throbber-tabslist"
-      );
+    let image = button.icon;
 
     if (image) {
       let busy = tab.getAttribute("busy");
       let progress = tab.getAttribute("progress");
       setAttributes(image, { busy, progress });
       if (busy) {
         image.classList.add("tab-throbber-tabslist");
       } else {