Backed out changeset c9b0ce46ad4f (bug 1466801) for pause-remove-from-document-networkState.html failures CLOSED TREE
authorBogdan Tara <btara@mozilla.com>
Sat, 11 Aug 2018 03:20:30 +0300
changeset 431042 919250fdd7c2b335346f28ff841f5febdffb44e1
parent 431041 141dc7ae832e94ecd0c3b38a6a8ff04159b9bdf8
child 431043 ecd5d7bcee04b97d2a4b1b87e301105c11b34cc7
push id106336
push userbtara@mozilla.com
push dateSat, 11 Aug 2018 00:23:26 +0000
treeherdermozilla-inbound@7ed5ed3d4814 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1466801
milestone63.0a1
backs outc9b0ce46ad4f59e7c07fc3b7db2b16646140ae46
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
Backed out changeset c9b0ce46ad4f (bug 1466801) for pause-remove-from-document-networkState.html failures CLOSED TREE
browser/base/content/browser.js
browser/base/content/nsContextMenu.js
browser/base/content/tabbrowser.js
browser/base/content/test/contextMenu/browser.ini
browser/base/content/test/contextMenu/browser_utilityOverlay.js
browser/base/content/test/contextMenu/browser_utilityOverlayPrincipal.js
browser/base/content/test/general/browser.ini
browser/base/content/test/general/browser_utilityOverlay.js
browser/base/content/urlbarBindings.xml
browser/base/content/utilityOverlay.js
browser/components/extensions/parent/ext-tabs.js
browser/components/sessionstore/SessionStore.jsm
browser/modules/ContentClick.jsm
testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
testing/web-platform/meta/html/semantics/embedded-content/media-elements/autoplay-with-broken-track.html.ini
testing/web-platform/meta/html/semantics/embedded-content/media-elements/event_pause_noautoplay.html.ini
testing/web-platform/meta/html/semantics/embedded-content/media-elements/paused_true_during_pause.html.ini
testing/web-platform/meta/html/semantics/embedded-content/media-elements/ready-states/autoplay.html.ini
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1690,20 +1690,17 @@ var gBrowserInit = {
         let referrerPolicy = (window.arguments[5] != undefined ?
             window.arguments[5] : Ci.nsIHttpChannel.REFERRER_POLICY_UNSET);
         let userContextId = (window.arguments[6] != undefined ?
             window.arguments[6] : Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID);
         loadURI(uriToLoad, referrerURI, window.arguments[3] || null,
                 window.arguments[4] || false, referrerPolicy, userContextId,
                 // pass the origin principal (if any) and force its use to create
                 // an initial about:blank viewer if present:
-                window.arguments[7], !!window.arguments[7], window.arguments[8],
-                // TODO fix allowInheritPrincipal
-                // (this is required by javascript: drop to the new window) Bug 1475201
-                true);
+                window.arguments[7], !!window.arguments[7], window.arguments[8]);
         window.focus();
       } else {
         // Note: loadOneOrMoreURIs *must not* be called if window.arguments.length >= 3.
         // Such callers expect that window.arguments[0] is handled as a single URI.
         loadOneOrMoreURIs(uriToLoad, Services.scriptSecurityManager.getSystemPrincipal());
       }
     });
   },
@@ -2382,28 +2379,27 @@ function BrowserCloseTabOrWindow(event) 
 
 function BrowserTryToCloseWindow() {
   if (WindowIsClosing())
     window.close(); // WindowIsClosing does all the necessary checks
 }
 
 function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
                  userContextId, originPrincipal, forceAboutBlankViewerInCurrent,
