mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1658572 - Do not propagate user activation state while loading loading-error-page (about:neterror); r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D86724
This commit is contained in:
parent
5216d6395e
commit
747f9db6d7
@ -3803,9 +3803,6 @@ nsresult nsDocShell::LoadErrorPage(nsIURI* aErrorURI, nsIURI* aFailedURI,
|
||||
loadState->SetLoadType(LOAD_ERROR_PAGE);
|
||||
loadState->SetFirstParty(true);
|
||||
loadState->SetSourceBrowsingContext(mBrowsingContext);
|
||||
loadState->SetHasValidUserGestureActivation(
|
||||
mBrowsingContext &&
|
||||
mBrowsingContext->HasValidTransientUserGestureActivation());
|
||||
return InternalLoad(loadState);
|
||||
}
|
||||
|
||||
@ -9683,7 +9680,8 @@ nsresult nsDocShell::DoURILoad(nsDocShellLoadState* aLoadState,
|
||||
// in case this docshell load was triggered by a valid transient user gesture,
|
||||
// or also the load originates from external, then we pass that information on
|
||||
// to the loadinfo, which allows e.g. setting Sec-Fetch-User request headers.
|
||||
if (mBrowsingContext->HasValidTransientUserGestureActivation() ||
|
||||
if ((mLoadType != LOAD_ERROR_PAGE &&
|
||||
mBrowsingContext->HasValidTransientUserGestureActivation()) ||
|
||||
aLoadState->HasValidUserGestureActivation() ||
|
||||
aLoadState->HasLoadFlags(LOAD_FLAGS_FROM_EXTERNAL)) {
|
||||
loadInfo->SetHasValidUserGestureActivation(true);
|
||||
|
Loading…
Reference in New Issue
Block a user