Commit Graph

4656 Commits

Author SHA1 Message Date
Alexandru Marc
191ccbe7fe Backed out changeset d92f391b3b0c (bug 1922838) for backing out bug 1915351 2024-10-25 16:42:33 +03:00
serge-sans-paille
53068cdf31 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 09:06:01 +00:00
Alexandru Marc
83543f20f2 Backed out changeset 448597bce69d (bug 1922838) for causing build bustages. CLOSED TREE 2024-10-24 11:37:49 +03:00
serge-sans-paille
c7a369b29a Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 07:38:30 +00:00
Andrew Osmond
a2e11d2db7 Bug 1926249 - Implement support for desired width/height with WebCodecs ImageDecoder. r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D226498
2024-10-22 13:45:36 +00:00
Timothy Nikkel
2c516b3ffb Bug 1925265. Always correctly handle the TO_SRGB_COLORSPACE flag when decoding an image. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D225962
2024-10-19 11:13:07 +00:00
Sandor Molnar
b3ff16cd7b Merge mozilla-central to autoland. a=merge CLOSED TREE 2024-10-15 19:23:34 +03:00
Alexandru Marc
ec4996707f Backed out changeset b5d9c8b42014 (bug 1917901) for causing crashes. ( Bug 1924737 ) a=backout 2024-10-15 16:56:37 +03:00
Timothy Nikkel
694b21a43d Bug 1788866. Fix pixel format type for color management of avif images. r=gfx-reviewers,lsalzman
This code was copied from the png decoder but it is only applicable to the png decoder because it produces output in rgb order. Whereas the avif decoder produces data in BGR order.

Differential Revision: https://phabricator.services.mozilla.com/D220088
2024-10-15 12:01:28 +00:00
Randell Jesup
a2ba7cbbce Bug 1917901: Make it ok to retarget OnDataAvailable multiple times until the first ODA is received r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D223651
2024-10-14 19:56:20 +00:00
Stanca Serban
02c80f32db Backed out changeset 34295cdf7c5a (bug 1917901) for causing multiple failures. CLOSED TREE 2024-10-11 05:11:22 +03:00
Randell Jesup
8d1a88816f Bug 1917901: Make it ok to retarget OnDataAvailable multiple times until the first ODA is received r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D223651
2024-10-10 19:46:43 +00:00
Tamas Szentpeteri
8fd336e783 Backed out changeset fbd927642d73 (bug 1788866) for causing gtest failures related to ImageFrameAnimator.BlendAVIFWithFilter. CLOSED TREE 2024-10-10 10:11:39 +03:00
Timothy Nikkel
5a7954ec49 Bug 1788866. Fix pixel format type for color management of avif images. r=gfx-reviewers,lsalzman
This code was copied from the png decoder but it is only applicable to the png decoder because it produces output in rgb order. Whereas the avif decoder produces data in BGR order.

Differential Revision: https://phabricator.services.mozilla.com/D220088
2024-10-10 05:16:30 +00:00
Chris H-C
84aa2d26d5 Bug 1920562 - Switch all legacy events to default to enabled r=florian,janerik,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D223831
2024-10-08 20:14:41 +00:00
Sandor Molnar
fc1cd91320 Backed out 5 changesets (bug 1920562) for causing xpc assertion failures. CLOSED TREE
Backed out changeset 8f085ab589a8 (bug 1920562)
Backed out changeset 4405387ae770 (bug 1920562)
Backed out changeset a68fd13a33ae (bug 1920562)
Backed out changeset cd3672fc08ed (bug 1920562)
Backed out changeset 62ab18879eea (bug 1920562)
2024-10-08 00:16:13 +03:00
Chris H-C
a9c0e218bb Bug 1920562 - Switch all legacy events to default to enabled r=florian,janerik,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D223831
2024-10-07 17:29:56 +00:00
Tooru Fujisawa
c4004955fb Bug 1919218 - Part 1: Merge http-on-image-cache-response notification to http-on-resource-cache-response. r=emilio,devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D224431
2024-10-07 08:07:44 +00:00
Emilio Cobos Álvarez
b85241f0c8 Bug 1922208 - Don't use Maybe<> to represent no ratio in images. r=dholbert
AspectRatio already has a way of representing a null / invalid ratio,
and there are some cases (broken sizes or invalid SVGOuterSVGFrame
ratio) where we might get Some(AspectRatio()).

It's not a meaningfully different state, and IMO we shouldn't treat it
differently.

