Bug 608268 - URL bar horizontal scrolling is broken after sharing a page through twitter [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Thu, 09 Dec 2010 11:07:14 -0500
changeset 67096 7fcfa6ea4b1294e5e84d3fab39d7bc9ce6efe0d1
parent 67095 50c8b87db361c6740e9cd1c73ea7cd2861f01446
child 67097 924f2735f961a0f8083c48fc398510ad361ea3df
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)
reviewersmfinkle
bugs608268
Bug 608268 - URL bar horizontal scrolling is broken after sharing a page through twitter [r=mfinkle]
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
@@ -2797,32 +2797,32 @@ var SharingUI = {
                              .getService(Ci.nsIExternalProtocolService);
         extProtocolSvc.loadUrl(uri);
       }
     },
     {
       name: "Twitter",
       callback: function callback(aURL, aTitle) {
         let url = "http://twitter.com/home?status=" + encodeURIComponent((aTitle ? aTitle+": " : "")+aURL);
-        Browser.addTab(url, true, Browser.selectedTab);
+        BrowserUI.newTab(url, Browser.selectedTab);
       }
     },
     {
       name: "Google Reader",
       callback: function callback(aURL, aTitle) {
         let url = "http://www.google.com/reader/link?url=" + encodeURIComponent(aURL) +
                   "&title=" + encodeURIComponent(aTitle);
-        Browser.addTab(url, true, Browser.selectedTab);
+        BrowserUI.addTab(url, Browser.selectedTab);
       }
     },
     {
       name: "Facebook",
       callback: function callback(aURL, aTitle) {
         let url = "http://www.facebook.com/share.php?u=" + encodeURIComponent(aURL);
-        Browser.addTab(url, true, Browser.selectedTab);
+        BrowserUI.newTab(url, Browser.selectedTab);
       }
     }
   ]
 };
 
 var BadgeHandlers = {
   _handlers: [
     {
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -503,16 +503,17 @@ var Browser = {
 
     this.contentScrollboxScroller.scrollTo(x.value, Number.MAX_VALUE);
     this.pageScrollboxScroller.scrollTo(0, Number.MAX_VALUE);
   },
 
   hideSidebars: function scrollSidebarsOffscreen() {
     let rect = Elements.browsers.getBoundingClientRect();
     this.controlsScrollboxScroller.scrollBy(Math.round(rect.left), 0);
+    this.tryUnfloatToolbar();
   },
 
   hideTitlebar: function hideTitlebar() {
     let rect = Elements.browsers.getBoundingClientRect();
     this.pageScrollboxScroller.scrollBy(0, Math.round(rect.top));
     this.tryUnfloatToolbar();
   },