Commit Graph
2748 Commits
Author SHA1 Message Date
velzie 673a67963e initial commit for wasm work 2026-06-15 19:20:19 -04:00
Simon Farre 5e8b3e800f Bug 1991630 - Don't do Text Fragment processing for data documents r=jjaschke,dom-core-reviewers
Improves profiles on ES5 in SP3 by not doing text fragment processing
for data documents.

Differential Revision: https://phabricator.services.mozilla.com/D305835
2026-06-12 14:37:25 +00:00
agoloman c75e2e420f Revert "Bug 2020707, Bug 2020704 - Part 6: Update test expectations now that speculationrules scripts are supported. r=dom-core-reviewers,jjaschke" for causing bc failures @browser_misused_characters_in_strings.js.
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.
2026-06-12 06:28:05 +00:00
Adam Vandolder 5202943dc9 Bug 2020707 - Part 4: Unregister speculation rules when their script element is removed. r=dom-core-reviewers,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D303212
2026-06-12 04:48:32 +00:00
Adam Vandolder 28c7050de9 Bug 2020707 - Part 1: Allow speculation rules to be registered to the document from scripts. r=hsivonen,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D300195
2026-06-12 04:48:25 +00:00
Cosmin Sabou 1890f2de9f Revert "Bug 2035573 - Start focus navigation from selection if it is a descendant of focused element. r=vhilla,edgar" for mochitest failures @ test_dialogfocus.
This reverts commit baa46d0833.
2026-06-11 15:22:43 +00:00
Leo Tenenbaum baa46d0833 Bug 2035573 - Start focus navigation from selection if it is a descendant of focused element. r=vhilla,edgar
Differential Revision: https://phabricator.services.mozilla.com/D303899
2026-06-11 13:33:50 +00:00
pstanciu 08ab3e0286 Revert "Bug 2043845 - Disable FORCE_ALLOWED_DTD as it's unused in Firefox r=necko-reviewers,kershaw" for causing mochitests assertion faluires @ Document.cpp
This reverts commit f8b0b71202.
2026-06-10 14:29:56 +00:00
Valentin Gosu f8b0b71202 Bug 2043845 - Disable FORCE_ALLOWED_DTD as it's unused in Firefox r=necko-reviewers,kershaw
Putting it behind a pref as it's still used by Thunderbird

Differential Revision: https://phabricator.services.mozilla.com/D305473
2026-06-10 13:41:09 +00:00
Leo Tenenbaum 20a2702fed Bug 2045748 - Disable execCommand editing commands for EditContext. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D305213
2026-06-09 14:55:05 +00:00
Keith Cirkel dabb307cbf Bug 2045043 - Part 1 - Fixup final classes using _FINAL cycle collecting isupports macro in dom/base r=dom-core-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D305280
2026-06-09 11:17:25 +00:00
Bas Schouten a7628a666b Bug 2042784: Add interaction data to pageload event. r=denispal,canova
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
2026-06-07 06:09:10 +00:00
Daniel Holbert b9c26953f1 Bug 2044510: Pass already_AddRefed types by-value instead of by rvalue reference, in dom/base/. r=dom-core-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D304358
2026-06-05 21:06:35 +00:00
Emilio Cobos Álvarez cc359d1aa9 Bug 2044618 - Remove SheetParsingMode. r=layout-reviewers,dholbert
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
2026-06-05 01:03:23 +00:00
agoloman 861a985a35 Revert "Bug 2035573 - Start focus navigation from selection if it is a descendant of focused element. r=vhilla,edgar" for causing wpt failures @sequential-focus-navigation-starting-point.tentative.html.
This reverts commit 15f3930b2c.
2026-06-04 22:12:33 +00:00
Leo Tenenbaum 15f3930b2c Bug 2035573 - Start focus navigation from selection if it is a descendant of focused element. r=vhilla,edgar
Differential Revision: https://phabricator.services.mozilla.com/D303899
2026-06-04 21:17:44 +00:00
Jan-Niklas Jaeschke 4382eb11a8 Bug 2044990 - Lazily initialize Document::mFeaturePolicy. r=sfarre
Differential Revision: https://phabricator.services.mozilla.com/D304736
2026-06-04 20:28:35 +00:00
Jan-Niklas Jaeschke f6d95fd6e8 Bug 2044987 - Lazily initialize Document::mOnloadBlocker. r=dom-core-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D304735
2026-06-04 14:21:20 +00:00
Vincent Hilla 54dc16d087 Bug 2040160 - Reject srcdoc data on non-about:srcdoc URI loads. r=nika,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D301024
2026-06-03 12:00:09 +00:00
smayya 7ae63f93f5 Bug 1996495 - implement LNA restrictions for workers. r=necko-reviewers,dom-worker-reviewers,valentin,edenchuang!edenchuang,emz
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
2026-05-31 16:41:23 +00:00
Valentin Gosu 524d0b5cd5 Bug 2036929 - Hold strong ref while calling nsIStreamListener methods r=necko-reviewers,geckoview-reviewers,extension-reviewers,media-playback-reviewers,firefox-style-system-reviewers,emilio,padenot,robwu,nalexander,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D302601
2026-05-30 20:41:08 +00:00
Alexandru Marc 4eee8ec1e1 Revert "Bug 1996495: apply code formatting via Lando" for causing wpt failures @ dedicated-worker.tentative.https.html
This reverts commit 86f35d40b5.

