Commit Graph
414 Commits
Author SHA1 Message Date
velzie 673a67963e initial commit for wasm work 2026-06-15 19:20:19 -04:00
Atila Butkovits 08c4c75efd Revert "Bug 2045635 - Validate more fields for nsDocShellLoadState. r=nika" for causing failures at browser_open_docgroup.js.
This reverts commit b03ef05776.
2026-06-11 18:38:53 +00:00
Vincent Hilla b03ef05776 Bug 2045635 - Validate more fields for nsDocShellLoadState. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D305101
2026-06-11 16:11:34 +00:00
Tom Schuster 78fde32ae2 Bug 2046770 - Use MOZ_TRY for nsContentSecurityManager::doContentSecurityCheck. r=dom-core-reviewers,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D306134
2026-06-11 14:22:38 +00:00
Valentin Gosu c6df7f7d8a 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 18:52:47 +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
Eemeli Aro 2fba51b7e5 Bug 2024854 Part 4 - Set connect-src and other behaviour for text content policy. r=tschuster
Differential Revision: https://phabricator.services.mozilla.com/D295489
2026-05-06 07:24:06 +00:00
rperta c1b532f543 Revert "Bug 2024854 Part 15 - Fix and enable import-text WPT tests. r=dminor" for causing python-telemetry failures
This reverts commit cdddcc0cff.

This reverts commit d818e0fa08.

This reverts commit 7fe31f22c7.

This reverts commit 9d5be194ed.

This reverts commit e0fba2c9ac.

Revert "Bug 2024854 Part 10 - Create text modules: script. r=dminor"

This reverts commit dd57815041.

This reverts commit 409b1063aa.

This reverts commit cd7afbc8ee.

This reverts commit 03b66bc4f0.

This reverts commit c1b7e2177a.

This reverts commit 4696b1602f.

This reverts commit 21f4777b22.

This reverts commit 00eab305c3.

This reverts commit 10d0e76a4f.

This reverts commit e1746ab8a2.
2026-04-29 20:12:13 +00:00
Eemeli Aro 21f4777b22 Bug 2024854 Part 4 - Set connect-src and other behaviour for text content policy. r=tschuster
Differential Revision: https://phabricator.services.mozilla.com/D295489
2026-04-29 19:51:55 +00:00
agoloman 7d26e00ef8 Revert "Bug 1895528 - Removing security.data_uri.block_toplevel_data_uri_navigations pref r=gregp,extension-reviewers,devtools-reviewers,sessionstore-reviewers,akulyk,nchevobbe,sthompson,robwu,dom-core,firefox-build-system-reviewers,smaug,ahochheiden,tschuster,whimboo" for causing bc failures.
This reverts commit c7739b5a65.
2026-04-15 23:13:58 +00:00
Joe Cardoso c7739b5a65 Bug 1895528 - Removing security.data_uri.block_toplevel_data_uri_navigations pref r=gregp,extension-reviewers,devtools-reviewers,sessionstore-reviewers,akulyk,nchevobbe,sthompson,robwu,dom-core,firefox-build-system-reviewers,smaug,ahochheiden,tschuster,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D274022
2026-04-15 22:09:17 +00:00
Emilio Cobos Álvarez 5016086e1a Bug 2025089 - Remove some includes from nsINode.h and Element.h. r=dom-core,dom-storage-reviewers,firefox-svg-reviewers,janv,smaug
Differential Revision: https://phabricator.services.mozilla.com/D289049
2026-03-22 23:45:55 +00:00
Adam Vandolder dd7184fd48 Bug 1892551 - Part 2: Remove SessionHistoryInParent conditionals. r=dom-core,farre,core-sessionstore-reviewers,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D208061
2026-03-18 17:26:15 +00:00
Sylvestre Ledru 9eb1a31a98 Bug 2023419 - Remove Emacs/Vim modelines from dom/ r=emilio,media-playback-reviewers,webidl,padenot
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287843
2026-03-16 21:02:32 +00:00
serge-sans-paille b093ca6e20 Bug 2020581 - Replace copy assignment by move assignment in dom/ r=media-playback-reviewers,webrtc-reviewers,dom-worker-reviewers,dom-core,asuth,padenot,smaug,bwc
Commit automatically generated through clang-tidy's
performance-use-std-move new pass.

