Commit Graph

4037 Commits

Author SHA1 Message Date
Natalia Csoregi
8c2521e9d5 Backed out 13 changesets (bug 1640839) for causing bustage on Element.cpp CLOSED TREE
Backed out changeset 179ceb82c9e5 (bug 1640839)
Backed out changeset 73f498a821f0 (bug 1640839)
Backed out changeset dc2d3d0e0365 (bug 1640839)
Backed out changeset ddc989ac0509 (bug 1640839)
Backed out changeset e595bb3feea8 (bug 1640839)
Backed out changeset c85aca04e27f (bug 1640839)
Backed out changeset 98e8e3a4047a (bug 1640839)
Backed out changeset 59ef180517db (bug 1640839)
Backed out changeset af2f5e293662 (bug 1640839)
Backed out changeset 89aa6d9dc598 (bug 1640839)
Backed out changeset 67b722a722f9 (bug 1640839)
Backed out changeset 24a9665c6ced (bug 1640839)
Backed out changeset d93f199385e9 (bug 1640839)
2024-03-01 18:23:08 +02:00
Peter Van der Beken
f295b0c979 Bug 1640839 - Add some helpers for enums to calculate the size and use it in EnumeratedArray. r=glandium,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201334
2024-03-01 14:31:09 +00:00
Peter Van der Beken
8d1c9ad39c Bug 1640839 - Move size template parameter for EnumeratedArray to the end. r=glandium,jgilbert,media-playback-reviewers,credential-management-reviewers,padenot,dimi
This will allow us to provide a default value for the size when some enum
helper traits are defined.

Differential Revision: https://phabricator.services.mozilla.com/D201333
2024-03-01 14:31:09 +00:00
Christoph Kerschbaumer
6222503141 Bug 1877195: Expand mixed-content download protection to all http downloads, r=freddyb,Gijs,anti-tracking-reviewers,pbz
Differential Revision: https://phabricator.services.mozilla.com/D200267
2024-03-01 13:04:39 +00:00
Gregory Pappas
1dfbfcfd07 Bug 1878401 - part 7 - Pass BrowsingContext to nsIFilePicker::Init in tests r=extension-reviewers,settings-reviewers,credential-management-reviewers,anti-tracking-reviewers,devtools-reviewers,sgalich,pbz,nchevobbe,zombie,migration-reviewers,mconley
Depends on D200551

Differential Revision: https://phabricator.services.mozilla.com/D200552
2024-02-28 21:29:39 +00:00
Sandor Molnar
3951121cc6 Backed out 8 changesets (bug 1878401, bug 1879041) for causing build bustages on widget/nsBaseFilePicker.cpp CLOSED TREE
Backed out changeset 2e2b8df3bdd6 (bug 1879041)
Backed out changeset 6d6952f9df2c (bug 1878401)
Backed out changeset 30b5bb590d3e (bug 1878401)
Backed out changeset 9a4b830334b9 (bug 1878401)
Backed out changeset 3c3d67f1fcb7 (bug 1878401)
Backed out changeset c83ba4026822 (bug 1878401)
Backed out changeset 6bcb670ce475 (bug 1878401)
Backed out changeset f263b196df96 (bug 1878401)
2024-02-28 17:56:48 +02:00
Gregory Pappas
8a677e7f39 Bug 1878401 - part 7 - Pass BrowsingContext to nsIFilePicker::Init in tests r=extension-reviewers,settings-reviewers,credential-management-reviewers,anti-tracking-reviewers,devtools-reviewers,sgalich,pbz,nchevobbe,zombie,migration-reviewers,mconley
Depends on D200551

Differential Revision: https://phabricator.services.mozilla.com/D200552
2024-02-28 15:07:46 +00:00
Frédéric Wang
b005b82248 Bug 1872657 - Add fetchpriority support for <link rel=preload as=image>. r=valentin,smaug,manuel
This patch adds fetchpriority support for `<link rel=preload as=image>`
and equivalent HTTP Link header. The fetchpriority value is passed from
where the link is parsed down to `NewImageChannel` where the priority
is initially set. Currently, the default equals PRIORITY_LOW, but is
decreased a bit if LOAD_BACKGROUND flag is set (this is always the case
for link preload images, see `imgLoader::LoadImage`). Later, the
priority can be increased again depending on the category (see
`imgRequest::BoostPriority`).