Revert "Bug 1996495 - enable LNA WPT for workers. r=necko-reviewers,valentin"

This reverts commit 47f4e22f27.

Revert "Bug 1996495 - implement LNA restrictions for workers. r=necko-reviewers,dom-worker-reviewers,valentin,edenchuang!edenchuang,emz"

This reverts commit 0408a10c1f.

Revert "Bug 1996495 - set associated browsing context ID for workers initiated xhr request. r=edenchuang"

This reverts commit 3e60d7a97a.
2026-05-29 15:03:52 +00:00
smayya 0408a10c1f Bug 1996495 - implement LNA restrictions for workers. r=necko-reviewers,dom-worker-reviewers,valentin,edenchuang!edenchuang,emz
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
2026-05-29 11:10:21 +00:00
Simon Farre 5107077c7d Bug 1463402: Implement Picture In Picture API r=dom-core,webidl,emilio,smaug,devtools-reviewers,ochameau
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
2026-05-29 10:10:44 +00:00
Alexandru Marc 29317bc76d Revert "Bug 1996495: apply code formatting via Lando" for causing build bustages @ WorkerPrivate
This reverts commit 10c416b4ac.

Revert "Bug 1996495 - enable LNA WPT for workers. r=necko-reviewers,valentin"

This reverts commit 36fd6a950b.

Revert "Bug 1996495 - implement LNA restrictions for workers. r=necko-reviewers,dom-worker-reviewers,valentin,edenchuang!edenchuang,emz"

This reverts commit 61f30ab94e.

Revert "Bug 1996495 - set associated browsing context ID for workers initiated xhr request. r=edenchuang"

This reverts commit 7aaf68ba05.
2026-05-29 05:17:20 +00:00
smayya 61f30ab94e Bug 1996495 - implement LNA restrictions for workers. r=necko-reviewers,dom-worker-reviewers,valentin,edenchuang!edenchuang,emz
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
2026-05-29 04:52:20 +00:00
Serban Stanca 4f93cc4440 Revert "Bug 1463402: Flip pref for dom.media-pip.enabled r=dom-core,smaug,webidl" for causing Picture-in-Picture related wpt failures.
This reverts commit a958b57333.

This reverts commit 958e255d90.

This reverts commit 7df07e6a22.

This reverts commit 160de9227f.

This reverts commit dbf90cfe0d.

This reverts commit c9cd940b88.

This reverts commit 3842c6faa4.

This reverts commit 2e3ab76d53.

