This reverts commit 524a1fc191.
Revert "Bug 2020707 - Part 5: Gate speculation rules script support behind a pref. r=dom-core-reviewers,jjaschke"
This reverts commit 11741d18ad.
Revert "Bug 2020707 - Part 4: Unregister speculation rules when their script element is removed. r=dom-core-reviewers,hsivonen"
This reverts commit 5202943dc9.
Revert "Bug 2020707 - Part 3: Report an exception if speculation rules parsing fails. r=dom-core-reviewers,jjaschke"
This reverts commit 70c5aa5425.
Revert "Bug 2020707 - Part 2: Add support for speculationrules script type. r=dom-core-reviewers,jjaschke"
This reverts commit 65b30a350b.
Revert "Bug 2020707 - Part 1: Allow speculation rules to be registered to the document from scripts. r=hsivonen,jjaschke"
This reverts commit 28c7050de9.
Revert "Bug 2020704 - Part 2: Add parser for speculation rule sets. r=hsivonen,jjaschke"
This reverts commit eabb8c6eb3.
Revert "Bug 2020704 - Part 1: Add speculation rules crate. r=dom-core-reviewers,jjaschke"
This reverts commit cd65bed005.
This adds information about interactions during a pageload session to the pageload event. It adds a number of different metrics that will help us understand the distribution of interaction timings. In the longer term this is intended to help us decide what the best metric is for us to consider for the eTLD+1 pageload event.
Differential Revision: https://phabricator.services.mozilla.com/D302799
It's a 1:1 mapping for the origin that we cache in the
StyleSheetContents, so use that.
PreloadHashKey only cares about author loads, within a document, so
doesn't really need to deal with user / user-agent ones.
Differential Revision: https://phabricator.services.mozilla.com/D304400
Local Network Access (LNA) checks compare the parent document's IP address
space against the target server to detect cross-network-boundary requests
(e.g., a public website fetching from localhost). Previously, LNA was only
enforced for requests from document contexts. Worker-initiated requests
(fetch, XHR) bypassed LNA entirely because workers had no IP address space
from their parent document.
This patch propagates the document's IP address space to all worker types
and enforces LNA checks with worker-type-specific permission behavior:
Dedicated workers:
- IP address space is read directly from the document's PolicyContainer
during WorkerPrivate::GetLoadInfo() and stored in WorkerLoadInfo.
- LNA permission prompts ARE shown to the user via the parent document's
browsing context (AssociatedBrowsingContextID points to the creating tab).
- Behavior matches document-context LNA: user can Allow or Deny, and the
decision is cached as a site permission.
Shared workers:
- IP address space is carried via the ClientInfo's PolicyContainerArgs in
RemoteWorkerData, which crosses process boundaries via IPC.
- RemoteWorkerChild::ExecWorkerOnMainThread() now extracts ipAddressSpace
from PolicyContainerArgs (previously only CSP was extracted).
- LNA permission prompts are NOT shown. Shared workers may run in a
different content process and are not tied to a single tab, so there is
no browsing context to anchor a prompt to.
- Access is granted only if a persistent ALLOW permission already exists
for the origin (e.g., previously granted via a document-context prompt).
Otherwise the request is denied silently.
Service workers:
- IP address space is captured from the registering document's ClientInfo
during ServiceWorkerManager::Register() and stored on
ServiceWorkerRegistrationInfo. It is propagated to RemoteWorkerData via
RefreshRemoteWorkerData() before every spawn.
- Both Initialize() and RefreshRemoteWorkerData() set ipAddressSpace
because Register() (which captures the value) and Initialize() (which
builds RemoteWorkerData) can run in either order depending on whether
the registration is new or pre-existing.
- LNA permission prompts are NOT shown. Service workers are event-driven,
have no associated browsing context, and can be spawned long after the
registering document is gone.
- Same permission behavior as shared workers: access requires a persistent
ALLOW permission, otherwise denied silently.
Differential Revision: https://phabricator.services.mozilla.com/D288651
Local Network Access (LNA) checks compare the parent document's IP address
space against the target server to detect cross-network-boundary requests
(e.g., a public website fetching from localhost). Previously, LNA was only
enforced for requests from document contexts. Worker-initiated requests
(fetch, XHR) bypassed LNA entirely because workers had no IP address space
from their parent document.
This patch propagates the document's IP address space to all worker types
and enforces LNA checks with worker-type-specific permission behavior:
Dedicated workers:
- IP address space is read directly from the document's PolicyContainer
during WorkerPrivate::GetLoadInfo() and stored in WorkerLoadInfo.
- LNA permission prompts ARE shown to the user via the parent document's
browsing context (AssociatedBrowsingContextID points to the creating tab).
- Behavior matches document-context LNA: user can Allow or Deny, and the
decision is cached as a site permission.
Shared workers:
- IP address space is carried via the ClientInfo's PolicyContainerArgs in
RemoteWorkerData, which crosses process boundaries via IPC.
- RemoteWorkerChild::ExecWorkerOnMainThread() now extracts ipAddressSpace
from PolicyContainerArgs (previously only CSP was extracted).
- LNA permission prompts are NOT shown. Shared workers may run in a
different content process and are not tied to a single tab, so there is
no browsing context to anchor a prompt to.
- Access is granted only if a persistent ALLOW permission already exists
for the origin (e.g., previously granted via a document-context prompt).
Otherwise the request is denied silently.
Service workers:
- IP address space is captured from the registering document's ClientInfo
during ServiceWorkerManager::Register() and stored on
ServiceWorkerRegistrationInfo. It is propagated to RemoteWorkerData via
RefreshRemoteWorkerData() before every spawn.
- Both Initialize() and RefreshRemoteWorkerData() set ipAddressSpace
because Register() (which captures the value) and Initialize() (which
builds RemoteWorkerData) can run in either order depending on whether
the registration is new or pre-existing.
- LNA permission prompts are NOT shown. Service workers are event-driven,
have no associated browsing context, and can be spawned long after the
registering document is gone.
- Same permission behavior as shared workers: access requires a persistent
ALLOW permission, otherwise denied silently.
Differential Revision: https://phabricator.services.mozilla.com/D288651
Implements the gecko-parts of Picture In Picture API, to which the various platforms can add their implementation for opening a PIP Window to.
nsIPictureInPictureFunctions.idl shall be implemented by the different platforms. For desktop we already have a "native" PIP implementation and this will be re-used.
Platforms which does not implement nsIPictureInPictureFunctions.idl, will signal that they don't support it (and attempts to request via the API algorithms, will reject accordingly).
Differential Revision: https://phabricator.services.mozilla.com/D286141
Local Network Access (LNA) checks compare the parent document's IP address
space against the target server to detect cross-network-boundary requests
(e.g., a public website fetching from localhost). Previously, LNA was only
enforced for requests from document contexts. Worker-initiated requests
(fetch, XHR) bypassed LNA entirely because workers had no IP address space
from their parent document.
This patch propagates the document's IP address space to all worker types
and enforces LNA checks with worker-type-specific permission behavior:
Dedicated workers:
- IP address space is read directly from the document's PolicyContainer
during WorkerPrivate::GetLoadInfo() and stored in WorkerLoadInfo.
- LNA permission prompts ARE shown to the user via the parent document's
browsing context (AssociatedBrowsingContextID points to the creating tab).
- Behavior matches document-context LNA: user can Allow or Deny, and the
decision is cached as a site permission.
Shared workers:
- IP address space is carried via the ClientInfo's PolicyContainerArgs in
RemoteWorkerData, which crosses process boundaries via IPC.
- RemoteWorkerChild::ExecWorkerOnMainThread() now extracts ipAddressSpace
from PolicyContainerArgs (previously only CSP was extracted).
- LNA permission prompts are NOT shown. Shared workers may run in a
different content process and are not tied to a single tab, so there is
no browsing context to anchor a prompt to.
- Access is granted only if a persistent ALLOW permission already exists
for the origin (e.g., previously granted via a document-context prompt).
Otherwise the request is denied silently.
Service workers:
- IP address space is captured from the registering document's ClientInfo
during ServiceWorkerManager::Register() and stored on
ServiceWorkerRegistrationInfo. It is propagated to RemoteWorkerData via
RefreshRemoteWorkerData() before every spawn.
- Both Initialize() and RefreshRemoteWorkerData() set ipAddressSpace
because Register() (which captures the value) and Initialize() (which
builds RemoteWorkerData) can run in either order depending on whether
the registration is new or pre-existing.
- LNA permission prompts are NOT shown. Service workers are event-driven,
have no associated browsing context, and can be spawned long after the
registering document is gone.
- Same permission behavior as shared workers: access requires a persistent
ALLOW permission, otherwise denied silently.
Differential Revision: https://phabricator.services.mozilla.com/D288651
This moves the pageload event to the destruction of the page. This will allow us to collect a more accurate LCP value as well as letting us collect interaction data on the page.
Differential Revision: https://phabricator.services.mozilla.com/D302744
Local Network Access (LNA) checks compare the parent document's IP address
space against the target server to detect cross-network-boundary requests
(e.g., a public website fetching from localhost). Previously, LNA was only
enforced for requests from document contexts. Worker-initiated requests
(fetch, XHR) bypassed LNA entirely because workers had no IP address space
from their parent document.
This patch propagates the document's IP address space to all worker types
and enforces LNA checks with worker-type-specific permission behavior:
Dedicated workers:
- IP address space is read directly from the document's PolicyContainer
during WorkerPrivate::GetLoadInfo() and stored in WorkerLoadInfo.
- LNA permission prompts ARE shown to the user via the parent document's
browsing context (AssociatedBrowsingContextID points to the creating tab).
- Behavior matches document-context LNA: user can Allow or Deny, and the
decision is cached as a site permission.
Shared workers:
- IP address space is carried via the ClientInfo's PolicyContainerArgs in
RemoteWorkerData, which crosses process boundaries via IPC.
- RemoteWorkerChild::ExecWorkerOnMainThread() now extracts ipAddressSpace
from PolicyContainerArgs (previously only CSP was extracted).
- LNA permission prompts are NOT shown. Shared workers may run in a
different content process and are not tied to a single tab, so there is
no browsing context to anchor a prompt to.
- Access is granted only if a persistent ALLOW permission already exists
for the origin (e.g., previously granted via a document-context prompt).
Otherwise the request is denied silently.
Service workers:
- IP address space is captured from the registering document's ClientInfo
during ServiceWorkerManager::Register() and stored on
ServiceWorkerRegistrationInfo. It is propagated to RemoteWorkerData via
RefreshRemoteWorkerData() before every spawn.
- Both Initialize() and RefreshRemoteWorkerData() set ipAddressSpace
because Register() (which captures the value) and Initialize() (which
builds RemoteWorkerData) can run in either order depending on whether
the registration is new or pre-existing.
- LNA permission prompts are NOT shown. Service workers are event-driven,
have no associated browsing context, and can be spawned long after the
registering document is gone.
- Same permission behavior as shared workers: access requires a persistent
ALLOW permission, otherwise denied silently.
Differential Revision: https://phabricator.services.mozilla.com/D288651
Implements the gecko-parts of Picture In Picture API, to which the various platforms can add their implementation for opening a PIP Window to.
nsIPictureInPictureFunctions.idl shall be implemented by the different platforms. For desktop we already have a "native" PIP implementation and this will be re-used.
Platforms which does not implement nsIPictureInPictureFunctions.idl, will signal that they don't support it (and attempts to request via the API algorithms, will reject accordingly).
Differential Revision: https://phabricator.services.mozilla.com/D286141
If our document is already fullscreen, we were bypassing the "fullscreen
element allowed" check, causing an <svg:text> element to become
fullscreen incorrectly.
Differential Revision: https://phabricator.services.mozilla.com/D302736
Local Network Access (LNA) checks compare the parent document's IP address
space against the target server to detect cross-network-boundary requests
(e.g., a public website fetching from localhost). Previously, LNA was only
enforced for requests from document contexts. Worker-initiated requests
(fetch, XHR) bypassed LNA entirely because workers had no IP address space
from their parent document.
This patch propagates the document's IP address space to all worker types
and enforces LNA checks with worker-type-specific permission behavior:
Dedicated workers:
- IP address space is read directly from the document's PolicyContainer
during WorkerPrivate::GetLoadInfo() and stored in WorkerLoadInfo.
- LNA permission prompts ARE shown to the user via the parent document's
browsing context (AssociatedBrowsingContextID points to the creating tab).
- Behavior matches document-context LNA: user can Allow or Deny, and the
decision is cached as a site permission.
Shared workers:
- IP address space is carried via the ClientInfo's PolicyContainerArgs in
RemoteWorkerData, which crosses process boundaries via IPC.
- RemoteWorkerChild::ExecWorkerOnMainThread() now extracts ipAddressSpace
from PolicyContainerArgs (previously only CSP was extracted).
- LNA permission prompts are NOT shown. Shared workers may run in a
different content process and are not tied to a single tab, so there is
no browsing context to anchor a prompt to.
- Access is granted only if a persistent ALLOW permission already exists
for the origin (e.g., previously granted via a document-context prompt).
Otherwise the request is denied silently.
Service workers:
- IP address space is captured from the registering document's ClientInfo
during ServiceWorkerManager::Register() and stored on
ServiceWorkerRegistrationInfo. It is propagated to RemoteWorkerData via
RefreshRemoteWorkerData() before every spawn.
- Both Initialize() and RefreshRemoteWorkerData() set ipAddressSpace
because Register() (which captures the value) and Initialize() (which
builds RemoteWorkerData) can run in either order depending on whether
the registration is new or pre-existing.
- LNA permission prompts are NOT shown. Service workers are event-driven,
have no associated browsing context, and can be spawned long after the
registering document is gone.
- Same permission behavior as shared workers: access requires a persistent
ALLOW permission, otherwise denied silently.
Differential Revision: https://phabricator.services.mozilla.com/D288651
Implements the gecko-parts of Picture In Picture API, to which the various platforms can add their implementation for opening a PIP Window to.
nsIPictureInPictureFunctions.idl shall be implemented by the different platforms. For desktop we already have a "native" PIP implementation and this will be re-used.
Platforms which does not implement nsIPictureInPictureFunctions.idl, will signal that they don't support it (and attempts to request via the API algorithms, will reject accordingly).
Differential Revision: https://phabricator.services.mozilla.com/D286141
Implements the gecko-parts of Picture In Picture API, to which the various platforms can add their implementation for opening a PIP Window to.
nsIPictureInPictureFunctions.idl shall be implemented by the different platforms. For desktop we already have a "native" PIP implementation and this will be re-used.
Platforms which does not implement nsIPictureInPictureFunctions.idl, will signal that they don't support it (and attempts to request via the API algorithms, will reject accordingly).
Differential Revision: https://phabricator.services.mozilla.com/D286141
Local Network Access (LNA) checks compare the parent document's IP address
space against the target server to detect cross-network-boundary requests
(e.g., a public website fetching from localhost). Previously, LNA was only
enforced for requests from document contexts. Worker-initiated requests
(fetch, XHR) bypassed LNA entirely because workers had no IP address space
from their parent document.
This patch propagates the document's IP address space to all worker types
and enforces LNA checks with worker-type-specific permission behavior:
Dedicated workers:
- IP address space is read directly from the document's PolicyContainer
during WorkerPrivate::GetLoadInfo() and stored in WorkerLoadInfo.
- LNA permission prompts ARE shown to the user via the parent document's
browsing context (AssociatedBrowsingContextID points to the creating tab).
- Behavior matches document-context LNA: user can Allow or Deny, and the
decision is cached as a site permission.
Shared workers:
- IP address space is carried via the ClientInfo's PolicyContainerArgs in
RemoteWorkerData, which crosses process boundaries via IPC.
- RemoteWorkerChild::ExecWorkerOnMainThread() now extracts ipAddressSpace
from PolicyContainerArgs (previously only CSP was extracted).
- LNA permission prompts are NOT shown. Shared workers may run in a
different content process and are not tied to a single tab, so there is
no browsing context to anchor a prompt to.
- Access is granted only if a persistent ALLOW permission already exists
for the origin (e.g., previously granted via a document-context prompt).
Otherwise the request is denied silently.
Service workers:
- IP address space is captured from the registering document's ClientInfo
during ServiceWorkerManager::Register() and stored on
ServiceWorkerRegistrationInfo. It is propagated to RemoteWorkerData via
RefreshRemoteWorkerData() before every spawn.
- Both Initialize() and RefreshRemoteWorkerData() set ipAddressSpace
because Register() (which captures the value) and Initialize() (which
builds RemoteWorkerData) can run in either order depending on whether
the registration is new or pre-existing.
- LNA permission prompts are NOT shown. Service workers are event-driven,
have no associated browsing context, and can be spawned long after the
registering document is gone.
- Same permission behavior as shared workers: access requires a persistent
ALLOW permission, otherwise denied silently.
Differential Revision: https://phabricator.services.mozilla.com/D288651
Implements the gecko-parts of Picture In Picture API, to which the various platforms can add their implementation for opening a PIP Window to.
nsIPictureInPictureFunctions.idl shall be implemented by the different platforms. For desktop we already have a "native" PIP implementation and this will be re-used.
Platforms which does not implement nsIPictureInPictureFunctions.idl, will signal that they don't support it (and attempts to request via the API algorithms, will reject accordingly).
Differential Revision: https://phabricator.services.mozilla.com/D286141
This patch moves relevant APIs that interact with the channel to a
separate ClassifierChannelUtils class from the URLClassifierCommon.
The ClassifierChannelUtils shares between the UrlClassifier and
the ContentClassifier.
Differential Revision: https://phabricator.services.mozilla.com/D301027