fune/image/decoders
Timothy Nikkel 21823adb7d Bug 1885209. Sanity check pixel format of internal icon type images. r=gfx-reviewers,nical
The page has

  <link rel="shortcut icon" type="image/x-icon" href="data:image/icon;base64,__png_data__">

When the Favicon service tries to decode that is passes "image/icon" as the mimetype to choose the decoder type and so we try to decode it as our internal icon format (not a format used in the wild, only used internal to get pass around icon data we retrieved from the OS). This passes in an invalid format type and hits the assert. In a non-debug build we fail to create the surface pipe later when we can't find a swizzle function. We only ever create these icon files with formats R8G8B8A8, OS_RGBA, or B8G8R8A8. The favicon still gets displayed so the favicon service must be trying something more complicated if that fails.

In the normal content image loading path we prefer to sniff the content type from the image data and if that fails fall back to the specified content type. So the test had be careful not to look like png (or any other) image format so that we actually tried to decode it as an icon.

Differential Revision: https://phabricator.services.mozilla.com/D204732
2024-05-21 00:41:56 +00:00
..
icon Bug 1885209. Sanity check pixel format of internal icon type images. r=gfx-reviewers,nical 2024-05-21 00:41:56 +00:00
EXIF.cpp
EXIF.h
GIF2.h
iccjpeg.c
iccjpeg.h
metrics.yaml
moz.build
nsAVIFDecoder.cpp
nsAVIFDecoder.h
nsBMPDecoder.cpp
nsBMPDecoder.h
nsGIFDecoder2.cpp
nsGIFDecoder2.h
nsICODecoder.cpp
nsICODecoder.h
nsIconDecoder.cpp Bug 1885209. Sanity check pixel format of internal icon type images. r=gfx-reviewers,nical 2024-05-21 00:41:56 +00:00
nsIconDecoder.h Bug 1885209. Sanity check pixel format of internal icon type images. r=gfx-reviewers,nical 2024-05-21 00:41:56 +00:00
nsJPEGDecoder.cpp
nsJPEGDecoder.h
nsJXLDecoder.cpp
nsJXLDecoder.h
nsPNGDecoder.cpp
nsPNGDecoder.h
nsWebPDecoder.cpp
nsWebPDecoder.h