Bug 638369 - Update title when creating a new tab [r=wesj]
authorMatt Brubeck <mbrubeck@mozilla.com>
Mon, 07 Mar 2011 17:21:41 -0800
changeset 77223 40eedacb461c4c4261ea7f7b4b20fd9d1375a2f8
parent 77222 f3f755ec65868764f290f486d2216cfc26bac361
child 77224 9f11fc87eaa69990a8230420035e85dd737b44bc
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs638369
milestone9.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 638369 - Update title when creating a new tab [r=wesj]
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -835,17 +835,20 @@ var Browser = {
       BrowserUI.lockToolbar();
 
     if (lastTab)
       lastTab.active = false;
 
     if (tab)
       tab.active = true;
 
-    if (!isFirstTab) {
+    if (isFirstTab) {
+      // Don't waste time at startup updating the whole UI; just display the URL.
+      BrowserUI._titleChanged(browser);
+    } else {
       // Update all of our UI to reflect the new tab's location
       BrowserUI.updateURI();
       getIdentityHandler().checkIdentity();
 
       let event = document.createEvent("Events");
       event.initEvent("TabSelect", true, false);
       event.lastTab = lastTab;
       tab.chromeTab.dispatchEvent(event);