In order to minimize the changes, the new calculation is to keep the
initial setting to PRIORITY_LOW, adjust it using a new
`network.fetchpriority.adjustments.*` preference depending on the
fetchpriority attributes, and then preserve further adjustments for
LOAD_BACKGROUND and `BoostPriority`.

For the default value `fetchpriority=auto`, there is no adjustment
i.e. we continue to start with PRIORITY_LOW. `fetchpriority=low/high`
are respectively mapped to PRIORITY_LOW/PRIORITY_HIGH which is simple
and consistent with the "Image" cases from Google's web.dev article
https://web.dev/articles/fetch-priority. These values could of course
be revised in the future after more experiments.

This change is covered by the following tests below. The expectations
is modified to match what is described above (i.e. map to PRIORITY_LOW
or PRIORITY_HIGH with adjustment due to LOAD_BACKGROUND):
- `link-initial-preload-image.h2.html`
- `link-dynamic-preload-image.h2.html`
- `kPipeHeaderPreloadImageLinks`

Based on a patch by Mirko Brodesser (mbrodesser@igalia.com)

Differential Revision: https://phabricator.services.mozilla.com/D197493
2024-02-27 06:33:48 +00:00
Stanca Serban
b54de79827 Backed out changeset 621c8480cd35 (bug 1872657) for causing FetchPriority related bp-nu bustages in IconLoader.cpp. CLOSED TREE 2024-02-26 18:15:18 +02:00
Frédéric Wang
c7734232ca Bug 1872657 - Add fetchpriority support for <link rel=preload as=image>. r=valentin,smaug,manuel
This patch adds fetchpriority support for `<link rel=preload as=image>`
and equivalent HTTP Link header. The fetchpriority value is passed from
where the link is parsed down to `NewImageChannel` where the priority
is initially set. Currently, the default equals PRIORITY_LOW, but is
decreased a bit if LOAD_BACKGROUND flag is set (this is always the case
for link preload images, see `imgLoader::LoadImage`). Later, the
priority can be increased again depending on the category (see
`imgRequest::BoostPriority`).

In order to minimize the changes, the new calculation is to keep the
initial setting to PRIORITY_LOW, adjust it using a new
`network.fetchpriority.adjustments.*` preference depending on the
fetchpriority attributes, and then preserve further adjustments for
LOAD_BACKGROUND and `BoostPriority`.

For the default value `fetchpriority=auto`, there is no adjustment
i.e. we continue to start with PRIORITY_LOW. `fetchpriority=low/high`
are respectively mapped to PRIORITY_LOW/PRIORITY_HIGH which is simple
and consistent with the "Image" cases from Google's web.dev article
https://web.dev/articles/fetch-priority. These values could of course
be revised in the future after more experiments.

This change is covered by the following tests below. The expectations
is modified to match what is described above (i.e. map to PRIORITY_LOW
or PRIORITY_HIGH with adjustment due to LOAD_BACKGROUND):
- `link-initial-preload-image.h2.html`
- `link-dynamic-preload-image.h2.html`
- `kPipeHeaderPreloadImageLinks`

Based on a patch by Mirko Brodesser (mbrodesser@igalia.com)

Differential Revision: https://phabricator.services.mozilla.com/D197493
2024-02-26 15:03:58 +00:00
Sandor Molnar
b1d213acb7 Backed out changeset 8e21fdfc60f0 (bug 1868001) for causing mochitest failures at dom/tests/mochitest/general/test_resource_timing_cross_origin.html CLOSED TREE 2024-02-20 20:36:30 +02:00
Nika Layzell
ec657d1c80 Bug 1868001 - Ignore Content-Disposition if DONT_RETARGET is set, r=smaug
This patch modifies the behaviour of loads when the DONT_RETARGET
nsIURILoader flag is set, making them ignore the Content-Disposition
header. This means that loads which cannot trigger downloads will
attempt to display handleable content which would otherwise be
downloaded.

This keeps overall behaviour of object/embed elements more similar to
their behaviour pre-Fission, while allowing them to load attachment PDFs
and Images as-if they were being displayed by a plugin.

This patch does not change the existing behaviour around
unknown/unhandleable resource types in object/embed elements.
In Gecko, object/embed elements are prevented from triggering downloads
or external protocol handlers during their initial load. Other browser
engines can trigger a download for an unknown resource type (or
sometimes an attachment resource).

The new pref dom.navigation.object_embed.allow_retargeting can be
enabled to instead trigger a download when loading these resources
within an object/embed element.