- Maybe type has a dedicated move operator
- And TimingParams also have a dedicated move operator because of Maybe
  members
- OwningAnimationTarget benefits from being moved
- nsCOMPtr benefits from being moved
- std::vector benefits from being moved
- std::string benefits from being moved
- SMILTimeValueSpecParams benefits from being moved

Differential Revision: https://phabricator.services.mozilla.com/D285674
2026-03-05 00:58:38 +00:00
Andreea Silaghi df905fef77 Revert "Bug 2020587 - Replace copy assignment by move assignment in xpcom/ r=xpcom-reviewers,jstutte" for causing failures at TestFileSystemHelpers This reverts commit d3c7b9c4d1.
This reverts commit 38c02da27e.
2026-03-04 08:20:03 +00:00
serge-sans-paille 38c02da27e Bug 2020581 - Replace copy assignment by move assignment in dom/ r=media-playback-reviewers,webrtc-reviewers,dom-worker-reviewers,dom-core,asuth,padenot,smaug,bwc
Commit automatically generated through clang-tidy's
performance-use-std-move new pass.

- Maybe type has a dedicated move operator
- And TimingParams also have a dedicated move operator because of Maybe
  members
- OwningAnimationTarget benefits from being moved
- nsCOMPtr benefits from being moved
- std::vector benefits from being moved
- std::string benefits from being moved
- SMILTimeValueSpecParams benefits from being moved

Differential Revision: https://phabricator.services.mozilla.com/D285674
2026-03-04 07:00:30 +00:00
Alexandru Marc 66354d03a7 Revert "Bug 1895528 - Removing security.data_uri.block_toplevel_data_uri_navigations pref r=gregp,extension-reviewers,devtools-reviewers,sessionstore-reviewers,akulyk,nchevobbe,sthompson,robwu,dom-core,firefox-build-system-reviewers,smaug,ahochheiden,tschuster" for causing multiple failures
This reverts commit 08f53ac888.
2026-02-07 22:13:14 +00:00
Joe Cardoso 08f53ac888 Bug 1895528 - Removing security.data_uri.block_toplevel_data_uri_navigations pref r=gregp,extension-reviewers,devtools-reviewers,sessionstore-reviewers,akulyk,nchevobbe,sthompson,robwu,dom-core,firefox-build-system-reviewers,smaug,ahochheiden,tschuster
Differential Revision: https://phabricator.services.mozilla.com/D274022
2026-02-07 21:33:47 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00
Cristina Horotan 8a1b1970b7 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing Gtest failures on AlreadyAddRefed.h
This reverts commit e98adca292.
2025-10-21 16:16:29 +00:00
serge-sans-paille e98adca292 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 15:05:17 +00:00
Cristina Horotan aab924e90d Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing build bustage at nsBrowserApp.cpp
This reverts commit fd0ffa193c.
2025-10-21 10:44:13 +00:00
serge-sans-paille fd0ffa193c Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 09:44:11 +00:00
Narcis Beleuzu e1e6bbb1c9 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing bustages on Document.cpp
This reverts commit b23c15e927.
2025-10-21 06:34:58 +00:00
serge-sans-paille b23c15e927 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 06:01:36 +00:00
Tom Schuster ca0fd68d86 Bug 1987185 - Make security.disallow_privilegedabout_remote_script_loads atomic and more obviously disabled. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D264096
2025-09-11 13:44:27 +00:00
Daniel Holbert 433b77bc82 Bug 1985652: Use triggeringPrincipal rather than loadingPrincipal for CORS checks, if triggeringPrincipal is from an extension. r=smaug,emilio,extension-reviewers,robwu
This allows extensions to access their own content from scripts that they
injected into web pages, without that requested content being automatically
blocked due to failing CORS checks (since the Origin of the request is
the web page).