This reverts commit 2beb01dcef.
2026-05-29 02:57:03 +00:00
Justin Link 121593b924 Bug 1889737: Ensure that we don't report underflowed values in largest_contentful_paint_* metrics r=denispal
Differential Revision: https://phabricator.services.mozilla.com/D300590
2026-05-28 23:50:42 +00:00
Bas Schouten f005018d64 Bug 2042702: Move pageload event to page destruction. r=denispal
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
2026-05-28 19:33:16 +00:00
Cosmin Sabou 60ff16183f Revert "Bug 1996495: apply code formatting via Lando" for causing LNA related wpt failures.
This reverts commit d658d3d449.

Revert "Bug 1996495 - enable LNA WPT for workers. r=necko-reviewers,valentin"

This reverts commit 19569886a1.

Revert "Bug 1996495 - implement LNA restrictions for workers. r=necko-reviewers,dom-worker-reviewers,valentin,edenchuang!edenchuang,emz"

This reverts commit 6bbb724362.

Revert "Bug 1996495 - set associated browsing context ID for workers initiated xhr request. r=edenchuang"

This reverts commit 5d7f6fd017.
2026-05-28 12:10:23 +00:00
smayya 6bbb724362 Bug 1996495 - implement LNA restrictions for workers. r=necko-reviewers,dom-worker-reviewers,valentin,edenchuang!edenchuang,emz
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
2026-05-28 08:47:20 +00:00
Simon Farre 3842c6faa4 Bug 1463402: Implement Picture In Picture API r=dom-core,webidl,emilio,smaug,devtools-reviewers,ochameau
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
2026-05-28 07:50:54 +00:00
Atila Butkovits 6a0948b707 Revert "Bug 1996495: apply code formatting via Lando" for causing failures at service-worker.tentative.https.html.
This reverts commit e11dfbe955.

Revert "Bug 1996495 - enable LNA WPT for workers. r=necko-reviewers,valentin"

This reverts commit 8d82210e58.

Revert "Bug 1996495 - implement LNA restrictions for workers. r=necko-reviewers,dom-worker-reviewers,valentin,edenchuang!edenchuang,emz"

This reverts commit db31e6cd5c.

Revert "Bug 1996495 - set associated browsing context ID for workers initiated xhr request. r=edenchuang"

This reverts commit ea0ef3843a.
2026-05-27 18:54:44 +00:00
iulian moraru ed06c06b94 Revert "Bug 1463402: Flip pref for dom.media-pip.enabled r=dom-core,smaug,webidl" for causing dt failures on browser_webconsole_object_inspector_entries.js.
This reverts commit d388c643aa.

Revert "Bug 1463402: Add WPT for unloading steps r=smaug"

This reverts commit 8f4e3752fd.

Revert "Bug 1463402: Add additional Shadow DOM tests r=smaug"

This reverts commit 3192646985.

Revert "Bug 1463402: Add WPT for exit-when-having-pip ordering is observed r=smaug"

This reverts commit 0801a3e700.

Revert "Bug 1463402: Add WPT for iframe PIP attribute testing r=dom-core,smaug"

This reverts commit 9c82850502.

Revert "Bug 1463402: Implement Desktop support for PIP API r=kpatenio,mconley"

This reverts commit d8d8edc96c.

Revert "Bug 1463402: Implement Picture In Picture API r=dom-core,webidl,emilio,smaug"

This reverts commit f5d05b6f48.

Revert "Bug 1463402: Implement pseudo class :picture-in-picture r=firefox-style-system-reviewers,emilio"

This reverts commit f28624cdaf.

Revert "Bug 1463402: Add pref for PIP API r=dom-core,smaug"

