image/apng not recognized in source tag
https://bugs.webkit.org/show_bug.cgi?id=202785

Reviewed by Dean Jackson.

Source/WebCore:

Add image/apng as supported mime type for images on Mac/iOS and
on all the other platforms that enable apng support.

This fixes the test imported/w3c/web-platform-tests/apng/supported-in-source-type.html

* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::supportedImageMIMETypes):

LayoutTests:

* TestExpectations: Remove test imported/w3c/web-platform-tests/apng/supported-in-source-type.html
from the list of expected failures.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 4b4848a..6b7ad58 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2019-10-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        image/apng not recognized in source tag
+        https://bugs.webkit.org/show_bug.cgi?id=202785
+
+        Reviewed by Dean Jackson.
+
+        * TestExpectations: Remove test imported/w3c/web-platform-tests/apng/supported-in-source-type.html
+        from the list of expected failures.
+
 2019-10-15  Kate Cheney  <katherine_cheney@apple.com>
 
         REGRESSION (~244100) [Mac WK2 Debug] Layout Test http/tests/resourceLoadStatistics/prune-statistics.html is a flaky failure (197285)
diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations
index 3e86673..cc2bbb2 100644
--- a/LayoutTests/TestExpectations
+++ b/LayoutTests/TestExpectations
@@ -3882,5 +3882,3 @@
 webkit.org/b/200208 imported/w3c/web-platform-tests/css/css-images/gradients-with-transparent.html [ ImageOnlyFailure ]
 webkit.org/b/200209 imported/w3c/web-platform-tests/css/css-images/multiple-position-color-stop-radial.html [ ImageOnlyFailure ]
 webkit.org/b/202813 imported/w3c/web-platform-tests/css/css-images/multiple-position-color-stop-conic.html [ ImageOnlyFailure ]
-
-webkit.org/b/202785 imported/w3c/web-platform-tests/apng/supported-in-source-type.html [ Failure ]
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 3751a10..ca473b0 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2019-10-15  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        image/apng not recognized in source tag
+        https://bugs.webkit.org/show_bug.cgi?id=202785
+
+        Reviewed by Dean Jackson.
+
+        Add image/apng as supported mime type for images on Mac/iOS and
+        on all the other platforms that enable apng support.
+
+        This fixes the test imported/w3c/web-platform-tests/apng/supported-in-source-type.html
+
+        * platform/MIMETypeRegistry.cpp:
+        (WebCore::MIMETypeRegistry::supportedImageMIMETypes):
+
 2019-10-15  Ryosuke Niwa  <rniwa@webkit.org>
 
         adoptRef DOMTimer in install instead of its constructor
diff --git a/Source/WebCore/platform/MIMETypeRegistry.cpp b/Source/WebCore/platform/MIMETypeRegistry.cpp
index 0a1c936..2190784 100644
--- a/Source/WebCore/platform/MIMETypeRegistry.cpp
+++ b/Source/WebCore/platform/MIMETypeRegistry.cpp
@@ -75,6 +75,7 @@
         "image/jpeg"_s,
         "image/vnd.microsoft.icon"_s,
         "image/jp2"_s,
+        "image/apng"_s,
         "image/png"_s,
         "image/bmp"_s,
 
@@ -135,6 +136,9 @@
         "image/vnd.microsoft.icon"_s, // ico
         "image/x-icon"_s, // ico
         "image/x-xbitmap"_s, // xbm
+#if ENABLE(APNG)
+        "image/apng"_s,
+#endif
 #if USE(OPENJPEG)
         "image/jp2"_s,
         "image/jpeg2000"_s,