Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend JPEG XL detection/recognition (also AVIF a tiny bit) #3262

Merged
merged 3 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions browser/components/BrowserContentHandler.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@ function maybeRecordToHandleTelemetry(uri, isLaunch) {
".xhtml",
".svg",
".webp",
".jxl",
]);
if (registeredExtensions.has(extension)) {
Services.telemetry.keyedScalarAdd(scalar, extension, 1);
Expand Down
1 change: 1 addition & 0 deletions browser/installer/windows/msix/AppxManifest.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<uap:FileType>.xhtml</uap:FileType>
<uap:FileType>.svg</uap:FileType>
<uap:FileType>.webp</uap:FileType>
<uap:FileType>.jxl</uap:FileType>
</uap:SupportedFileTypes>
<uap:Logo>Assets\Document44x44.png</uap:Logo>
<uap2:SupportedVerbs>
Expand Down
1 change: 1 addition & 0 deletions browser/installer/windows/nsis/shared.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ ${RemoveDefaultBrowserAgentShortcut}
${AddAssociationIfNoneExist} ".svg" "WaterfoxHTML$5"
${AddAssociationIfNoneExist} ".webp" "WaterfoxHTML$5"
${AddAssociationIfNoneExist} ".avif" "WaterfoxHTML$5"
${AddAssociationIfNoneExist} ".jxl" "WaterfoxHTML$5"

${AddAssociationIfNoneExist} ".pdf" "WaterfoxPDF$5"

Expand Down
2 changes: 2 additions & 0 deletions browser/installer/windows/nsis/uninstaller.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,9 @@ Section "Uninstall"
${un.RegCleanFileHandler} ".ogv" "WaterfoxHTML-$AppUserModelID"
${un.RegCleanFileHandler} ".webm" "WaterfoxHTML-$AppUserModelID"
${un.RegCleanFileHandler} ".svg" "WaterfoxHTML-$AppUserModelID"
${un.RegCleanFileHandler} ".webp" "WaterfoxHTML-$AppUserModelID"
${un.RegCleanFileHandler} ".avif" "WaterfoxHTML-$AppUserModelID"
${un.RegCleanFileHandler} ".jxl" "WaterfoxHTML-$AppUserModelID"

${un.RegCleanFileHandler} ".pdf" "WaterfoxPDF-$AppUserModelID"

Expand Down
1 change: 1 addition & 0 deletions third_party/rust/mime_guess/src/mime_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[
("jsonml", &["application/jsonml+json"]),
("jsx", &["text/jscript"]),
("jsxbin", &["text/plain"]),
("jxl", &["image/jxl"]),
("kar", &["audio/midi"]),
("karbon", &["application/vnd.kde.karbon"]),
("kfo", &["application/vnd.kde.kformula"]),
Expand Down
1 change: 1 addition & 0 deletions toolkit/components/downloads/DownloadList.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const FILE_EXTENSIONS = [
"jpg",
"jpeg",
"json",
"jxl",
"m4a",
"mdb",
"mid",
Expand Down
2 changes: 2 additions & 0 deletions toolkit/components/extensions/parent/ext-downloads.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ const FILTER_IMAGES_EXTENSIONS = [
"psd",
"raw",
"webp",
"avif",
"jxl",
];

const FILTER_XML_EXTENSIONS = ["xml"];
Expand Down
2 changes: 1 addition & 1 deletion toolkit/content/filepicker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
allFilter=*
htmlFilter=*.html; *.htm; *.shtml; *.xhtml
textFilter=*.txt; *.text
imageFilter=*.jpe; *.jpg; *.jpeg; *.gif; *.png; *.bmp; *.ico; *.svg; *.svgz; *.tif; *.tiff; *.ai; *.drw; *.pct; *.psp; *.xcf; *.psd; *.raw; *.webp
imageFilter=*.jpe; *.jpg; *.jpeg; *.gif; *.png; *.bmp; *.ico; *.svg; *.svgz; *.tif; *.tiff; *.ai; *.drw; *.pct; *.psp; *.xcf; *.psd; *.raw; *.webp; *.avif; *.jxl
xmlFilter=*.xml
xulFilter=*.xul
audioFilter=*.aac; *.aif; *.flac; *.iff; *.m4a; *.m4b; *.mid; *.midi; *.mp3; *.mpa; *.mpc; *.oga; *.ogg; *.opus; *.ra; *.ram; *.snd; *.wav; *.wma
Expand Down
3 changes: 2 additions & 1 deletion widget/gtk/nsAppShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ nsresult nsAppShell::Init() {
gchar* name = gdk_pixbuf_format_get_name(format);
if (strcmp(name, "jpeg") && strcmp(name, "png") && strcmp(name, "gif") &&
strcmp(name, "bmp") && strcmp(name, "ico") && strcmp(name, "xpm") &&
strcmp(name, "svg") && strcmp(name, "webp") && strcmp(name, "avif")) {
strcmp(name, "svg") && strcmp(name, "webp") && strcmp(name, "avif") &&
strcmp(name, "jxl")) {
gdk_pixbuf_format_set_disabled(format, TRUE);
}
g_free(name);
Expand Down
Loading