Differential Revision: https://phabricator.services.mozilla.com/D201645
2024-02-20 17:33:57 +00:00
Gijs Kruitbosch
6168506717 Bug 1780071 - autofix violations of no-comparison-or-assignment-inside-ok in misc other folders r=webdriver-reviewers,necko-reviewers,sync-reviewers,profiler-reviewers,sgalich,whimboo,markh,kershaw,julienw
Differential Revision: https://phabricator.services.mozilla.com/D198978
2024-02-19 21:47:41 +00:00
Frédéric Wang
ede734680b Bug 1880528 - Introduce preference for fetch priority adjustment of <link rel=preload as=font/fetch>. r=valentin,necko-reviewers
This introduces preferences <link rel=preload as=font/fetch>.
See D201997 for the rationale, test coverage and why there is no
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D202047
2024-02-19 13:35:40 +00:00
Frédéric Wang
f3ac8a2b4f Bug 1880433 - Restore previous internal priority of <link rel=preload as=fetch>. r=valentin,necko-reviewers
In bug 1866277 we aligned internal priority of
`<link rel=preload as=fetch>` when `network.fetchpriority` is disabled
with the case of `fetchpriority=auto` (PRIORITY_HIGH), effectively
exposing a behavior change in M124. This commit restores the previous
behavior when `network.fetchpriority` is disabled (PRIORITY_NORMAL)
and instead aligns `fetchpriority=auto` with that value.

Differential Revision: https://phabricator.services.mozilla.com/D201944
2024-02-15 09:07:21 +00:00
John Bieling
df44528633 Bug 1875460 - Fallback to standalone application chooser window, if window.gBrowser.getTabDialogBox() is not available. r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D199089
2024-02-07 13:01:10 +00:00
Frédéric Wang
dfe20823f5 Bug 1866277 - Fix <link rel=preload as=fetch> priority when fetchpriority disabled. r=emilio
This commit aligns the internal priority of <link rel=preload as=fetch>
when fetchpriority support is disabled with the fetchpriority=auto case
when the support is enabled. Also aligns unreachable code in
LinkRelPreloadFetch with that value.

Differential Revision: https://phabricator.services.mozilla.com/D199877
2024-02-05 16:34:04 +00:00
Erik Nordin
2a01092c90 Bug 1875090 - Rename BrowserTestUtils.is_visible() to isVisible() r=Gijs,settings-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,translations-reviewers,sgalich,bytesized,sfoster
Renames all instances of the snake_case identifier to
camelCase to match more closely to idiomatic JavaScript
and to existing conventions throughout the code base.

Differential Revision: https://phabricator.services.mozilla.com/D198826
2024-01-19 02:15:33 +00:00
Emilio Cobos Álvarez
267ec889a9 Bug 1873967 - Remove DocGroup::TryToLoadIframesInBackground. r=sefeng
This is somewhat complex, untested, never shipped, and predates
fission.

Remove it to simplify the code.

Depends on D198183

Differential Revision: https://phabricator.services.mozilla.com/D198184
2024-01-10 22:33:17 +00:00
Nika Layzell
b18b3314a5 Bug 1873294 - Clean up logic for firing cross-process load events, r=smaug
Previously it may have been possible in some edge cases for us to send
`MaybeFireEmbedderLoadEvents` for a non-toplevel frame during docshell
tree teardown.

Differential Revision: https://phabricator.services.mozilla.com/D197825
2024-01-08 19:30:59 +00:00
Tom Schuster
346cecd51c Bug 1872839 - Remove aMimeTypeGuess parameter from nsIContentPolicy. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D197794
2024-01-08 15:47:42 +00:00
Mark Banner
7a4d095f30 Bug 1864821 - Replace PromiseUtils.defer() with Promise.withResolvers() in browser window scopes. r=Gijs,extension-reviewers,application-update-reviewers,rpl,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D197486
2024-01-05 09:22:33 +00:00
Tomislav Jovanovic
11996c6f38 Bug 1871991 - Required arguments after optional are not supported r=jesup
I reviewed all js callsites, and they always use all arguments,
so this should  be no-op.

Differential Revision: https://phabricator.services.mozilla.com/D197300
2024-01-04 02:06:08 +00:00
Bas Schouten
f9d9059cf6 Bug 1869835 - Part 1: Add code to emit ETW markers on Windows when a trace logger is enabled. r=canaltinova,profiler-reviewers
This adds code to emit ETW markers on windows. It supports all current
markers through a generic marker emitting schema. It also supports
additional payload and filtering for any markers that are updated to a
new compile-time marker schema system. Because of our abstraction layer
and cross-platform nature we have to manually create the TraceLogging
structs used and can't rely on their macro's, but this should give us a
very flexible and performant marker implementation on ETW.