-                 triggeringPrincipal, allowInheritPrincipal = false) {
+                 triggeringPrincipal) {
   try {
     openLinkIn(uri, "current",
                { referrerURI: referrer,
                  referrerPolicy,
                  postData,
                  allowThirdPartyFixup,
                  userContextId,
                  originPrincipal,
                  triggeringPrincipal,
                  forceAboutBlankViewerInCurrent,
-                 allowInheritPrincipal,
                });
   } catch (e) {}
 }
 
 /**
  * Given a string, will generate a more appropriate urlbar value if a Places
  * keyword or a search alias is found at the beginning of it.
  *
@@ -3562,19 +3558,16 @@ var newTabButtonObserver = {
       }
     }
 
     for (let link of links) {
       if (link.url) {
         let data = await getShortcutOrURIAndPostData(link.url);
         // Allow third-party services to fixup this URL.
         openNewTabWith(data.url, shiftKey, {
-          // TODO fix allowInheritPrincipal
-          // (this is required by javascript: drop to the new window) Bug 1475201
-          allowInheritPrincipal: true,
           postData: data.postData,
           allowThirdPartyFixup: true,
           triggeringPrincipal,
         });
       }
     }
   }
 };
@@ -3597,19 +3590,16 @@ var newWindowButtonObserver = {
       }
     }
 
     for (let link of links) {
       if (link.url) {
         let data = await getShortcutOrURIAndPostData(link.url);
         // Allow third-party services to fixup this URL.
         openNewWindowWith(data.url, {
-          // TODO fix allowInheritPrincipal
-          // (this is required by javascript: drop to the new window) Bug 1475201
-          allowInheritPrincipal: true,
           postData: data.postData,
           allowThirdPartyFixup: true,
           triggeringPrincipal,
         });
       }
     }
   }
 };
@@ -6101,17 +6091,17 @@ function middleMousePaste(event) {
       // but don't let that interfere with the loading of the url.
       Cu.reportError(ex);
     }
 
     if (where != "current" ||
         lastLocationChange == gBrowser.selectedBrowser.lastLocationChange) {
       openUILink(data.url, event,
                  { ignoreButton: true,
-                   allowInheritPrincipal: data.mayInheritPrincipal,
+                   disallowInheritPrincipal: !data.mayInheritPrincipal,
                    triggeringPrincipal: gBrowser.selectedBrowser.contentPrincipal,
                  });
     }
   });
 
   if (event instanceof Event) {
     event.stopPropagation();
   }
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -850,16 +850,17 @@ nsContextMenu.prototype = {
 
   // Open clicked-in frame in the same window.
   showOnlyThisFrame() {
     urlSecurityCheck(gContextMenuContentData.docLocation,
                      this.browser.contentPrincipal,
                      Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
     let referrer = gContextMenuContentData.referrer;
     openWebLinkIn(gContextMenuContentData.docLocation, "current", {
+      disallowInheritPrincipal: true,
       referrerURI: referrer ? makeURI(referrer) : null,
       triggeringPrincipal: this.browser.contentPrincipal,
     });
   },
 
   reload(event) {
     BrowserReloadOrDuplicate(event);
   },
@@ -907,17 +908,18 @@ nsContextMenu.prototype = {
     BrowserPageInfo(gContextMenuContentData.docLocation, "mediaTab",
                     this.imageInfo, null, this.browser);
   },
 
   viewImageDesc(e) {
     urlSecurityCheck(this.imageDescURL,
                      this.principal,
                      Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
-    openUILink(this.imageDescURL, e, { referrerURI: gContextMenuContentData.documentURIObject,
+    openUILink(this.imageDescURL, e, { disallowInheritPrincipal: true,
+                                       referrerURI: gContextMenuContentData.documentURIObject,
                                        triggeringPrincipal: this.principal,
     });
   },
 
   viewFrameInfo() {
     BrowserPageInfo(gContextMenuContentData.docLocation, null, null,
                     this.frameOuterWindowID, this.browser);
   },
@@ -945,24 +947,26 @@ nsContextMenu.prototype = {
   },
 
   // Change current window to the URL of the image, video, or audio.
   viewMedia(e) {
     let referrerURI = gContextMenuContentData.documentURIObject;
     let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
     if (this.onCanvas) {
       this._canvasToBlobURL(this.target).then(function(blobURL) {
-        openUILink(blobURL, e, { referrerURI,
+        openUILink(blobURL, e, { disallowInheritPrincipal: true,
+                                 referrerURI,
                                  triggeringPrincipal: systemPrincipal});
       }, Cu.reportError);
     } else {
       urlSecurityCheck(this.mediaURL,
                        this.principal,
                        Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
-      openUILink(this.mediaURL, e, { referrerURI,
+      openUILink(this.mediaURL, e, { disallowInheritPrincipal: true,
+                                     referrerURI,
                                      forceAllowDataURI: true,
                                      triggeringPrincipal: this.principal,
       });
     }
   },
 
   saveVideoFrameAsImage() {
     let mm = this.browser.messageManager;
@@ -1009,17 +1013,18 @@ nsContextMenu.prototype = {
   },
 
   // Change current window to the URL of the background image.
   viewBGImage(e) {
     urlSecurityCheck(this.bgImageURL,
                      this.principal,
                      Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
 
-    openUILink(this.bgImageURL, e, { referrerURI: gContextMenuContentData.documentURIObject,
+    openUILink(this.bgImageURL, e, { disallowInheritPrincipal: true,
+                                     referrerURI: gContextMenuContentData.documentURIObject,
                                      triggeringPrincipal: this.principal,
     });
   },
 
   setDesktopBackground() {
     let mm = this.browser.messageManager;
 
     mm.sendAsyncMessage("ContextMenu:SetAsDesktopBackground", null,
--- a/browser/base/content/tabbrowser.js
+++ b/browser/base/content/tabbrowser.js
@@ -1325,17 +1325,16 @@ window._gBrowser = {
     return true;
   },
 
   loadOneTab(aURI, aReferrerURI, aCharset, aPostData, aLoadInBackground, aAllowThirdPartyFixup) {
     var aTriggeringPrincipal;
     var aReferrerPolicy;
     var aFromExternal;
     var aRelatedToCurrent;
-    var aAllowInheritPrincipal;
     var aAllowMixedContent;
     var aSkipAnimation;
     var aForceNotRemote;
     var aPreferredRemoteType;
     var aNoReferrer;
     var aUserContextId;
     var aSameProcessAsFrameLoader;
     var aOriginPrincipal;
@@ -1353,17 +1352,16 @@ window._gBrowser = {
       aReferrerURI = params.referrerURI;
       aReferrerPolicy = params.referrerPolicy;
       aCharset = params.charset;
       aPostData = params.postData;
       aLoadInBackground = params.inBackground;
       aAllowThirdPartyFixup = params.allowThirdPartyFixup;
       aFromExternal = params.fromExternal;
       aRelatedToCurrent = params.relatedToCurrent;
-      aAllowInheritPrincipal = !!params.allowInheritPrincipal;
       aAllowMixedContent = params.allowMixedContent;
       aSkipAnimation = params.skipAnimation;
       aForceNotRemote = params.forceNotRemote;
       aPreferredRemoteType = params.preferredRemoteType;
       aNoReferrer = params.noReferrer;
       aUserContextId = params.userContextId;
       aSameProcessAsFrameLoader = params.sameProcessAsFrameLoader;
       aOriginPrincipal = params.originPrincipal;
@@ -1386,17 +1384,16 @@ window._gBrowser = {
 
     var tab = this.addTab(aURI, {
       triggeringPrincipal: aTriggeringPrincipal,
       referrerURI: aReferrerURI,
       referrerPolicy: aReferrerPolicy,
       charset: aCharset,
       postData: aPostData,
       ownerTab: owner,
-      allowInheritPrincipal: aAllowInheritPrincipal,
       allowThirdPartyFixup: aAllowThirdPartyFixup,
       fromExternal: aFromExternal,
       relatedToCurrent: aRelatedToCurrent,
       skipAnimation: aSkipAnimation,
       allowMixedContent: aAllowMixedContent,
       forceNotRemote: aForceNotRemote,
       createLazyBrowser: aCreateLazyBrowser,
       preferredRemoteType: aPreferredRemoteType,
@@ -2163,22 +2160,22 @@ window._gBrowser = {
    */
   addTrustedTab(aURI, params = {}) {
     params.triggeringPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
     return this.addTab(aURI, params);
   },
 
   // eslint-disable-next-line complexity
   addTab(aURI, {
-    allowInheritPrincipal,
     allowMixedContent,
     allowThirdPartyFixup,
     bulkOrderedOpen,
     charset,
     createLazyBrowser,
+    disallowInheritPrincipal,
     eventDetail,
     focusUrlBar,
     forceNotRemote,
     fromExternal,
     index,
     name,
     nextTabParentId,
     noInitialLabel,
@@ -2470,17 +2467,17 @@ window._gBrowser = {
       if (!aURIObject ||
           (doGetProtocolFlags(aURIObject) & URI_INHERITS_SECURITY_CONTEXT)) {
         b.createAboutBlankContentViewer(originPrincipal);
       }
     }
 
     // If we didn't swap docShells with a preloaded browser
     // then let's just continue loading the page normally.
-    if (!usingPreloadedContent && (!uriIsAboutBlank || !allowInheritPrincipal)) {
+    if (!usingPreloadedContent && (!uriIsAboutBlank || disallowInheritPrincipal)) {
       // pretend the user typed this so it'll be available till
       // the document successfully loads
       if (aURI && !gInitialPages.includes(aURI)) {
         b.userTypedValue = aURI;
       }
 
       let flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
       if (allowThirdPartyFixup) {
@@ -2488,17 +2485,17 @@ window._gBrowser = {
         flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
       }
       if (fromExternal) {
         flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL;
       }
       if (allowMixedContent) {
         flags |= Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_MIXED_CONTENT;
       }
-      if (!allowInheritPrincipal) {
+      if (disallowInheritPrincipal) {
         flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL;
       }
       try {
         b.loadURI(aURI, {
           flags,
           triggeringPrincipal,
           referrerURI: noReferrer ? null : referrerURI,
           referrerPolicy,
--- a/browser/base/content/test/contextMenu/browser.ini
+++ b/browser/base/content/test/contextMenu/browser.ini
@@ -2,10 +2,8 @@
 support-files =
   !/browser/base/content/test/general/contextmenu_common.js
   subtst_contextmenu_webext.html
   test_contextmenu_links.html
 
 [browser_contextmenu_touch.js]
 skip-if = !(os == 'win' && os_version == '10.0')
 [browser_contextmenu_linkopen.js]
-[browser_utilityOverlay.js]
-[browser_utilityOverlayPrincipal.js]
deleted file mode 100644
--- a/browser/base/content/test/contextMenu/browser_utilityOverlayPrincipal.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- *  License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-const gTests = [
-  test_openUILink_checkPrincipal,
-];
-
-function test() {
-  waitForExplicitFinish();
-  executeSoon(runNextTest);
-}
-
-function runNextTest() {
-  if (gTests.length) {
-    let testFun = gTests.shift();
-    info("Running " + testFun.name);
-    testFun();
-  } else {
-    finish();
-  }
-}
-
-function test_openUILink_checkPrincipal() {
-  let tab = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "http://example.com/"); // remote tab
-  BrowserTestUtils.browserLoaded(tab.linkedBrowser).then(async function() {
-    is(tab.linkedBrowser.currentURI.spec, "http://example.com/", "example.com loaded");
-
-    await ContentTask.spawn(tab.linkedBrowser, null, function() {
-      let channel = content.docShell.currentDocumentChannel;
-
-      const loadingPrincipal = channel.loadInfo.loadingPrincipal;
-      is(loadingPrincipal, null, "sanity: correct loadingPrincipal");
-      const triggeringPrincipal = channel.loadInfo.triggeringPrincipal;
-      ok(Services.scriptSecurityManager.isSystemPrincipal(triggeringPrincipal),
-        "sanity: correct triggeringPrincipal");
-      const principalToInherit = channel.loadInfo.principalToInherit;
-      ok(principalToInherit.isNullPrincipal, "sanity: correct principalToInherit");
-      ok(content.document.nodePrincipal.isCodebasePrincipal,
-        "sanity: correct doc.nodePrincipal");
-      is(content.document.nodePrincipal.URI.asciiSpec, "http://example.com/",
-       "sanity: correct doc.nodePrincipal URL");
-    });
-
-    gBrowser.removeCurrentTab();
-    runNextTest();
-
-  });
-
-  // Ensure we get the correct default of "allowInheritPrincipal: false" from openUILink
-  openUILink("http://example.com", null, {
-    triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal({}),
-  }); // defaults to "current"
-}
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -441,16 +441,18 @@ support-files =
 run-if = e10s
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_typeAheadFind.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_unknownContentType_title.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_unloaddialogs.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
+[browser_utilityOverlay.js]
+# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_viewSourceInTabOnViewSource.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_visibleFindSelection.js]
 skip-if = true # Bug 1409184 disabled because interactive find next is not automating properly
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_visibleTabs.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_visibleTabs_bookmarkAllPages.js]
rename from browser/base/content/test/contextMenu/browser_utilityOverlay.js
rename to browser/base/content/test/general/browser_utilityOverlay.js
--- a/browser/base/content/test/contextMenu/browser_utilityOverlay.js
+++ b/browser/base/content/test/general/browser_utilityOverlay.js
@@ -2,17 +2,17 @@
  *  License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const gTests = [
   test_eventMatchesKey,
   test_getTopWin,
   test_getBoolPref,
   test_openNewTabWith,
-  test_openUILink,
+  test_openUILink
 ];
 
 function test() {
   waitForExplicitFinish();
   executeSoon(runNextTest);
 }
 
 function runNextTest() {
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -927,17 +927,17 @@ file, You can obtain one at http://mozil
             postData,
             allowThirdPartyFixup: true,
             triggeringPrincipal,
           };
           if (openUILinkWhere == "current") {
             params.targetBrowser = browser;
             params.indicateErrorPageLoad = true;
             params.allowPinnedTabHostChange = true;
-            params.allowInheritPrincipal = mayInheritPrincipal;
+            params.disallowInheritPrincipal = !mayInheritPrincipal;
             params.allowPopups = url.startsWith("javascript:");
           } else {
             params.initiatingDoc = document;
           }
 
           if (openUILinkParams) {
             for (let key in openUILinkParams) {
               params[key] = openUILinkParams[key];
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -277,20 +277,20 @@ function openLinkIn(url, where, params) 
   var aFromChrome           = params.fromChrome;
   var aAllowThirdPartyFixup = params.allowThirdPartyFixup;
   var aPostData             = params.postData;
   var aCharset              = params.charset;
   var aReferrerURI          = params.referrerURI;
   var aReferrerPolicy       = ("referrerPolicy" in params ?
       params.referrerPolicy : Ci.nsIHttpChannel.REFERRER_POLICY_UNSET);
   var aRelatedToCurrent     = params.relatedToCurrent;
-  var aAllowInheritPrincipal = !!params.allowInheritPrincipal;
   var aAllowMixedContent    = params.allowMixedContent;
   var aForceAllowDataURI    = params.forceAllowDataURI;
   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;
   var aUserContextId        = params.userContextId;
   var aIndicateErrorPageLoad = params.indicateErrorPageLoad;
@@ -477,20 +477,22 @@ function openLinkIn(url, where, params) 
   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;
     }
+
     // LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL isn't supported for javascript URIs,
     // i.e. it causes them not to load at all. Callers should strip
-    // "javascript:" from pasted strings to prevent blank tabs
-    if (!aAllowInheritPrincipal) {
+    // "javascript:" from pasted strings to protect users from malicious URIs
+    // (see stripUnsafeProtocolOnPaste).
+    if (aDisallowInheritPrincipal && !(uriObj && uriObj.schemeIs("javascript"))) {
       flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL;
     }
 
     if (aAllowPopups) {
       flags |= Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_POPUPS;
     }
     if (aIndicateErrorPageLoad) {
       flags |= Ci.nsIWebNavigation.LOAD_FLAGS_ERROR_LOAD_CHANGES_RV;
@@ -538,17 +540,16 @@ function openLinkIn(url, where, params) 
       allowThirdPartyFixup: aAllowThirdPartyFixup,
       relatedToCurrent: aRelatedToCurrent,
       skipAnimation: aSkipTabAnimation,
       allowMixedContent: aAllowMixedContent,
       noReferrer: aNoReferrer,
       userContextId: aUserContextId,
       originPrincipal: aPrincipal,
       triggeringPrincipal: aTriggeringPrincipal,
-      allowInheritPrincipal: aAllowInheritPrincipal,
       focusUrlBar,
     });
     targetBrowser = tabUsedForLoad.linkedBrowser;
 
     if (aResolveOnNewTabCreated) {
       aResolveOnNewTabCreated(targetBrowser);
     }
 
--- a/browser/components/extensions/parent/ext-tabs.js
+++ b/browser/components/extensions/parent/ext-tabs.js
@@ -567,33 +567,30 @@ this.tabs = class extends ExtensionAPI {
               }
 
               if (createProperties.openInReaderMode) {
                 url = `about:reader?url=${encodeURIComponent(url)}`;
               }
             } else {
               url = window.BROWSER_NEW_TAB_URL;
             }
-            // Only set allowInheritPrincipal on discardable urls as it
+            // Only set disallowInheritPrincipal on non-discardable urls as it
             // will override creating a lazy browser.  Setting triggeringPrincipal
             // will ensure other cases are handled, but setting it may prevent
             // creating about and data urls.
             let discardable = url && !url.startsWith("about:");
             if (!discardable) {
               // Make sure things like about:blank and data: URIs never inherit,
               // and instead always get a NullPrincipal.
-              options.allowInheritPrincipal = false;
+              options.disallowInheritPrincipal = true;
               // Falling back to codebase here as about: requires it, however is safe.
               principal = Services.scriptSecurityManager.createCodebasePrincipal(Services.io.newURI(url), {
                 userContextId: options.userContextId,
                 privateBrowsingId: PrivateBrowsingUtils.isBrowserPrivate(window.gBrowser) ? 1 : 0,
               });
-            } else {
-              options.allowInheritPrincipal = true;
-              options.triggeringPrincipal = context.principal;
             }
 
             tabListener.initTabReady();
             let currentTab = window.gBrowser.selectedTab;
 
             if (createProperties.openerTabId !== null) {
               options.ownerTab = tabTracker.getTab(createProperties.openerTabId);
               options.openerBrowser = options.ownerTab.linkedBrowser;
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -3493,17 +3493,16 @@ var SessionStoreInternal = {
         }
 
         // Setting noInitialLabel is a perf optimization. Rendering tab labels
         // would make resizing the tabs more expensive as we're adding them.
         // Each tab will get its initial label set in restoreTab.
         tab = tabbrowser.addTrustedTab(url,
                                        { createLazyBrowser,
                                          skipAnimation: true,
-                                         allowInheritPrincipal: true,
                                          noInitialLabel: true,
                                          userContextId,
                                          skipBackgroundNotify: true,
                                          bulkOrderedOpen: true });
 
         if (select) {
           let leftoverTab = tabbrowser.selectedTab;
           tabbrowser.selectedTab = tab;
--- a/browser/modules/ContentClick.jsm
+++ b/browser/modules/ContentClick.jsm
@@ -72,13 +72,11 @@ var ContentClick = {
       frameOuterWindowID: json.frameOuterWindowID,
     };
 
     // The new tab/window must use the same userContextId.
     if (json.originAttributes.userContextId) {
       params.userContextId = json.originAttributes.userContextId;
     }
 
-    params.allowInheritPrincipal = true;
-
     window.openLinkIn(json.href, where, params);
   }
 };
--- a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
+++ b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
@@ -1780,19 +1780,16 @@ var BrowserTestUtils = {
    * @param {function} beforeLoadFunc [optional]
    *        A function to run after that xul:browser has been created but before the URL is
    *        loaded. Can spawn a content task in the tab, for example.
    */
   addTab(tabbrowser, uri, params = {}, beforeLoadFunc = null) {
     if (!params.triggeringPrincipal) {
       params.triggeringPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
     }
-    if (!params.allowInheritPrincipal) {
-      params.allowInheritPrincipal = true;
-    }
     if (beforeLoadFunc) {
       let window = tabbrowser.ownerGlobal;
       window.addEventListener("TabOpen", function(e) {
         beforeLoadFunc(e.target);
       }, {once: true});
     }
     return tabbrowser.addTab(uri, params);
   }
--- a/testing/web-platform/meta/html/semantics/embedded-content/media-elements/autoplay-with-broken-track.html.ini
+++ b/testing/web-platform/meta/html/semantics/embedded-content/media-elements/autoplay-with-broken-track.html.ini
@@ -1,9 +1,8 @@
 [autoplay-with-broken-track.html]
   expected: TIMEOUT
-  disabled:
-    if debug and (os == "linux") and (processor == "x86") and (bits == 32): https://bugzilla.mozilla.org/show_bug.cgi?id=1482405
   [<video autoplay> with <track src="invalid://url" default=""> child]
     expected: TIMEOUT
 
   [<video autoplay> with <track src="" default=""> child]
     expected: TIMEOUT
+
deleted file mode 100644
--- a/testing/web-platform/meta/html/semantics/embedded-content/media-elements/event_pause_noautoplay.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[event_pause_noautoplay.html]
-  disabled:
-    if debug and (os == "linux") and (processor == "x86") and (bits == 32): https://bugzilla.mozilla.org/show_bug.cgi?id=1482405
deleted file mode 100644
--- a/testing/web-platform/meta/html/semantics/embedded-content/media-elements/paused_true_during_pause.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[paused_true_during_pause.html]
-  disabled:
-    if debug and (os == "linux") and (processor == "x86") and (bits == 32): https://bugzilla.mozilla.org/show_bug.cgi?id=1482405
deleted file mode 100644
--- a/testing/web-platform/meta/html/semantics/embedded-content/media-elements/ready-states/autoplay.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[autoplay.html]
-  disabled:
-    if debug and (os == "linux") and (processor == "x86") and (bits == 32): https://bugzilla.mozilla.org/show_bug.cgi?id=1482405