Bug 1314125 - Make PopupNotifications use tabbrowser's selectedBrowser instead of docShellIsActive to determine the currently selected tab. r=mikedeboer
☠☠ backed out by 53b4f35c5830 ☠ ☠
authorMike Conley <mconley@mozilla.com>
Mon, 31 Oct 2016 17:02:33 -0400
changeset 347113 bd45588af02e58ab94344d352e8bd09d4125d06b
parent 347112 e69eab662c295804c8c27e1183bced3db5421efc
child 347114 9bfbc8480d437b2fe843ee50f2e22b7b73545cc5
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs1314125
milestone52.0a1
Bug 1314125 - Make PopupNotifications use tabbrowser's selectedBrowser instead of docShellIsActive to determine the currently selected tab. r=mikedeboer MozReview-Commit-ID: D9ahuth6eLC
toolkit/modules/PopupNotifications.jsm
--- a/toolkit/modules/PopupNotifications.jsm
+++ b/toolkit/modules/PopupNotifications.jsm
@@ -1049,21 +1049,17 @@ PopupNotifications.prototype = {
         anchors.add(notification.anchorElement)
     }
     if (defaultAnchor && !anchors.size)
       anchors.add(defaultAnchor);
     return anchors;
   },
 
   _isActiveBrowser: function (browser) {
-    // Note: This helper only exists, because in e10s builds,
-    // we can't access the docShell of a browser from chrome.
-    return browser.docShell
-      ? browser.docShell.isActive
-      : (this.window.gBrowser.selectedBrowser == browser);
+    return this.tabbrowser.selectedBrowser == browser;
   },
 
   _onIconBoxCommand: function PopupNotifications_onIconBoxCommand(event) {
     // Left click, space or enter only
     let type = event.type;
     if (type == "click" && event.button != 0)
       return;