Bug 818336 - Don't switch tabs when returning to a webapp. r=mfinkle
authorWes Johnston <wjohnston@mozilla.com>
Thu, 10 Jan 2013 10:18:58 -0800
changeset 118447 0fc37d11f9af51d47d454268f440cdb143c90228
parent 118446 94333351aab3b5aea2f6f21e9f095ca5bac3d122
child 118448 e6c4fd2603f95b7b6a746af9150f26a2444a1d19
push id24166
push userMs2ger@gmail.com
push dateFri, 11 Jan 2013 13:57:41 +0000
treeherdermozilla-central@63c4b0f66a0c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs818336
milestone21.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 818336 - Don't switch tabs when returning to a webapp. r=mfinkle
mobile/android/components/BrowserCLH.js
--- a/mobile/android/components/BrowserCLH.js
+++ b/mobile/android/components/BrowserCLH.js
@@ -78,18 +78,19 @@ BrowserCLH.prototype = {
 
     try {
       let uri = resolveURIInternal(aCmdLine, openURL);
       if (!uri)
         return;
 
       let browserWin = Services.wm.getMostRecentWindow("navigator:browser");
       if (browserWin) {
-        let whereFlags = pinned ? Ci.nsIBrowserDOMWindow.OPEN_SWITCHTAB : Ci.nsIBrowserDOMWindow.OPEN_NEWTAB;
-        browserWin.browserDOMWindow.openURI(uri, null, whereFlags, Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
+        if (!pinned) {
+          browserWin.browserDOMWindow.openURI(uri, null, Ci.nsIBrowserDOMWindow.OPEN_NEWTAB, Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
+        }
       } else {
         let args = {
           url: openURL,
           pinned: pinned,
           width: width,
           height: height
         };