Differential Revision: https://phabricator.services.mozilla.com/D224212
2024-10-04 07:59:28 +00:00
Stanca Serban
f7911f9faf Backed out changeset 450c9dfc8858 (bug 1922208) for causing multiple failures. 2024-10-02 15:55:26 +03:00
Emilio Cobos Álvarez
1efe312360 Bug 1922208 - Don't use Maybe<> to represent no ratio in images. r=dholbert
AspectRatio already has a way of representing a null / invalid ratio,
and there are some cases (broken sizes or invalid SVGOuterSVGFrame
ratio) where we might get Some(AspectRatio()).

It's not a meaningfully different state, and IMO we shouldn't treat it
differently.

Differential Revision: https://phabricator.services.mozilla.com/D224212
2024-10-02 10:33:14 +00:00
Valentin Gosu
72557de45f Bug 1900561 - Set nsIClassOfService::fetchPriority where callers use nsISupportsPriority.adjustPriority r=acreskey
Differential Revision: https://phabricator.services.mozilla.com/D221958
2024-09-25 18:42:52 +00:00
Timothy Nikkel
36a27965fb Bug 1919368. When constructing surface pipes for images downscaling must come after premultiplying alpha. r=gfx-reviewers,nical
The downscaling filter depends on operating on premultiplied alpha data.

Differential Revision: https://phabricator.services.mozilla.com/D222597
2024-09-25 11:56:04 +00:00
Sandor Molnar
1a8c3384a8 Backed out changeset 621b4944617c (bug 1919368) for causing py3 unit test failures CLOSED TREE 2024-09-25 10:18:30 +03:00
Timothy Nikkel
a0b74ce69a Bug 1919368. When constructing surface pipes for images downscaling must come after premultiplying alpha. r=gfx-reviewers,nical
The downscaling filter depends on operating on premultiplied alpha data.

Differential Revision: https://phabricator.services.mozilla.com/D222597
2024-09-25 04:25:07 +00:00
Butkovits Atila
af3eccb499 Backed out 3 changesets (bug 1900561, bug 1919158) for causing bustages at ipc_message_utils.h. CLOSED TREE
Backed out changeset a2a4a88ef8d1 (bug 1919158)
Backed out changeset ecb590690d2e (bug 1900561)
Backed out changeset ef92a69ff2d1 (bug 1900561)
2024-09-24 18:58:08 +03:00
Jan Horak
84cd68932c Bug 1751467 Use GAppInfo to open downloaded files; r=stransky,settings-reviewers,mossop,mak,jmaher
The GAppInfo supports starting up flatpak applications where the simple
command does not work.

Differential Revision: https://phabricator.services.mozilla.com/D221792
2024-09-24 15:14:24 +00:00
Valentin Gosu
dba3c91e0e Bug 1900561 - Set nsIClassOfService::fetchPriority where callers use nsISupportsPriority.adjustPriority r=acreskey
Depends on D221957

Differential Revision: https://phabricator.services.mozilla.com/D221958
2024-09-24 12:29:08 +00:00
Paul Zuehlcke
251a79b152 Bug 1915419 - ImageCacheCleaner support for OriginAttributesPattern. r=tnikkel,anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D221322
2024-09-24 09:18:00 +00:00
Gregory Pappas
f943bde079 Bug 1920268 - Remove unnecessary MochiKit.js includes in tests (image/test/) r=gfx-reviewers,aosmond
Depends on D223030

Differential Revision: https://phabricator.services.mozilla.com/D223031
2024-09-23 22:35:39 +00:00
Chris H-C
c02f02fdf0 Bug 1918226 - Use Glean APIs for avif.dav1d_get_picture#return_value r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D221494
2024-09-20 18:43:03 +00:00
Iulian Moraru
1150f8cfed Backed out 2 changesets (bug 1900561) for causing windows build bustages. CLOSED TREE
Backed out changeset 474e1a3ab5f0 (bug 1900561)
Backed out changeset 7a0bb5fa195e (bug 1900561)
2024-09-19 14:52:47 +03:00
Valentin Gosu
dc02c664c6 Bug 1900561 - Set nsIClassOfService::fetchPriority where callers use nsISupportsPriority.adjustPriority r=acreskey
Differential Revision: https://phabricator.services.mozilla.com/D221958
2024-09-19 10:24:22 +00:00
Butkovits Atila
e2848bdc49 Backed out 12 changesets (bug 1915419) for causing failures at test_bouncetracking_purge.js. CLOSED TREE
Backed out changeset e5c32a502e0f (bug 1915419)
Backed out changeset 8cbcbb25fc99 (bug 1915419)
Backed out changeset 947379a2f167 (bug 1915419)
Backed out changeset 4cfe3a954ade (bug 1915419)
Backed out changeset 94fba1a2786b (bug 1915419)
Backed out changeset 477b4f7c2760 (bug 1915419)
Backed out changeset ed6c8d9d39d4 (bug 1915419)
Backed out changeset e534c390101c (bug 1915419)
Backed out changeset bc3fe74a8b03 (bug 1915419)
Backed out changeset afefdce605f9 (bug 1915419)
Backed out changeset e58887b90d39 (bug 1915419)
Backed out changeset 114298b7b855 (bug 1915419)
2024-09-18 17:49:45 +03:00
Paul Zuehlcke
cf594c4951 Bug 1915419 - ImageCacheCleaner support for OriginAttributesPattern. r=tnikkel,anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D221322
2024-09-18 12:50:45 +00:00
Timothy Nikkel
53caeea5de Bug 1919139. Consider a png with sRGB tag as color managed so we don't also apply gAMA chunk. r=gfx-reviewers,aosmond
If both sRGB and gAMA chunk are present the spec calls for prefering the sRGB chunk.

Differential Revision: https://phabricator.services.mozilla.com/D222360
2024-09-18 08:58:26 +00:00
Norisz Fay
483f669512 Backed out 12 changesets (bug 1915419) for causing clearDataFromBaseDomain related gv-junit failures CLOSED TREE
Backed out changeset 6baf34e653ef (bug 1915419)
Backed out changeset 3015863afd5d (bug 1915419)
Backed out changeset 90558f317a75 (bug 1915419)
Backed out changeset 5f07cb9268dd (bug 1915419)
Backed out changeset aedba16d4af7 (bug 1915419)
Backed out changeset d9a2d5c2ba53 (bug 1915419)
Backed out changeset 4a250c451004 (bug 1915419)
Backed out changeset c6da2e632da6 (bug 1915419)
Backed out changeset 9256540ed21a (bug 1915419)
Backed out changeset 7621d766d6a4 (bug 1915419)
Backed out changeset 16d6589ba330 (bug 1915419)
Backed out changeset b3eebd764439 (bug 1915419)
2024-09-16 18:29:55 +03:00
Paul Zuehlcke
1073967876 Bug 1915419 - ImageCacheCleaner support for OriginAttributesPattern. r=tnikkel,anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D221322
2024-09-16 13:25:32 +00:00
Timothy Nikkel
2a8ea92054 Bug 1846055. Fix color management of grayscale avif files. r=gfx-reviewers,lsalzman
Color management is usually handled in the SurfacePipe, but SurfacePipe is RGB(A) only, and qcms can only operator on grayscale images in grayscale format, not RGB(A). So we must handle the qcms operation in the decoder. This is the same as how the png decoder handles this same situation. One additional wrinkle is that gfx::ConvertYCbCrToRGB32 only outputs RGB even for grayscale input data so we have to create an intermediate grayscale copy of the data for qcms to work on.

Recording command lines here that were used to create the test in case it needs to be modified or extended in the future.

Convert png to grayscale or grayscale + alpha

ffmpeg -i file.png -pix_fmt gray file-gray.png
ffmpeg -i file.png -pix_fmt ya8 file-gray.png

Extract icc profile from png

exiftool -icc_profile -b -w icc file.png

Add icc profile to png

exiftool "-icc_profile<=profile.icc" file.png

Encode avif using provided icc profile in file

avifenc --icc profile.icc input.png output.avif

Differential Revision: https://phabricator.services.mozilla.com/D220101
2024-09-09 09:39:12 +00:00
Timothy Nikkel
ae74e50baf Bug 1915543. Do color management on avifs on non-premultiplied alpha image data. r=gfx-reviewers,lsalzman
ConvertYCbCrToRGB32 was doing the premultiplied conversion, which happens before the surface pipe, which is where color management happens.

Differential Revision: https://phabricator.services.mozilla.com/D220517
2024-09-07 21:43:05 +00:00
Alexandra Borovova
536eac2c33 Bug 1884876 - Add notification about stylesheets loaded from CSSLoader cache. r=necko-reviewers,emilio,arai
Differential Revision: https://phabricator.services.mozilla.com/D220571
2024-09-06 14:47:23 +00:00
Timothy Nikkel
2398448e0b Bug 1910297. Handle repaint propagation to the root if the root is a table. r=layout-reviewers,emilio
The background image is associate to the table frame, but the table wrapper frame is the primary frame, thus IsPrimaryFrameOfRootOrBodyElement returns false and we don't propagate to the root when we should. So I changed IsPrimaryFrameOfRootOrBodyElement to handle this case and renamed it. I checked the other root element frame types, only table frames had this issue.

