Back out 298c695564e9 (bug 1044351) for timeouts in browser_library_middleclick.js and friends
authorPhil Ringnalda <philringnalda@gmail.com>
Thu, 11 Jun 2015 21:47:53 -0700
changeset 279332 c1afb1408755ad1794c5055a595eed8dce9e73ef
parent 279331 91a848ffec69d05d58635cb2f3a555dd8218771d
child 279333 be976c7cb4b1ff8d4f26c0f33d780950ec491f3b
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1044351
milestone41.0a1
backs out298c695564e9821a31f8e9e2cafc366580863b90
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
Back out 298c695564e9 (bug 1044351) for timeouts in browser_library_middleclick.js and friends CLOSED TREE
browser/base/content/urlbarBindings.xml
browser/base/content/utilityOverlay.js
browser/components/places/PlacesUIUtils.jsm
browser/components/places/tests/browser/browser.ini
browser/components/places/tests/browser/browser_bookmarklet_windowOpen.js
browser/components/places/tests/browser/pageopeningwindow.html
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -346,18 +346,17 @@ file, You can obtain one at http://mozil
               Cu.reportError(ex);
             }
 
             let loadCurrent = () => {
               openUILinkIn(url, "current", {
                 allowThirdPartyFixup: true,
                 disallowInheritPrincipal: !mayInheritPrincipal,
                 allowPinnedTabHostChange: true,
-                postData: postData,
-                allowPopups: url.startsWith("javascript:"),
+                postData: postData
               });
               // Ensure the start of the URL is visible for UX reasons:
               this.selectionStart = this.selectionEnd = 0;
             };
 
             // Focus the content area before triggering loads, since if the load
             // occurs in a new tab, we want focus to be restored to the content
             // area when the current tab is re-selected.
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -183,17 +183,16 @@ function whereToOpenLink( e, ignoreButto
  * Instead of aAllowThirdPartyFixup, you may also pass an object with any of
  * these properties:
  *   allowThirdPartyFixup (boolean)
  *   postData             (nsIInputStream)
  *   referrerURI          (nsIURI)
  *   relatedToCurrent     (boolean)
  *   skipTabAnimation     (boolean)
  *   allowPinnedTabHostChange (boolean)
- *   allowPopups          (boolean)
  */
 function openUILinkIn(url, where, aAllowThirdPartyFixup, aPostData, aReferrerURI) {
   var params;
 
   if (arguments.length == 3 && typeof arguments[2] == "object") {
     params = aAllowThirdPartyFixup;
   } else {
     params = {
@@ -226,17 +225,16 @@ function openLinkIn(url, where, params) 
   var aAllowMixedContent    = params.allowMixedContent;
   var aInBackground         = params.inBackground;
   var aDisallowInheritPrincipal = params.disallowInheritPrincipal;
   var aInitiatingDoc        = params.initiatingDoc;
   var aIsPrivate            = params.private;
   var aSkipTabAnimation     = params.skipTabAnimation;
   var aAllowPinnedTabHostChange = !!params.allowPinnedTabHostChange;
   var aNoReferrer           = params.noReferrer;
-  var aAllowPopups          = !!params.allowPopups;
 
   if (where == "save") {
     if (!aInitiatingDoc) {
       Components.utils.reportError("openUILink/openLinkIn was called with " +
         "where == 'save' but without initiatingDoc.  See bug 814264.");
       return;
     }
     // TODO(1073187): propagate referrerPolicy.
@@ -339,23 +337,18 @@ function openLinkIn(url, where, params) 
       flags |= Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
       flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
     }
 
     // LOAD_FLAGS_DISALLOW_INHERIT_OWNER isn't supported for javascript URIs,
     // i.e. it causes them not to load at all. Callers should strip
     // "javascript:" from pasted strings to protect users from malicious URIs
     // (see stripUnsafeProtocolOnPaste).
-    if (aDisallowInheritPrincipal && !(uriObj && uriObj.schemeIs("javascript"))) {
+    if (aDisallowInheritPrincipal && !(uriObj && uriObj.schemeIs("javascript")))
       flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
-    }
-
-    if (aAllowPopups) {
-      flags |= Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_POPUPS;
-    }
 
     w.gBrowser.loadURIWithFlags(url, {
       flags: flags,
       referrerURI: aNoReferrer ? null : aReferrerURI,
       referrerPolicy: aReferrerPolicy,
       postData: aPostData,
     });
     break;
--- a/browser/components/places/PlacesUIUtils.jsm
+++ b/browser/components/places/PlacesUIUtils.jsm
@@ -863,17 +863,16 @@ this.PlacesUIUtils = {
           if (browserWin) {
             browserWin.openWebPanel(aNode.title, aNode.uri);
             return;
           }
         }
       }
 
       aWindow.openUILinkIn(aNode.uri, aWhere, {
-        allowPopups: url.startsWith("javascript:"),
         inBackground: Services.prefs.getBoolPref("browser.tabs.loadBookmarksInBackground"),
         private: aPrivate,
       });
     }
   },
 
   /**
    * Helper for guessing scheme from an url string.
--- a/browser/components/places/tests/browser/browser.ini
+++ b/browser/components/places/tests/browser/browser.ini
@@ -16,19 +16,16 @@ support-files =
 [browser_410196_paste_into_tags.js]
 [browser_416459_cut.js]
 [browser_423515.js]
 [browser_425884.js]
 [browser_435851_copy_query.js]
 [browser_475045.js]
 [browser_555547.js]
 [browser_bookmarkProperties_addKeywordForThisSearch.js]
-[browser_bookmarklet_windowOpen.js]
-support-files =
-  pageopeningwindow.html
 [browser_bookmarksProperties.js]
 [browser_drag_bookmarks_on_toolbar.js]
 skip-if = e10s # Bug ?????? - test fails - "Number of dragged items should be the same. - Got 0, expected 1"
 [browser_forgetthissite_single.js]
 [browser_history_sidebar_search.js]
 skip-if = e10s && (os == 'linux' || os == 'mac') # Bug 1116457
 [browser_library_batch_delete.js]
 [browser_library_commands.js]
deleted file mode 100644
--- a/browser/components/places/tests/browser/browser_bookmarklet_windowOpen.js
+++ /dev/null
@@ -1,59 +0,0 @@
-"use strict";
-
-const TEST_URL = 'http://example.com/browser/browser/components/places/tests/browser/pageopeningwindow.html';
-
-function makeBookmarkFor(url, keyword) {
-  return Promise.all([
-    PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
-                                   title: "bookmarklet",
-                                   url: url }),
-    PlacesUtils.keywords.insert({url: url,
-                                 keyword: keyword})
-  ]);
-
-}
-
-add_task(function openKeywordBookmarkWithWindowOpen() {
-  // This is the current default, but let's not assume that...
-  yield new Promise((resolve, reject) => {
-    SpecialPowers.pushPrefEnv({ 'set': [[ 'browser.link.open_newwindow', 3 ],
-                                        [ 'dom.disable_open_during_load', true ]] },
-                              resolve);
-  });
-
-  let moztab;
-  let tabOpened = BrowserTestUtils.openNewForegroundTab(gBrowser, "about:mozilla")
-                    .then((tab) => { moztab = tab; });
-  let keywordForBM = "openmeatab";
-
-  let bookmarkInfo;
-  let bookmarkCreated =
-    makeBookmarkFor("javascript:void open('" + TEST_URL + "')", keywordForBM)
-        .then((values) => {
-          bookmarkInfo = values[0];
-        });
-  yield Promise.all([tabOpened, bookmarkCreated]);
-
-  registerCleanupFunction(function() {
-    PlacesUtils.bookmarks.remove(bookmarkInfo);
-    PlacesUtils.keywords.remove(keywordForBM);
-  });
-  gURLBar.value = keywordForBM;
-  gURLBar.focus();
-
-  let tabCreatedPromise = BrowserTestUtils.waitForEvent(gBrowser.tabContainer, "TabOpen");
-  EventUtils.synthesizeKey("VK_RETURN", {});
-
-  info("Waiting for tab being created");
-  let {target: tab} = yield tabCreatedPromise;
-  info("Got tab");
-  let browser = tab.linkedBrowser;
-  if (!browser.currentURI || browser.currentURI.spec != TEST_URL) {
-    info("Waiting for browser load");
-    yield BrowserTestUtils.browserLoaded(browser);
-  }
-  is(browser.currentURI && browser.currentURI.spec, TEST_URL, "Tab with expected URL loaded.");
-  info("Waiting to remove tab");
-  yield Promise.all([ BrowserTestUtils.removeTab(tab),
-                      BrowserTestUtils.removeTab(moztab) ]);
-});
deleted file mode 100644
--- a/browser/components/places/tests/browser/pageopeningwindow.html
+++ /dev/null
@@ -1,8 +0,0 @@
-Hi, I was opened via a <script>document.write(location.search ?
-  "popup call from the opened window... uh oh, that shouldn't happen!" :
-  "bookmarklet, and I will open a new window myself.")</script><br>
-<script>
-  if (!location.search) {
-    open(location.href + "?donotopen=true", '_blank');
-  }
-</script>