Backed out changeset e388e453977c (bug 1313403) for bc4 bustage a=backout
authorWes Kocher <wkocher@mozilla.com>
Mon, 07 Nov 2016 11:53:23 -0800
changeset 351509 df734c2011d14ea2be10ac7efb0cb0f1812f0642
parent 351508 0440791609bd3a6f4b525f8ab754518573de1a3f
child 351510 9f208d6e52c51b0263f8989f09bdcbc9bf9abddc
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1313403
milestone52.0a1
backs oute388e453977c7bf257d87e97ff003c43f44b7c0f
Backed out changeset e388e453977c (bug 1313403) for bc4 bustage a=backout
browser/base/content/utilityOverlay.js
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -343,17 +343,16 @@ function openLinkIn(url, where, params) 
       loadInBackground = false;
     }
   }
 
   // Raise the target window before loading the URI, since loading it may
   // result in a new frontmost window (e.g. "javascript:window.open('');").
   w.focus();
 
-  let browserUsedForLoad = null;
   switch (where) {
   case "current":
     let flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
 
     if (aAllowThirdPartyFixup) {
       flags |= Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
       flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
     }
@@ -379,45 +378,39 @@ function openLinkIn(url, where, params) 
 
     aCurrentBrowser.loadURIWithFlags(url, {
       flags: flags,
       referrerURI: aNoReferrer ? null : aReferrerURI,
       referrerPolicy: aReferrerPolicy,
       postData: aPostData,
       userContextId: aUserContextId
     });
-    browserUsedForLoad = aCurrentBrowser;
     break;
   case "tabshifted":
     loadInBackground = !loadInBackground;
     // fall through
   case "tab":
-    let tabUsedForLoad = w.gBrowser.loadOneTab(url, {
+    w.gBrowser.loadOneTab(url, {
       referrerURI: aReferrerURI,
       referrerPolicy: aReferrerPolicy,
       charset: aCharset,
       postData: aPostData,
       inBackground: loadInBackground,
       allowThirdPartyFixup: aAllowThirdPartyFixup,
       relatedToCurrent: aRelatedToCurrent,
       skipAnimation: aSkipTabAnimation,
       allowMixedContent: aAllowMixedContent,
       noReferrer: aNoReferrer,
       userContextId: aUserContextId,
       originPrincipal: aPrincipal,
     });
-    browserUsedForLoad = tabUsedForLoad.linkedBrowser;
     break;
   }
 
-  // Focus the content, but only if the browser used for the load is selected.
-  if (browserUsedForLoad &&
-      browserUsedForLoad == browserUsedForLoad.ownerGlobal.gBrowser.selectedBrowser) {
-    browserUsedForLoad.focus();
-  }
+  aCurrentBrowser.focus();
 
   if (!loadInBackground && w.isBlankPageURL(url)) {
     w.focusAndSelectUrlBar();
   }
 }
 
 // Used as an onclick handler for UI elements with link-like behavior.
 // e.g. onclick="checkForMiddleClick(this, event);"