Differential Revision: https://phabricator.services.mozilla.com/D196331
2023-12-21 18:17:40 +00:00
edgul
56971a7842 Bug 1603699 - Enable default URI pref. r=valentin,necko-reviewers,extension-reviewers,robwu
Depends on D195672

Differential Revision: https://phabricator.services.mozilla.com/D191240
2023-12-06 19:33:56 +00:00
Jonathan Watt
32ad191d1b Bug 1868029. Fix some references to the renamed BZ component "Core::Document Navigation". r=smaug,zeid
Mainly to fix https://firefox-source-docs.mozilla.org/mots/

Differential Revision: https://phabricator.services.mozilla.com/D195362
2023-12-04 14:37:04 +00:00
Benjamin VanderSloot
e72674d7b6 Bug 1525943 - Add associated to the identity UI - r=pbz,Gijs,nika,flod
Differential Revision: https://phabricator.services.mozilla.com/D193806
2023-11-30 18:32:48 +00:00
Joel Maher
29e80ac522 Bug 1859901 - Batch 18 - migrate rest of xpcshell.ini -> toml. r=aryx,extension-reviewers,application-update-reviewers,credential-management-reviewers,places-reviewers,profiler-reviewers,win-reviewers,robwu,julienw,nalexander,Standard8,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D194891
2023-11-30 16:14:52 +00:00
Mirko Brodesser
fadc450e48 Bug 1865610: part 10) Add fetchpriority attribute support for rel=preload as=fetch and rel=preload as=font. r=emilio,valentin
Previously, for `rel=preload as=fetch`, the internal priority,
`nsISupportsPriority`, was not adjusted. Now, the adjustment happens in
`FetchPreloader::CreateChannel`.

For `rel=preload as=font`, previously, the internal priority was always
set to high in `FontLoaderUtils::BuildChannelSetup`. Now, the internal
priority is a parameter, whose value potentially depends on the
`fetchpriority` attribute.
Note the minor correction of calling `SetPriority` instead of
`AdjustPriority` in `FontLoaderUtils::BuildChannelSetup`.

Differential Revision: https://phabricator.services.mozilla.com/D194205
2023-11-30 15:00:10 +00:00
Mirko Brodesser
c7f6b261d8 Bug 1865610: part 3) Add fetchpriority attribute support for preloaded stylesheets. r=smaug,emilio,necko-reviewers,jesup
Includes corresponding Link header fields.

Differential Revision: https://phabricator.services.mozilla.com/D191866
2023-11-23 14:36:12 +00:00
Tim Huang
b67e685242 Bug 1865707 - Change the STATE_BLOCKED_SUSPICIOUS_FINGERPRINTING flag of content blocking log. r=anti-tracking-reviewers,pbz
Differential Revision: https://phabricator.services.mozilla.com/D194131
2023-11-20 19:20:52 +00:00
Tim Huang
ef2c6c9ebc Bug 1863280 - Part 2: Adding STATE_BLOCKED_SUSPICIOUS_FINGERPRINTING to ContentBlockingLog. r=pbz,anti-tracking-reviewers
To record whether we have detected suspicious fingerprinting activities
to the ContentBlockingLog, we introduce a new ContentBlockingLog event
called STATE_BLOCKED_SUSPICIOUS_FINGERPRINTING.

Whenever a fingerprinting content blocking event gets recorded under an
origin, we check if this origin is conducting suspicious fingerprinting
activites. Then, we store this fact under the origin entry and notify
the STATE_BLOCKED_SUSPICIOUS_FINGERPRINTING event to indicate that there
is a suspicous fingerprinitng activity happening.

I need to move ContentBlockingLog::RecordLogInternal() from header to
cpp file to avoid include file dependency issue.

