Bug 523736: modify sidebar behavior [r=mark.finkle]
authorVivien Nicolas <21@vingtetun.org>
Wed, 28 Oct 2009 23:55:47 -0400
changeset 65734 b159882080d6563e81a0502f213860962c67f29f
parent 65733 cd2893f5dd46c0d021338658ca2b8735ab91418c
child 65735 9aaa71c871a838c5b40ae25f0b1ec353958c3102
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
bugs523736
Bug 523736: modify sidebar behavior [r=mark.finkle]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -463,16 +463,19 @@ var BrowserUI = {
     this._setURI(urlString);
   },
 
   goToURI : function(aURI) {
     aURI = aURI || this._edit.value;
     if (!aURI)
       return;
 
+    // Give the new page lots of room
+    Browser.hideSidebars();
+
     this._edit.popup.close();
     this._edit.value = aURI;
 
     var flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
     getBrowser().loadURIWithFlags(aURI, flags, null, null);
 
     gHistSvc.markPageAsTyped(gURIFixup.createFixupURI(aURI, 0));
   },
@@ -494,16 +497,19 @@ var BrowserUI = {
   },
 
   doButtonSearch : function(button) {
     if (!("engine" in button) || !button.engine)
       return;
 
     // We don't want the button to look pressed for now
     button.parentNode.selectedItem = null;
+
+    // Give the new page lots of room
+    Browser.hideSidebars();
     
     this._edit.popup.closePopup();
 
     var submission = button.engine.getSubmission(this._edit.value, null);
     getBrowser().loadURI(submission.uri.spec, null, submission.postData, false);
   },
 
   updateStar : function() {
@@ -518,16 +524,21 @@ var BrowserUI = {
     let tab = Browser.addTab(aURI, true);
 
     this.hidePanel();
     
     if (aURI == "about:blank") {
       this.showToolbar(true);
       this.showAutoComplete();
     }
+    else {
+      // Give the new page lots of room
+      Browser.hideSidebars();
+    }
+
     return tab;
   },
 
   closeTab : function closeTab(aTab) {
     // If no tab is passed in, assume the current tab
     Browser.closeTab(aTab || Browser.selectedTab);
   },