Commit Graph

4739 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
db018846ae Bug 1968920 - Add an internal -moz-symbolic-icon image that draws a symbolic icon respecting the context fill. r=stransky,desktop-theme-reviewers,dao, a=dmeehan
Factor out the nsIconChannel symbolic lookup, and expose it to
nsImageRenderer to do the icon look-ups with the right CSS color.

Differential Revision: https://phabricator.services.mozilla.com/D252791
2025-06-09 16:46:56 +00:00
Joel Maher
7e69b821f2 Bug 1967293 - Update mochitest manifest annotations to support Ubuntu 24.04. r=aryx,webcompat-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,sessionstore-reviewers,profiler-reviewers,dom-storage-reviewers,twisniewski,asuth,accessibility-frontend-reviewers,julienw,dimi,morgan,mconley,ochameau,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D250070
2025-05-23 20:13:29 +00:00
Tom Schuster
3f48655456 Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D250182
2025-05-21 15:21:52 +00:00
Serban Stanca
071240c3d9 Revert "Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw" for causing multiple failures.
This reverts commit b9a9491a35.
2025-05-21 13:34:54 +00:00
Tom Schuster
b9a9491a35 Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D250182
2025-05-21 12:24:10 +00:00
Tom Schuster
aeffc01823 Bug 1967261 - Create nsIconChannel with the correct nsILoadInfo from the beginning. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D250123
2025-05-21 08:58:08 +00:00
Sylvestre Ledru
8ae54ea4f9 Bug 1519636 - Reformat recent changes to the Google coding style r=geckoview-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,nalexander,gstoll,tcampbell,janv,julienw
Updated with clang-format version 19.1.7 (taskcluster-DYvBxDZJRVqTi8E7pTSJAQ)