Differential Revision: https://phabricator.services.mozilla.com/D217923
2024-08-09 10:25:21 +00:00
Timothy Nikkel
d76e069654 Bug 1910211. Error-out if an avif file specifies color space options that are not supported instead of asserting. r=gfx-reviewers,nical
The matrix coefficients field in the file is Identity, indicating this is RGB data, but the pixel layout field is "half width and half height". We don't support subsampling with RGB data, so we hit this

https://searchfox.org/mozilla-central/rev/fa55b33a4b56f392bc5a0c7616e0dfe055112cb5/gfx/ycbcr/yuv_convert.cpp#144

which makes ConvertYCbCrToRGB32 fail.

Differential Revision: https://phabricator.services.mozilla.com/D217906
2024-08-07 12:33:34 +00:00
Tooru Fujisawa
1abe447481 Bug 1907009 - Part 1: Add CacheExpirationTime type. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D217957
2024-08-06 05:38:23 +00:00
Emilio Cobos Álvarez
e1ad6294bf Bug 1910698 - Remove nsIScriptError.sourceLine. r=smaug,devtools-reviewers,webdriver-reviewers,necko-reviewers,nchevobbe,kershaw,jdescottes,credential-management-reviewers,dimi
Afaict the source lines are not exposed anywhere in the UI.

Differential Revision: https://phabricator.services.mozilla.com/D218115
2024-08-01 17:12:48 +00:00
Andrew Osmond
874ce61a83 Bug 1901078 - Implement promise based anonymous image decoder. r=tnikkel
This bypasses any caching used on the display pipeline and is
intended to be used by layers that want asynchronous decoding
that fits well into the MozPromise style.

This also fixes an issue with the frame count metadata decoder in the
GIF decoder. The code only began being used with this patch, and the WPT
exposed an overflow bug caused by not clearing nsGIFDecoder2::mColormap
and nsGIFDecoder2::mColormapSize.

Differential Revision: https://phabricator.services.mozilla.com/D212833
2024-07-24 03:16:16 +00:00
Noemi Erli
8feec14eb7 Backed out 3 changesets (bug 1901078, bug 1749048) for causing bustages in ImageDecoder.cpp
Backed out changeset 40ba80bacf94 (bug 1749048)
Backed out changeset 6aa4e953e922 (bug 1749048)
Backed out changeset 3fce5dcfc9c6 (bug 1901078)
2024-07-24 03:48:51 +03:00
Sean Feng
57bdf0a7d7 Bug 1874756 - Simplify and reduce the number of hashtable lookups for LCP implementation r=emilio
Two changes are introduced:

* LCP has a hashtable called `ContentIdentifiersForLCP` to store
(element, image) pairs to avoid processing the same pair multiple
times. Instead of using weak pointers for elements, this patch changes
it to use raw pointers for better performance. Also, makes the
hashtable to use element alone as the key, so that the entry
can be quickly removed when nsINode::LastRelease is called.

* Another change to make imgRequestProxy stores the
timestamps for LCP, so we can create LCP entries when the size
is available, instead of creating one temporarily and updating it
later. This allows us to eliminate a hashtable called
`mImageLCPEntryMap` for better performance.

Differential Revision: https://phabricator.services.mozilla.com/D214315
2024-07-23 20:42:40 +00:00
Andrew Osmond
ced3221cfb Bug 1901078 - Implement promise based anonymous image decoder. r=tnikkel
This bypasses any caching used on the display pipeline and is
intended to be used by layers that want asynchronous decoding
that fits well into the MozPromise style.

This also fixes an issue with the frame count metadata decoder in the
GIF decoder. The code only began being used with this patch, and the WPT
exposed an overflow bug caused by not clearing nsGIFDecoder2::mColormap
and nsGIFDecoder2::mColormapSize.

Differential Revision: https://phabricator.services.mozilla.com/D212833
2024-07-23 19:32:47 +00:00
Stanca Serban
b3c85ac11d Backed out 3 changesets (bug 1901078, bug 1749048) for causing interface related mochitests failures. CLOSED TREE
Backed out changeset 0c7ce075a24f (bug 1749048)
Backed out changeset 0b609b8fcff3 (bug 1749048)
Backed out changeset 18ce2638e512 (bug 1901078)
2024-07-23 21:50:08 +03:00