mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
Issue #1769 - Part 2: Implement JPEG-XL decoder and about:config and MIME plumbing.
Backported from Mozilla bug 1707590 whereever possible.
This commit is contained in:
parent
7983f5d8ba
commit
51ea0e4f3a
15 changed files with 257 additions and 4 deletions
|
|
@ -2550,6 +2550,12 @@ imgLoader::GetMimeTypeFromContent(const char* aContents,
|
|||
!memcmp(aContents + 8, "WEBP", 4)) {
|
||||
aContentType.AssignLiteral(IMAGE_WEBP);
|
||||
|
||||
} else if ((aLength >= 2 && !memcmp(aContents, "\xFF\x0A", 2)) ||
|
||||
(aLength >= 12 &&
|
||||
!memcmp(aContents, "\x00\x00\x00\x0CJXL \x0D\x0A\x87\x0A", 12))) {
|
||||
// Each version is for containerless and containerful files respectively.
|
||||
aContentType.AssignLiteral(IMAGE_JXL);
|
||||
|
||||
} else {
|
||||
/* none of the above? I give up */
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue