Skip to content

Commit

Permalink
Backed out 4 changesets (bug 1707590) for causing build bustages. CLO…
Browse files Browse the repository at this point in the history
…SED TREE

Backed out changeset f3f40c6fb8e2 (bug 1707590)
Backed out changeset 3e76ff83ebe2 (bug 1707590)
Backed out changeset 40a3f43a2306 (bug 1707590)
Backed out changeset 01bb0e75cb82 (bug 1707590)
  • Loading branch information
Iulian Moraru committed May 4, 2021
1 parent c92bf2b commit 7e3d199
Show file tree
Hide file tree
Showing 555 changed files with 6 additions and 135,146 deletions.
2 changes: 1 addition & 1 deletion browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ pref("browser.download.alwaysOpenInSystemViewerContextMenuItem", true);
// Open downloaded file types internally for the given types.
// This is a comma-separated list, the empty string ("") means no types are
// viewable internally.
pref("browser.download.viewableInternally.enabledTypes", "xml,svg,webp,avif,jxl");
pref("browser.download.viewableInternally.enabledTypes", "xml,svg,webp,avif");


// This controls whether the button is automatically shown/hidden depending
Expand Down
14 changes: 0 additions & 14 deletions browser/components/downloads/DownloadsViewableInternally.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,6 @@ let DownloadsViewableInternally = {
},
// available getter is set by initAvailable()
},
{
extension: "jxl",
mimeTypes: ["image/jxl"],
initAvailable() {
XPCOMUtils.defineLazyPreferenceGetter(
this,
"available",
"image.jxl.enabled",
false,
() => DownloadsViewableInternally._updateHandler(this)
);
},
// available getter is set by initAvailable()
},
{
extension: "pdf",
mimeTypes: ["application/pdf"],
Expand Down
3 changes: 0 additions & 3 deletions config/external/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ if CONFIG["CPU_ARCH"] == "arm":
if CONFIG["MOZ_FFVPX"]:
external_dirs += ["media/ffvpx"]

if CONFIG["MOZ_JXL"]:
external_dirs += ["media/libjxl", "media/highway"]

external_dirs += [
"media/kiss_fft",
"media/libcubeb",
Expand Down
1 change: 0 additions & 1 deletion dom/tests/browser/browser_persist_image_accept.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ function expectedImageAcceptHeader() {

return (
(Services.prefs.getBoolPref("image.avif.enabled") ? "image/avif," : "") +
(Services.prefs.getBoolPref("image.jxl.enabled") ? "image/jxl," : "") +
(Services.prefs.getBoolPref("image.webp.enabled") ? "image/webp," : "") +
"*/*"
);
Expand Down
13 changes: 0 additions & 13 deletions image/DecoderFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
#ifdef MOZ_AV1
# include "nsAVIFDecoder.h"
#endif
#ifdef MOZ_JXL
# include "nsJXLDecoder.h"
#endif

namespace mozilla {

Expand Down Expand Up @@ -91,11 +88,6 @@ DecoderType DecoderFactory::GetDecoderType(const char* aMimeType) {
type = DecoderType::AVIF;
}
#endif
#ifdef MOZ_JXL
else if (!strcmp(aMimeType, IMAGE_JXL) && StaticPrefs::image_jxl_enabled()) {
type = DecoderType::JXL;
}
#endif

return type;
}
Expand Down Expand Up @@ -138,11 +130,6 @@ already_AddRefed<Decoder> DecoderFactory::GetDecoder(DecoderType aType,
case DecoderType::AVIF:
decoder = new nsAVIFDecoder(aImage);
break;
#endif
#ifdef MOZ_JXL
case DecoderType::JXL:
decoder = new nsJXLDecoder(aImage);
break;
#endif
default:
MOZ_ASSERT_UNREACHABLE("Unknown decoder type");
Expand Down
7 changes: 4 additions & 3 deletions image/DecoderFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#include "nsCOMPtr.h"
#include "SurfaceFlags.h"

namespace mozilla::image {
namespace mozilla {
namespace image {

class Decoder;
class IDecodingTask;
Expand All @@ -38,7 +39,6 @@ enum class DecoderType {
ICON,
WEBP,
AVIF,
JXL,
UNKNOWN
};

Expand Down Expand Up @@ -201,6 +201,7 @@ class DecoderFactory {
bool aIsRedecode);
};

} // namespace mozilla::image
} // namespace image
} // namespace mozilla

#endif // mozilla_image_DecoderFactory_h
4 changes: 0 additions & 4 deletions image/build/nsImageModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ nsresult mozilla::image::EnsureModuleInitialized() {

static ImageEnablementCookie kAVIFCookie = {
mozilla::StaticPrefs::image_avif_enabled, "image/avif"_ns};
static ImageEnablementCookie kJXLCookie = {
mozilla::StaticPrefs::image_jxl_enabled, "image/jxl"_ns};
static ImageEnablementCookie kWebPCookie = {
mozilla::StaticPrefs::image_webp_enabled, "image/webp"_ns};
Preferences::RegisterCallbackAndCall(UpdateContentViewerRegistration,
"image.avif.enabled", &kAVIFCookie);
Preferences::RegisterCallbackAndCall(UpdateContentViewerRegistration,
"image.jxl.enabled", &kJXLCookie);
Preferences::RegisterCallbackAndCall(UpdateContentViewerRegistration,
"image.webp.enabled", &kWebPCookie);

Expand Down
5 changes: 0 additions & 5 deletions image/decoders/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ if CONFIG["MOZ_AV1"]:
"nsAVIFDecoder.cpp",
]

if CONFIG["MOZ_JXL"]:
UNIFIED_SOURCES += [
"nsJXLDecoder.cpp",
]

include("/ipc/chromium/chromium-config.mozbuild")

LOCAL_INCLUDES += [
Expand Down
163 changes: 0 additions & 163 deletions image/decoders/nsJXLDecoder.cpp

This file was deleted.

55 changes: 0 additions & 55 deletions image/decoders/nsJXLDecoder.h

This file was deleted.

5 changes: 0 additions & 5 deletions image/imgLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2766,11 +2766,6 @@ nsresult imgLoader::GetMimeTypeFromContent(const char* aContents,
detected) &&
detected.Equals(IMAGE_AVIF)) {
aContentType.AssignLiteral(IMAGE_AVIF);
} 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;
Expand Down
5 changes: 0 additions & 5 deletions image/test/fuzzing/TestDecoders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,8 @@ static int RunDecodeToSurfaceFuzzingAVIF(nsCOMPtr<nsIInputStream> inputStream) {
return RunDecodeToSurfaceFuzzing(inputStream, "image/avif");
}

static int RunDecodeToSurfaceFuzzingJXL(nsCOMPtr<nsIInputStream> inputStream) {
return RunDecodeToSurfaceFuzzing(inputStream, "image/jxl");
}

int FuzzingInitImage(int* argc, char*** argv) {
Preferences::SetBool("image.avif.enabled", true);
Preferences::SetBool("image.jxl.enabled", true);

nsCOMPtr<imgITools> imgTools =
do_CreateInstance("@mozilla.org/image/tools;1");
Expand Down
Loading

0 comments on commit 7e3d199

Please sign in to comment.