Bug 564100 No way to tell if a non-current tab has been read: [selected=false] is not possible anymore r=Neil a=Callek for comm-aurora/comm-beta.
authorTony Mechelynck <antoine.mechelynck@gmail.com>
Fri, 16 Sep 2011 16:23:36 +0800
changeset 8462 1c74bb2ef964982a80103d9ab5b03ce0e96bedb2
parent 8461 2aed8aff80c98c64401c54525062c7b604875e57
child 8463 5b983ed2ca5a8568d339f2916efa3b66fdcd9bfd
push id132
push userphilip.chee@gmail.com
push dateFri, 16 Sep 2011 08:37:43 +0000
treeherdercomm-beta@5b983ed2ca5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil, Callek
bugs564100
Bug 564100 No way to tell if a non-current tab has been read: [selected=false] is not possible anymore r=Neil a=Callek for comm-aurora/comm-beta.
suite/browser/tabbrowser.xml
--- a/suite/browser/tabbrowser.xml
+++ b/suite/browser/tabbrowser.xml
@@ -504,16 +504,18 @@
                     this.mBrowser.userTypedClear -= 2;
                   else if (this.mBrowser.userTypedClear > 0)
                     this.mBrowser.userTypedClear--;
 
                 if (this.mBlank)
                   this.mBlank = false;
 
                 this.mTab.removeAttribute("busy");
+                if (!this.mTab.selected)
+                  this.mTab.setAttribute("unread", "true");
 
                 var location = this.mBrowser.currentURI;
                 if (this.mBrowser.mIconURL) {
                   this.mTab.setAttribute("image", this.mBrowser.mIconURL);
                 }
                 else if (this.mBrowser.contentDocument instanceof ImageDocument &&
                          this.mTabBrowser.mPrefs.getBoolPref("browser.chrome.site_icons")) {
                   var req = this.mBrowser.contentDocument.imageRequest;
@@ -1045,16 +1047,17 @@
               this.mCurrentBrowser.setAttribute("type", "content-targetable");
               this.mCurrentBrowser.docShell.isActive = false;
             }
 
             newBrowser.setAttribute("type", "content-primary");
             newBrowser.docShell.isActive = true;
             this.mCurrentBrowser = newBrowser;
             this.mCurrentTab = this.selectedTab;
+            this.mCurrentTab.removeAttribute("unread");
             var tabListener = this.mTabListeners[this.tabContainer.selectedIndex];
 
             // Update the URL bar.
             this.updateUrlBar(newBrowser.webProgress,
                               null,
                               newBrowser.currentURI,
                               newBrowser.securityUI,
                               newBrowser,