In Bug 1644914 code was added that assumed all UI code for loading URIs goes
through only one path - nsDocShell::LoadURI. Since we are enabling parent
controlled loads now, we need to make sure that we set the same flag in this
code path too.
Differential Revision: https://phabricator.services.mozilla.com/D130198
Add a synced ParentInitiatedNavigationEpoch field to browsing context, which
only gets incremented when we start navigations in the parent process. When a
child process initiates a navigation, it sends the current value of the field
that it sees via DocumentChannelCreationArgs. In the parent process, we can
compare the value of that field with the latest one for the same browsing
context. If the latest value is higher than the one provided by the content
process, it means that in the meantime parent process has started a navigation
so the earlier navigation originating in the content process will be cancelled.
Differential Revision: https://phabricator.services.mozilla.com/D126842
We used to use the principal URL for the partitionKey in
ServiceWorkerPrivateImpl. This is correct if the ServiceWorker only
works in first-party context. But, it isn't correct in third-party
context.
To fix that, we can directly use the foreign paritioned principal from
the ServiceWorkerPrivate to get the partitionKey in third-party context.
For the first-party context, we can still use the original approach to
get the partitionKey.
Differential Revision: https://phabricator.services.mozilla.com/D128733
Given that we use the partitioned Principal in the third-party context
and the loading principal won't have it, we should ignore the
partitionKey when doing the verfication.
Differential Revision: https://phabricator.services.mozilla.com/D127841
The URL query stripping doesn't want the URLParams::Serialize() to
encode the result because it will encode the unstripped parameters. This
will change the unstripped parameters once stripping was happened.
Therefore, we introduce an parameter to URLParams::Serialize() to
disable encoding.
Differential Revision: https://phabricator.services.mozilla.com/D131964
This functionality is a common use of the output of GetBaseDomain.
This patch rolls this functionality into the service, providing a standard implementation, reducing bugs/inconsistency of the use of "Site"
There are two functions provided, GetSchemelessSite and GetSite.
GetSite performs a standard serialization of a URI to its origin's site.
GetSchemelessSite is non-standard but this logic is repeated throughout the codebase.
GetSchemelessSite can remove the redundant logic in the following functions in the codebase:
JS:
- SiteDataManager.getBaseDomainFromHost
- TemporaryPermissions._uriToBaseDomain
- LoginManagerStorage_geckoview.searchLoginsAsync
C++:
- BasePrincipal::GetLocalStorageQuotaKey
- ThirdPartyUtil::GetBaseDomain
- ThirdPartyUtil::GetBaseDomainFromSchemeHost
- ReferrerInfo::HandleUserXOriginSendingPolicy
- CookieCommons::GetBaseDomain
- CookieCommons::GetBaseDomainFromHost
- URLDecorationStripper::StripToRegistrableDomain
Differential Revision: https://phabricator.services.mozilla.com/D129812
This functionality is a common use of the output of GetBaseDomain.
This patch rolls this functionality into the service, providing a standard implementation, reducing bugs/inconsistency of the use of "Site"
There are two functions provided, GetSchemelessSite and GetSite.
GetSite performs a standard serialization of a URI to its origin's site.
GetSchemelessSite is non-standard but this logic is repeated throughout the codebase.
GetSchemelessSite can remove the redundant logic in the following functions in the codebase:
JS:
- SiteDataManager.getBaseDomainFromHost
- TemporaryPermissions._uriToBaseDomain
- LoginManagerStorage_geckoview.searchLoginsAsync
C++:
- BasePrincipal::GetLocalStorageQuotaKey
- ThirdPartyUtil::GetBaseDomain
- ThirdPartyUtil::GetBaseDomainFromSchemeHost
- ReferrerInfo::HandleUserXOriginSendingPolicy
- CookieCommons::GetBaseDomain
- CookieCommons::GetBaseDomainFromHost
- URLDecorationStripper::StripToRegistrableDomain
Differential Revision: https://phabricator.services.mozilla.com/D129812