Backed out changeset 63284a27cb1b
authorDão Gottwald <dao@mozilla.com>
Thu, 19 May 2011 11:53:27 +0200
changeset 69688 ca90959324c7e8e706d530c4e4320ee9f71bc6e0
parent 69683 63284a27cb1b57ea8bde163cb78fb42a21debedf
child 69689 4fd08a1e0644afe1ec180b4730e3d81ff4423044
push idunknown
push userunknown
push dateunknown
milestone6.0a1
backs out63284a27cb1b57ea8bde163cb78fb42a21debedf
Backed out changeset 63284a27cb1b
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -146,16 +146,19 @@
       </field>
       <field name="arrowKeysShouldWrap" readonly="true">
 #ifdef XP_MACOSX
         true
 #else
         false
 #endif
       </field>
+      <field name="mAddProgressListenerWasCalled">
+        false
+      </field>
       <field name="_browsers">
         null
       </field>
 
       <field name="_autoScrollPopup">
         null
       </field>
 
@@ -1845,16 +1848,21 @@
           <![CDATA[
             if (arguments.length != 1) {
               Components.utils.reportError("gBrowser.addProgressListener was " +
                                            "called with a second argument, " +
                                            "which is not supported. See bug " +
                                            "608628.");
             }
 
+            if (!this.mAddProgressListenerWasCalled) {
+              this.mAddProgressListenerWasCalled = true;
+              this.tabContainer.updateVisibility();
+            }
+
             this.mProgressListeners.push(aListener);
           ]]>
         </body>
       </method>
 
       <method name="removeProgressListener">
         <parameter name="aListener"/>
         <body>
@@ -2683,17 +2691,16 @@
           tab.setAttribute("crop", "end");
           tab.setAttribute("validate", "never");
           tab.setAttribute("onerror", "this.removeAttribute('image');");
           this.adjustTabstrip();
 
           Services.prefs.addObserver("browser.tabs.", this._prefObserver, false);
           window.addEventListener("resize", this, false);
 
-          this.updateVisibility();
           if (window.TabsInTitlebar)
             TabsInTitlebar.allowedBy("tabs-visible", this.visible);
         ]]>
       </constructor>
 
       <destructor>
         <![CDATA[
           Services.prefs.removeObserver("browser.tabs.", this._prefObserver);