Differential Revision: https://phabricator.services.mozilla.com/D249880
2025-05-17 19:11:13 +00:00
Timothy Nikkel
06ff856805 Bug 1966780. Land a test for bug 1960856 (grayscale png with cicp chunk). r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D249685
2025-05-16 01:25:33 +00:00
Timothy Nikkel
684f118472 Bug 1965106. Fix ClippedImage and DynamicImage GetIntrinsicSizeInAppUnits to actually be in app units. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D249234
2025-05-15 02:37:33 +00:00
Sandor Molnar
7cd700e4f7 Revert "Bug 1965106. Fix ClippedImage and DynamicImage GetIntrinsicSizeInAppUnits to actually be in app units. r=dholbert" for causing build bustages @ ClippedImage.cpp
This reverts commit db08ac1033.
2025-05-15 02:09:39 +00:00
Timothy Nikkel
db08ac1033 Bug 1965106. Fix ClippedImage and DynamicImage GetIntrinsicSizeInAppUnits to actually be in app units. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D249234
2025-05-14 21:19:54 +00:00
Calixte Denizet
4d77a2923c Bug 1965813 - Add the possibility to decode cmyk jpeg images coming from pdf files r=aosmond,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D248887
2025-05-13 16:45:14 +00:00
Emilio Cobos Álvarez
5b756eb47e Bug 1965779 - Remove an assert for a removed member that I missed. 2025-05-12 20:15:58 +00:00
Emilio Cobos Álvarez
f088656bc3 Bug 1965779 - Remove GTK iconSize / iconState from icon URI. r=stransky,settings-reviewers
Icon state is now unused (and wasn't used anyhow). Icon sizes are
hardcoded in GTK as per: https://docs.gtk.org/gtk3/enum.IconSize.html

So we can migrate the few usages left to the actual sizes, and remove
the supporting code.

Differential Revision: https://phabricator.services.mozilla.com/D248866
2025-05-12 19:10:42 +00:00
Emilio Cobos Álvarez
621f242334 Bug 1964046 - Add support for scale and color-scheme to moz-icon:// URIs on GTK. r=stransky
Use symbolic icons where possible for this.

Differential Revision: https://phabricator.services.mozilla.com/D247587
2025-05-12 10:22:21 +00:00
Timothy Nikkel
69dee15e68 Bug 1965623. Update bmpsuite tests to 2.8. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D248692
2025-05-12 08:58:02 +00:00
Timothy Nikkel
acc1a26727 Bug 1965624. Allow corrupt bmp files that say the image data starts in the color table. r=gfx-reviewers,aosmond
Chrome decides that the image data offset overrides the size of the color palette and shortens the palete: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_reader.cc;l=764;drc=9596b537e435c5c23d247cb7d9925d81e8f7707e

This patch makes us read the overlapping data in the color palette both for the color palette and as image data. Even if it's a bit weird, this seems like a reasonable way to handle these kind of bmps.

Differential Revision: https://phabricator.services.mozilla.com/D248691
2025-05-10 23:00:07 +00:00
Daniel Holbert
fd9ebf44e3 Bug 1965114 part 3: Use new imgIContainer intrinsicSize getter in place of width/height in a few places. r=tnikkel
This just demonstrates/tests proper use of the new API.

Differential Revision: https://phabricator.services.mozilla.com/D248527
2025-05-09 03:37:36 +00:00
Daniel Holbert
a1b0d56c0a Bug 1965114 part 2: Add a new imgIContainer.intrinsicSize attr as a shorthand for getting width & height. r=tnikkel
This is mostly just a convenience shorthand to avoid running the same
boilerplate/error-checking code in the implementation of the 'width' and
'height' attributes, for the benefit of callers that need both sizes.  But,
beyond that convenience: this also lets us elegantly express the case where an
image simply lacks an intrinsic width and/or height (not due to any error, but
simply because it's e.g. an SVG that has no preferred size in either or both of
its axes).  This is a state we'll need to be able to detect and give special
treatment to in a forthcoming patch for bug 1935269.

Differential Revision: https://phabricator.services.mozilla.com/D248526
2025-05-09 03:37:32 +00:00
Daniel Holbert
dda6b1197c Bug 1965114 part 1: Refactor out a static helper from VectorImage::GetWidth/GetHeight. r=tnikkel
This patch doesn't change behavior; it just refactors out some commont logic
into a helper (so that we can add another call to this same helper in a later
patch in this series).

Differential Revision: https://phabricator.services.mozilla.com/D248525
2025-05-09 03:37:29 +00:00
Daniel Holbert
47b8f999ed Bug 1965282: Rename imgIContainer::intrinsicSize to intrinsicSizeInAppUnits. r=tnikkel
This patch doesn't change behavior; it's just a rename.

Without this, it's easy to get confused and assume that img.intrinsicSize would
just be a shorthand for img.width and img.height -- but it's not. (It has
different units from the 'width' and 'height' attributes, and in some cases --
e.g. the VectorImage implementation -- it queries for its answer in a different
way from how 'width' and 'height' do.

(I'm doing this partly because I'll soon be adding a new attribute that *does*
just represent img.width and img.height, and that new attribute will also be
named something like "intrinsicSize"; and I want to minimize confusion between
that new attribute and this existing one.)

Differential Revision: https://phabricator.services.mozilla.com/D248492
2025-05-09 03:37:25 +00:00
serge-sans-paille
bf3516e81e Bug 1964489 - Avoid duplication in NS_DECLARE_STATIC_IID_ACCESSOR / NS_DEFINE_STATIC_IID_ACCESSOR r=nika,necko-reviewers,media-playback-reviewers,places-reviewers,win-reviewers,dom-storage-reviewers,xpcom-reviewers,gstoll,janv,emilio,padenot,valentin,asuth
In modern C++, static constexpr member variables are automatically
inline (aka weak) so the template trick is not needed. This also avoid
duplication and reduces the amount of parsed code. No impact on
generated binary (actually: smaller debuginfo, close to identical
binary).

Differential Revision: https://phabricator.services.mozilla.com/D247825
2025-05-08 08:05:51 +00:00
Daniel Holbert
c1e56ab969 Bug 1965115: Reorder the imgIContainer portion of VectorImage.cpp to match declaration order in imgIContainer.idl. r=tnikkel
This patch doesn't change behavior; it's just reordering function definitions
to match the order in imgIContainer.idl.

Differential Revision: https://phabricator.services.mozilla.com/D248365
2025-05-08 05:52:52 +00:00
Daniel Holbert
fa009b4fc1 Bug 1964813: Clamp VectorImage::GetWidth and GetHeight return value to be non-negative. r=layout-reviewers,tnikkel
An SVG image document might declare a negative value for `width` and/or
`height` on the root <svg> node, but we clamp that to be nonnegative for actual
layout purposes, and we should similarly clamp it in the imagelib size getters.
Otherwise we potentially expose bogus values via the web-exposed naturalWidth
and naturalHeight APIs.

Differential Revision: https://phabricator.services.mozilla.com/D248149
2025-05-08 05:52:48 +00:00
Joel Maher
397e8ec3f4 Bug 1961608 - Green up macosx 15.30. r=aryx,necko-reviewers,extension-reviewers,media-playback-reviewers,credential-management-reviewers,sync-reviewers,anti-tracking-reviewers,sessionstore-reviewers,places-reviewers,omc-reviewers,profiles-reviewers,pdahiya,alwu,jhirsch,mtigley,skhamis,timhuang,valentin,robwu,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D246100
2025-04-22 18:12:28 +00:00
Timothy Nikkel
b8004617a2 Bug 1960856. Grayscale PNGs with cicp chunk need to convert to RGB before qcms color manages it. r=gfx-reviewers,lsalzman
qcms expects rgb data for profiles created from cicp info. This mirrors what we do for icc profiles below.

Differential Revision: https://phabricator.services.mozilla.com/D245887
2025-04-17 11:19:00 +00:00
Lucas Chollet
8bbb6fe514 Bug 1862235 Remove non-compliant behavior with tRNS chunks. r=tnikkel
In previous editions of the spec, out-of-range values were not
considered. As this is now specified, we should let libpng do the right
thing and not inject non-compliant behavior.

Differential Revision: https://phabricator.services.mozilla.com/D211677
2025-04-15 15:08:40 +00:00
Rob Wu
62248a8bcc Bug 1953004 - Run test-manifest-toml --fix on all toml files in the trees r=credential-management-reviewers,places-reviewers,desktop-theme-reviewers,Standard8,devtools-reviewers,hjones,jmaher,jdescottes,dimi,necko-reviewers,sidebar-reviewers,jsudiaman,kershaw
This diff was generated as follows:

List all toml files in the tree:

`find * -name '*.toml' > /tmp/toml`

Manually edited /tmp/toml to drop non-relevant entries (objdir).

Ran the toml linter for all files:

`cat /tmp/toml | xargs ./mach lint -l test-manifest-toml --fix`

Differential Revision: https://phabricator.services.mozilla.com/D240948
2025-04-14 08:30:13 +00:00
Florian Quèze
9885783942 Bug 1956726 - remove leftover Telemetry.h includes in .cpp files, r=chutten,geckoview-reviewers,cookie-reviewers,win-reviewers,dom-storage-reviewers,gstoll,valentin,m_kato,janv.
Differential Revision: https://phabricator.services.mozilla.com/D244351
2025-04-08 13:03:02 +00:00
Florian Quèze
f861f3fa68 Bug 1956726 - remove leftover Telemetry.h includes in header files, r=chutten,places-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D244350
2025-04-08 13:03:01 +00:00
Lee Salzman
e1fbc38338 Bug 1958191 - Update Skia to m136. r=aosmond
This looks like a fairly mild update with some of our local patches
being upstreamed and otherwise reasonably small amounts of code churn.

Differential Revision: https://phabricator.services.mozilla.com/D244290
2025-04-04 03:46:00 +00:00
Timothy Nikkel
5d3111722f Bug 1944122. Make sure the first (vector) part of a multipart images gets load complete. r=emilio
In bug 1862059 we ensured that every (vector) part of a multipart image got load complete before it was made the current part. This missed the first part because it was never the next part, it just become the current part immediately. This was good enough to fix all cases except where the multipart image reached a finite end point (which would then send the final part load complete and hit the same duplicate final part load complete bug).

Differential Revision: https://phabricator.services.mozilla.com/D241816
2025-04-03 02:03:41 +00:00
Joel Maher
34dc8fc793 Bug 1957450 - cleanup chrome.toml files to remove old conditions and standardize remaining conditions. r=aryx,devtools-reviewers,fxview-reviewers,profiler-reviewers,omc-reviewers,migration-reviewers,backup-reviewers,julienw,nchevobbe,mconley,pdahiya,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D243709
2025-04-01 21:16:45 +00:00
Emilio Cobos Álvarez
0120f86928 Bug 1957490 - Use ShouldClearEntry in imgLoader too. r=arai
No behavior change intended.

Differential Revision: https://phabricator.services.mozilla.com/D243714
2025-04-01 08:27:02 +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
Emilio Cobos Álvarez
757741e34c Bug 1955624 - Remove now unused OriginAttributes argument to ImageCacheKey constructor. r=arai
Just drive-by cleanup, the regressing bug made these unused.

Differential Revision: https://phabricator.services.mozilla.com/D242639
2025-03-23 17:11:47 +00:00
Emilio Cobos Álvarez
dc708bbcee Bug 1955624 - Don't include partitioned principal hash on image cache key hash. r=arai
As the hash can change during the principal's lifetime, see bug 1955775.

Differential Revision: https://phabricator.services.mozilla.com/D242638
2025-03-23 17:11:46 +00:00
Mike Hommey
61f8be5d7a Bug 1949947 - Adjust images tests for the new libz-rs release. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D241124
2025-03-19 20:11:18 +00:00
Tooru Fujisawa
8fa3cc1097 Bug 1947158 - Add url option to ChromeUtils.clearResourceCache. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D238357
2025-03-18 09:57:57 +00:00
Tooru Fujisawa
893c87646e Bug 1948875 - Part 1: Add static imgLoader::ClearCache and refactor IPC. r=tnikkel
In order to clear cache from ChromeUtils.clearResourceCache with variuos
filtering, imgLoader needs a method that are adaptive to the current process,
where in the parent process, clear all processes' cache,
and in the content process, clear the cache in the process.

Refactored the cache methods based on single static method and single IPC
method, this is also necessary to extend the ChromeUtils.clearResourceCache in
bug 1947158.

Differential Revision: https://phabricator.services.mozilla.com/D239138
2025-03-18 02:03:31 +00:00
Emilio Cobos Álvarez
2cc4039e44 Bug 1954134 - Simplify ImageCacheKey partitioning. r=necko-reviewers,valentin,arai
Use the same scheme as the JS and CSS caches:

https://searchfox.org/mozilla-central/rev/5c2888b35d56928d252acf84e8816fa89a8a6a61/layout/style/Loader.cpp#2341
https://searchfox.org/mozilla-central/rev/5c2888b35d56928d252acf84e8816fa89a8a6a61/dom/script/ScriptLoader.cpp#329

(And fonts, and plenty of others)

Differential Revision: https://phabricator.services.mozilla.com/D241664
2025-03-15 15:36:25 +00:00
Timothy Nikkel
73295ba039 Bug 1951423. Use the sRGB transfer characteristics for BT.709, BT.601, and BT.2020. r=gfx-reviewers,aosmond
That is what other apps are doing.

Differential Revision: https://phabricator.services.mozilla.com/D240850
2025-03-14 10:06:18 +00:00
Goloman Adrian
6fa58a5cca Backed out changeset 00823f809729 (bug 1951423) for causing build bustages @Decoder.cpp. 2025-03-14 08:13:09 +02:00
Timothy Nikkel
d1ff842387 Bug 1951423. Use the sRGB transfer characteristics for BT.709, BT.601, and BT.2020. r=gfx-reviewers,aosmond
That is what other apps are doing.

Differential Revision: https://phabricator.services.mozilla.com/D240850
2025-03-13 21:13:46 +00:00
Alex Franchuk
da658fa4b2 Bug 1942129 pt4 - Convert old shmem call sites to use the new shmem classes r=ipc-reviewers,media-playback-reviewers,padenot,lsalzman,aosmond,nika
While much of this is simply converting code (and removing extraneous
`size` parameters), toolkit/xre/GeckoArgs.{h,cpp} has some significant
changes to support sending read-only handles (which is all we need!).

Differential Revision: https://phabricator.services.mozilla.com/D236750
2025-03-04 22:11:12 +00:00
Butkovits Atila
2406ce261c Backed out 8 changesets (bug 1942129) for causing bustages at SharedMemoryMapping.h. CLOSED TREE
Backed out changeset 8d9053f1c203 (bug 1942129)
Backed out changeset 393e3c507c27 (bug 1942129)
Backed out changeset 8240d353d224 (bug 1942129)
Backed out changeset 8c4cd026b720 (bug 1942129)
Backed out changeset 742634b0d6e9 (bug 1942129)
Backed out changeset d16857f9812f (bug 1942129)
Backed out changeset 7ff7af041ee7 (bug 1942129)
Backed out changeset ef41d9e4c7de (bug 1942129)
2025-03-04 00:43:23 +02:00
Alex Franchuk
f7ee08eef3 Bug 1942129 pt4 - Convert old shmem call sites to use the new shmem classes r=ipc-reviewers,media-playback-reviewers,padenot,lsalzman,aosmond,nika
While much of this is simply converting code (and removing extraneous
`size` parameters), toolkit/xre/GeckoArgs.{h,cpp} has some significant
changes to support sending read-only handles (which is all we need!).

Differential Revision: https://phabricator.services.mozilla.com/D236750
2025-03-03 19:53:20 +00:00
Mike Hommey
f26e135cfb Bug 1949096 - Adjust images tests for when using libz-rs. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D239088
2025-02-21 22:38:37 +00:00
Florian Quèze
b9a56a1402 Bug 1949492 - migrate to glean the AVIF_MAJOR_BRAND and AVIF_SEQUENCE histograms, r=tnikkel.
Differential Revision: https://phabricator.services.mozilla.com/D239108
2025-02-21 13:35:56 +00:00
Florian Quèze
8790af7a25 Bug 1949492 - remove AVIF_* legacy telemetry histograms that already have an equivalent in Glean, r=tnikkel.
Differential Revision: https://phabricator.services.mozilla.com/D239107
2025-02-21 13:35:56 +00:00