Bug 687754 - Only set unread when busy is removed and don't remove it in preview mode. r=dao
☠☠ backed out by fa501d6681d2 ☠ ☠
authorLen <lenniger@yahoo.com>
Tue, 27 Sep 2011 17:03:57 +0200
changeset 77703 0eacb6c66396439d5e9e90091fdb611f93d8d41f
parent 77702 ade33e515f463c035348616d8637078cb67b7fc7
child 77704 115e3576acf55e111b9f39bcfb1c048d9f9e613f
child 77707 fa501d6681d2eed8c29019789646042984531b44
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersdao
bugs687754
milestone9.0a1
Bug 687754 - Only set unread when busy is removed and don't remove it in preview mode. r=dao
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -561,20 +561,20 @@
                 }
 
                 if (this.mBlank)
                   this.mBlank = false;
 
                 if (this.mTab.hasAttribute("busy")) {
                   this.mTab.removeAttribute("busy");
                   this.mTabBrowser._tabAttrModified(this.mTab);
+                  if (!this.mTab.selected) {
+                    this.mTab.setAttribute("unread", "true");
                 }
                 this.mTab.removeAttribute("progress");
-                if (!this.mTab.selected)
-                  this.mTab.setAttribute("unread", "true");
 
                 var location = aRequest.QueryInterface(nsIChannel).URI;
 
                 // For keyword URIs clear the user typed value since they will be changed into real URIs
                 if (location.scheme == "keyword")
                   this.mBrowser.userTypedValue = null;
 
                 if (this.mTab.label == this.mTabBrowser.mStringBundle.getString("tabs.connecting"))
@@ -871,17 +871,18 @@
                 (!oldBrowser.pageReport && newBrowser.pageReport))
               updatePageReport = true;
 
             newBrowser.setAttribute("type", "content-primary");
             newBrowser.docShellIsActive =
               (window.windowState != window.STATE_MINIMIZED);
             this.mCurrentBrowser = newBrowser;
             this.mCurrentTab = this.selectedTab;
-            this.mCurrentTab.removeAttribute("unread");
+            if (!this._previewMode)
+              this.mCurrentTab.removeAttribute("unread");
             this.showTab(this.mCurrentTab);
 
             if (updatePageReport)
               this.mCurrentBrowser.updatePageReport();
 
             // Update the URL bar.
             var loc = this.mCurrentBrowser.currentURI;