diff --git a/image/SurfacePipeFactory.h b/image/SurfacePipeFactory.h
index 2a7824f766d4..144e9bbad2d5 100644
--- a/image/SurfacePipeFactory.h
+++ b/image/SurfacePipeFactory.h
@@ -637,8 +637,8 @@ class SurfacePipeFactory {
if (aOrientation.IsIdentity()) {
if (colorManagement) {
if (downscale) {
- pipe = MakePipe(downscalingConfig, colorManagementConfig,
- premultiplyConfig, surfaceConfig);
+ pipe = MakePipe(colorManagementConfig, premultiplyConfig,
+ downscalingConfig, surfaceConfig);
} else { // (downscale is false)
pipe = MakePipe(colorManagementConfig, premultiplyConfig,
surfaceConfig);
@@ -646,7 +646,7 @@ class SurfacePipeFactory {
} else { // (colorManagement is false)
if (downscale) {
pipe =
- MakePipe(downscalingConfig, premultiplyConfig, surfaceConfig);
+ MakePipe(premultiplyConfig, downscalingConfig, surfaceConfig);
} else { // (downscale is false)
pipe = MakePipe(premultiplyConfig, surfaceConfig);
}
@@ -654,15 +654,15 @@ class SurfacePipeFactory {
} else { // (orientation is not identity)
if (colorManagement) {
if (downscale) {
- pipe = MakePipe(downscalingConfig, colorManagementConfig,
- premultiplyConfig, reorientSurfaceConfig);
+ pipe = MakePipe(colorManagementConfig, premultiplyConfig,
+ downscalingConfig, reorientSurfaceConfig);
} else { // (downscale is false)
pipe = MakePipe(colorManagementConfig, premultiplyConfig,
reorientSurfaceConfig);
}
} else { // (colorManagement is false)
if (downscale) {
- pipe = MakePipe(downscalingConfig, premultiplyConfig,
+ pipe = MakePipe(premultiplyConfig, downscalingConfig,
reorientSurfaceConfig);
} else { // (downscale is false)
pipe = MakePipe(premultiplyConfig, reorientSurfaceConfig);
diff --git a/image/test/reftest/downscaling/1919368-1-ref.html b/image/test/reftest/downscaling/1919368-1-ref.html
new file mode 100644
index 000000000000..e425b953d2a0
--- /dev/null
+++ b/image/test/reftest/downscaling/1919368-1-ref.html
@@ -0,0 +1 @@
+
diff --git a/image/test/reftest/downscaling/1919368-1.avif b/image/test/reftest/downscaling/1919368-1.avif
new file mode 100644
index 000000000000..563ea31d77be
Binary files /dev/null and b/image/test/reftest/downscaling/1919368-1.avif differ
diff --git a/image/test/reftest/downscaling/1919368-1.html b/image/test/reftest/downscaling/1919368-1.html
new file mode 100644
index 000000000000..1510e189b0e6
--- /dev/null
+++ b/image/test/reftest/downscaling/1919368-1.html
@@ -0,0 +1 @@
+
diff --git a/image/test/reftest/downscaling/1919368-1.png b/image/test/reftest/downscaling/1919368-1.png
new file mode 100644
index 000000000000..66e6306c6067
Binary files /dev/null and b/image/test/reftest/downscaling/1919368-1.png differ
diff --git a/image/test/reftest/downscaling/reftest.list b/image/test/reftest/downscaling/reftest.list
index 905176199743..86b42ab3349d 100644
--- a/image/test/reftest/downscaling/reftest.list
+++ b/image/test/reftest/downscaling/reftest.list
@@ -110,6 +110,12 @@ fuzzy(0-1,0-1024) == downscale-32px.html?.jpg downscale-32px-ref.html
# Test downscaling a JPEG with orientation metadata.
fuzzy(0-1,0-50) == downscale-orient.html downscale-orient-ref.html
+# be careful changing fuzzy, the bug this test is testing is if the shade of orange is too dark
+fuzzy(0-1,0-144) == 1919368-1.html 1919368-1-ref.html
+
+
+
+
# RUN TESTS WITH DOWNSCALE-DURING-DECODE ENABLED:
# ===============================================
defaults pref(image.downscale-during-decode.enabled,true)
@@ -212,6 +218,9 @@ fuzzy(0-4,0-18) == downscale-orient.html downscale-orient-ref.html
== huge-1.html?32768x100.jpg,100,100 huge-1.html?100x100.jpg,100,100
== huge-1.html?32768x100.jpg,32768,100 huge-1.html?100x100.jpg,32768,100
+# be careful changing fuzzy, the bug this test is testing is if the shade of orange is too dark
+fuzzy(0-1,0-144) == 1919368-1.html 1919368-1-ref.html
+
# Only need to run these with downscaling on
!= 1421191-1.html about:blank
== 1404366-1.html about:blank
diff --git a/testing/test/test_skipfails.py b/testing/test/test_skipfails.py
index 5713c6c6b078..9ee5221e97b4 100644
--- a/testing/test/test_skipfails.py
+++ b/testing/test/test_skipfails.py
@@ -911,7 +911,7 @@ def test_reftest_get_lineno2():
lineno = sf.reftest_find_lineno(
"image/test/reftest/downscaling/reftest.list", mods, allmods
)
- assert lineno == 177
+ assert lineno == 183
def test_reftest_get_lineno3():