We have an existing pref 'extensions.content_web_accessible.enabled' whose
'false' value is meant to allow MV2 extensions to access their own resources
from their content-scripts (even if those resources aren't web-exposed). A
recent CORS strictness patch broke this use-case; so this patch relaxes the
strictness, specifically for extensions and specifically when that pref has
the permissive 'false' value.

While we're at it, this patch extends the related xpcshell test cover the case
where the pref is in its default/permissive 'false' configuration (to test the
regression being addressed by this patch), and to test that MV3 is strict under
that configuration. This patch also clarifies the other relevant pref for CORS
principal-selection to avoid implying that it's relevant to WebExtensions
(since it's not anymore).

Differential Revision: https://phabricator.services.mozilla.com/D262863
2025-08-29 23:46:39 +00:00
Daniel Holbert 8d70a22c4e Bug 1970490: Use loading principal (rather than triggering principal) for CORS checks, by default. r=smaug
This is essentially a backout of bug 1496505, putting its change behind a new
off-by-default about:config pref[1] for now, in case there are use cases that
require it.

[1] content.cors.use_triggering_principal

Differential Revision: https://phabricator.services.mozilla.com/D252611
2025-08-13 19:22:04 +00:00
Serban Stanca aaf7164586 Revert "Bug 1970490: Use loading principal (rather than triggering principal) for CORS checks, by default. r=smaug" for causing xpcshell failures in test_cors_preflight_dns_cache.js.
This reverts commit cb5435011e.
2025-08-12 01:51:05 +00:00
Daniel Holbert cb5435011e Bug 1970490: Use loading principal (rather than triggering principal) for CORS checks, by default. r=smaug
This is essentially a backout of bug 1496505, putting its change behind a new
off-by-default about:config pref[1] for now, in case there are use cases that
require it.

[1] content.cors.use_triggering_principal

Differential Revision: https://phabricator.services.mozilla.com/D252611
2025-08-12 00:22:44 +00:00
Serban Stanca d390290866 Revert "Bug 1947025 - Added test that checks cookies are sent on XHR upgrade requests. r=valentin,cookie-reviewers" for causing multiple failures.
This reverts commit ab7a0cc801.

This reverts commit c673024445.
2025-08-12 00:17:53 +00:00
edgul c673024445 Bug 1947025 - Moved cookie policy checks into the channel's AddCookiesToRequest to avoid not sending cookies with same-host XHR requests that were upgraded r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D246139
2025-08-11 22:11:07 +00:00
Emilio Cobos Álvarez 791917d8af Bug 1976665 - Sort headers in dom/. r=dom-core,media-playback-reviewers,webrtc-reviewers,dom-storage-reviewers,padenot,janv,smaug,jesup,jib
Most changes are automated. Relevant bit is dom/.clang-format. I had to
manually disable clang-format in a few places where importing external
files and so on that aren't self-contained, and fix a couple includes /
forward declarations.

Differential Revision: https://phabricator.services.mozilla.com/D256800
2025-08-05 11:47:34 +00:00
Fatih Kilic eed44c4862 Bug 1968607 - Part 1: Replace CSP with PolicyContainer. r=tschuster,webidl,smaug
We are making changes to many files. Very huge chunk of the changes are just renaming CSP -> PolicyContainer. Part 1 and part 2 are solely separated as frontend and backend. The unfortunate thing is, I mistakenly placed IDL changes in part 1, and many of those IDL changes affect frontend code too. I'm sorry for this inconvinience and hard to review patch(es).

(FWIW before this rewrite we had another patch stack. It is 25 patches and I believe isn't as comprehensive as this one. It also didn't replace CSP's inheritance but was copied alongside with CSP, but we decided to change our method and make policy conttainer contain CSP and copy it around after some discussion and reviews)

Differential Revision: https://phabricator.services.mozilla.com/D249248
2025-07-11 05:39:17 +00:00
Frederik Braun 1d638fc496 Bug 1973227 - part 1: remove disallowed privileged load prefs and keep defaults r=tschuster
Differential Revision: https://phabricator.services.mozilla.com/D254503
2025-06-23 13:36:54 +00:00
Fatih Kilic 8a0b62f360 Bug 1966691 - Set request mode for script loads r=necko-reviewers,tschuster,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D249808
2025-06-10 13:01:26 +00:00
Tom Schuster e709a4d123 Bug 1964754 - Remove nsIContentPolicy TYPE_OBJECT_SUBREQUEST. r=necko-reviewers,webdriver-reviewers,extension-reviewers,devtools-reviewers,valentin,robwu,whimboo,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D250027
2025-05-22 08:27:55 +00:00
Goloman Adrian 2c7bda9b59 Backed out 2 changesets (bug 1947025) for causing xpcshell failures. CLOSED TREE
Backed out changeset d370759e1ac2 (bug 1947025)
Backed out changeset 880e03717991 (bug 1947025)
2025-04-28 19:35:24 +03:00
edgul 2118795ba6 Bug 1947025 - Moved cookie policy checks into the channel's AddCookiesToRequest to avoid not sending cookies with same-host XHR requests that were upgraded r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D246139
2025-04-28 14:17:33 +00:00
kernp25 4d18975ff5 Bug 1945924 - Replace SchemeIsFoo functions with the inlined SchemeIs() call. r=valentin,emilio,necko-reviewers,geckoview-reviewers,anti-tracking-reviewers,core-sessionstore-reviewers,ohall,farre
No behavior change intended.

Differential Revision: https://phabricator.services.mozilla.com/D236756
2025-03-31 14:25:54 +00:00
Florian Quèze 9609e47f62 Bug 1879329 - script generated replacement of the GleanMetrics.h includes, r=chutten,valentin,media-playback-reviewers,cookie-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,rkraesig,emz,aabh,padenot.
Differential Revision: https://phabricator.services.mozilla.com/D234744
2025-01-21 11:21:45 +00:00
Otto Länd 8add92ac00 Bug 1942005: apply code formatting via Lando
# ignore-this-changeset
2025-01-16 17:05:38 +00:00
Frederik Braun 05636d6e65 Bug 1942005 - isolate logging for unexpected privileged loads, allow moz-safe-about scheme r=tschuster
Differential Revision: https://phabricator.services.mozilla.com/D234467
2025-01-16 15:56:03 +00:00
Jonatan Klemets d60f6391b3 Bug 1858078 - Part 1: Add nsIContentPolicy::{TYPE_JSON,TYPE_INTERNAL_JSON_PRELOAD} r=extension-reviewers,webidl,devtools-reviewers,dom-core,smaug,robwu,tschuster,nchevobbe,farre
Differential Revision: https://phabricator.services.mozilla.com/D229524
2024-12-12 17:39:18 +00:00
longsonr 140338cf7a Bug 1932125 - Use standard mime type type constants/defines rather than individual string literals r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D229488
2024-11-19 15:41:23 +00:00
Simon Friedberger 4fcd691190 Bug 1919544 - Do not HTTPS-First upgrade URLs with http:// scheme r=mak,necko-reviewers,urlbar-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228588
2024-11-13 17:15:57 +00:00
Sandor Molnar 9e0c14a80e Backed out changeset c4dfee1f9194 (bug 1919544) for causing bc failures @ browser_UrlbarInput_formatValue.js CLOSED TREE 2024-11-13 15:20:39 +02:00
Simon Friedberger 8eafd874fe Bug 1919544 - Do not HTTPS-First upgrade URLs with http:// scheme r=mak,necko-reviewers,urlbar-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228588
2024-11-13 11:44:43 +00:00