Bug 512721: when opening a new tab, the awesome bar should not be visible if the uri != about:blank [r=mark.finkle]
authorVivien Nicolas <21@vingtetun.org>
Wed, 26 Aug 2009 13:24:27 -0400
changeset 65480 57a27959268bc1673d2a02f482f6e4eb83b18f88
parent 65479 c9d365a682a4412ccf487499993c34278dbb80b6
child 65481 02e02c000c0f8c0d38994ee43af516d98edc7246
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmark
bugs512721
Bug 512721: when opening a new tab, the awesome bar should not be visible if the uri != about:blank [r=mark.finkle]
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -551,18 +551,21 @@ var BrowserUI = {
     // XXX Fix me with a real UI
   },
 
   showBookmarks : function () {
     BookmarkList.show();
   },
 
   newTab : function newTab(aURI) {
-    let tab = Browser.addTab(aURI || "about:blank", true);
-    this.showAutoComplete();
+    aURI = aURI || "about:blank";
+    let tab = Browser.addTab(aURI, true);
+
+    if (aURI == "about:blank")
+      this.showAutoComplete();
     return tab;
   },
 
   closeTab : function closeTab(aTab) {
     // If no tab is passed in, assume the current tab
     Browser.closeTab(aTab || Browser.selectedTab);
   },
 
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -1445,17 +1445,17 @@ nsBrowserAccess.prototype = {
     var newWindow;
     if (aWhere == Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW) {
       var url = aURI ? aURI.spec : "about:blank";
       newWindow = openDialog("chrome://browser/content/browser.xul", "_blank",
                              "all,dialog=no", url, null, null, null);
     }
     else {
       if (aWhere == Ci.nsIBrowserDOMWindow.OPEN_NEWTAB)
-        newWindow = BrowserUI.newTab().browser.contentWindow;
+        newWindow = Browser.addTab("about:blank", true).browser.contentWindow;
       else
         newWindow = aOpener ? aOpener.top : browser.contentWindow;
     }
 
     try {
       var referrer;
       if (aURI) {
         if (aOpener) {