This reverts commit ddfd358304.
2026-05-27 14:54:42 +00:00
Emilio Cobos Álvarez 9576c85640 Bug 2025058 - Ensure the fullscreen element is allowed before setting it sync. r=sfarre,dom-core,smaug
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
2026-05-27 13:37:47 +00:00
smayya db31e6cd5c Bug 1996495 - implement LNA restrictions for workers. r=necko-reviewers,dom-worker-reviewers,valentin,edenchuang!edenchuang,emz
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
2026-05-27 12:31:39 +00:00
Simon Farre f5d05b6f48 Bug 1463402: Implement Picture In Picture API r=dom-core,webidl,emilio,smaug
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
2026-05-27 11:14:06 +00:00
Manuel Bucher 3a590321aa Bug 2036773 - Don't persist ABA permission in permission manager r=bvandersloot
Differential Revision: https://phabricator.services.mozilla.com/D299999
2026-05-26 17:19:20 +00:00
Serban Stanca 9128793aef Revert "Bug 1463402: Flip pref for dom.media-pip.enabled r=dom-core,smaug,webidl" for causing multiple failures.
This reverts commit c59eb47e0f.

This reverts commit 21c5864802.

This reverts commit 23e4f81816.

This reverts commit 21b4ab6538.

This reverts commit c37750feba.

This reverts commit 317a79f02b.

This reverts commit 70a87cf3ed.

This reverts commit 81eed66bbb.

This reverts commit fdb187c0b7.
2026-05-26 14:06:00 +00:00
Simon Farre 70a87cf3ed Bug 1463402: Implement Picture In Picture API r=dom-core,webidl,emilio,smaug
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
2026-05-26 12:38:59 +00:00
Serban Stanca b30fd6daec Revert "Bug 1996495: apply code formatting via Lando" for causing wpt failures in update-not-allowed.https.html.
This reverts commit fd438eff6a.

This reverts commit 05652d8847.

This reverts commit dea366bd49.

This reverts commit 8b34db8cbb.
2026-05-26 12:16:40 +00:00
smayya dea366bd49 Bug 1996495 - implement LNA restrictions for workers. r=necko-reviewers,dom-worker-reviewers,valentin,edenchuang!edenchuang,emz
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
2026-05-26 10:22:44 +00:00
Serban Stanca 1643f0215d Revert "Bug 1463402: Flip pref for dom.media-pip.enabled r=dom-core,smaug" for causing multiple failures.
This reverts commit 63b2bf96a3.

This reverts commit b3671a33e5.

This reverts commit f91c00df98.

This reverts commit 41603be05b.

This reverts commit 8a0c3b75e0.

This reverts commit 28caa069ef.

This reverts commit ae7d9fe07a.

This reverts commit f28faf6aec.

This reverts commit 21de73ae0d.
2026-05-26 10:10:18 +00:00
Simon Farre ae7d9fe07a Bug 1463402: Implement Picture In Picture API r=dom-core,webidl,emilio,smaug
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
2026-05-26 08:45:51 +00:00
Emilio Cobos Álvarez 2d22af877c Bug 2042041 - Make dom.timeout.defer_during_load about just timeouts. r=smaug
The current pref affects other stuff like postMessage and so. Centralize
the check in nsGlobalWindowInner.

Differential Revision: https://phabricator.services.mozilla.com/D302240
2026-05-25 09:01:46 +00:00
Tim Huang 21a72ace6c Bug 2038663 - Part 1: Introduce ClassifierChannelUtils and move relevant APIs. r=bvandersloot
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
2026-05-22 07:57:54 +00:00
Keith Cirkel 0c5749c30d Bug 2029974 - Implement new stacking logic for popover=hint r=dom-core,farre,smaug
Differential Revision: https://phabricator.services.mozilla.com/D292397
2026-05-20 16:14:48 +00:00
Tom Schuster fc182c2d61 Bug 2038660 - Automatically enforce a baseline CSP for all chrome: documents. r=smaug,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D299745
2026-05-20 14:25:53 +00:00
Atila Butkovits 03cacc0e27 Revert "Bug 2029974 - Implement new stacking logic for popover=hint r=dom-core,farre,smaug" for causing leaks complaining about BaseProfilerMarkersPrerequisites.h.
This reverts commit f74dd68fbe.
2026-05-20 10:56:22 +00:00
Keith Cirkel f74dd68fbe Bug 2029974 - Implement new stacking logic for popover=hint r=dom-core,farre,smaug
Differential Revision: https://phabricator.services.mozilla.com/D292397
2026-05-20 09:03:45 +00:00