Differential Revision: https://phabricator.services.mozilla.com/D193454
2023-11-16 00:22:46 +00:00
Tom Schuster
c0eb5b24d2 Bug 1847990 - Font fingerprinting detection and telemetry. r=timhuang,jfkthame,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D192074
2023-11-13 10:05:22 +00:00
Tom Schuster
864f258ff2 Bug 1847990 - Canvas fingerprinting telemetry. r=timhuang,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189111
2023-11-13 10:05:22 +00:00
Sarah Clements
4a5c1cc860 Bug 1828334 r=Gijs,dveditz,extension-reviewers,fluent-reviewers,flod,robwu,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185671
2023-11-06 17:56:29 +00:00
Mark Banner
a033642737 Bug 1858148 - Remove Cu.importGlobalProperties from sjs files as it is no longer needed. r=mossop,webdriver-reviewers,necko-reviewers,search-reviewers,devtools-reviewers,anti-tracking-reviewers,sessionstore-reviewers,pbz,dao,daleharvey,valentin
Differential Revision: https://phabricator.services.mozilla.com/D190759
2023-11-04 09:29:27 +00:00
Cosmin Sabou
ef754fc8d1 Backed out changeset d7ba64895091 (bug 1828334) for causing talos damp hangs. 2023-11-03 03:10:29 +02:00
Sarah Clements
aa3f502d2a Bug 1828334 r=Gijs,dveditz,extension-reviewers,fluent-reviewers,flod,robwu
Differential Revision: https://phabricator.services.mozilla.com/D185671
2023-11-02 12:08:39 +00:00
Mirko Brodesser
1dfc60fefb Bug 1862185: change documentation of PreloadService to distinguish <link rel=preload> from speculative loads initiated by the parser. r=necko-reviewers,kershaw DONTBUILD
Clarifies that the speculative loads from the parser are meant.

Differential Revision: https://phabricator.services.mozilla.com/D192318
2023-11-01 09:29:34 +00:00
sunil mayya
8ce40ef93d Bug 1851992 - implement nsIThreadRetargetableStreamListener::OnDataFinished to multiple listeners. r=necko-reviewers,extension-reviewers,jesup,rpl
Differential Revision: https://phabricator.services.mozilla.com/D187833
2023-10-27 13:30:11 +00:00
Narcis Beleuzu
722f6a1679 Backed out 6 changesets (bug 1851992) for DT failure on browser_net_image_cache.js . CLOSED TREE
Backed out changeset 3ceaf46f8f55 (bug 1851992)
Backed out changeset c9d322362e22 (bug 1851992)
Backed out changeset 673df3f83249 (bug 1851992)
Backed out changeset 46e18c56dd39 (bug 1851992)
Backed out changeset f9f9143ac713 (bug 1851992)
Backed out changeset 38c40d735ab7 (bug 1851992)
2023-10-24 13:16:40 +03:00
sunil mayya
1acfb3f11f Bug 1851992 - implement nsIThreadRetargetableStreamListener::OnDataFinished to multiple listeners. r=necko-reviewers,extension-reviewers,jesup,rpl
Differential Revision: https://phabricator.services.mozilla.com/D187833
2023-10-24 01:48:09 +00:00
Marc Seibert
04d7ba785a Bug 1853418 - Prepare remaining tests.r=dao
Differential Revision: https://phabricator.services.mozilla.com/D190557
2023-10-18 10:15:34 +00:00
Cristina Horotan
ea9336a2ca Backed out 5 changesets (bug 1851992) for causing multiple failures
Backed out changeset d28399b3d947 (bug 1851992)
Backed out changeset 95e4df69007a (bug 1851992)
Backed out changeset fa61d4e76827 (bug 1851992)
Backed out changeset 79969d9eb5cd (bug 1851992)
Backed out changeset 03c17255f1af (bug 1851992)
2023-10-17 14:48:23 +03:00
sunil mayya
f350089afd Bug 1851992 - implement nsIThreadRetargetableStreamListener::OnDataFinished to multiple listeners. r=necko-reviewers,extension-reviewers,jesup,rpl
Differential Revision: https://phabricator.services.mozilla.com/D187833
2023-10-17 08:27:49 +00:00
Sylvestre Ledru
d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan
6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru
cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Cosmin Sabou
5d7a0c46bf Bug 1817727 - Disable test_filename_sanitize.js on mac because of permafailures. r=aryx DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D190974
2023-10-13 17:53:25 +00:00
Tom Marble
0cb91fe33e Bug 1855300 - convert .ini manifests to .toml: batch 11 remaining **/mochitest.ini r=jmaher,geckoview-reviewers,extension-reviewers,valentin,credential-management-reviewers,cookie-reviewers,sgalich,m_kato,robwu
Differential Revision: https://phabricator.services.mozilla.com/D190515
2023-10-13 02:32:24 +00:00