The test imported/w3c/web-platform-tests/apng/supported-in-source-type.html fails on all platform. WPT test: https://w3c-test.org/apng/supported-in-source-type.html The failure is caused because the mime-type image/apng is not recognized for the <source> attribute, even when apng files are supported.
Created attachment 380618 [details] Patch Patch fixing imported/w3c/web-platform-tests/apng/supported-in-source-type.html which needs to be imported first on bug 202783
Comment on attachment 380618 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380618&action=review > Source/WebCore/platform/MIMETypeRegistry.cpp:78 > + "image/apng"_s, This is a duplicate of the one below. Why both? And why is one guarded?
Comment on attachment 380618 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380618&action=review > Source/WebCore/platform/MIMETypeRegistry.cpp:141 > +#if ENABLE(APNG) > + "image/apng"_s, > +#endif Just leave this one and it's an r+.
Comment on attachment 380618 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380618&action=review >> Source/WebCore/platform/MIMETypeRegistry.cpp:78 >> + "image/apng"_s, > > This is a duplicate of the one below. Why both? And why is one guarded? Unless I'm mistaken, this is inside USE(CG) and the one below is in PLATFORM(IOS_FAMILY). But the USE(CG) isn't closed, so it becomes a duplicate. I now think this is the one we should keep, but add the APNG guard.
Comment on attachment 380618 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380618&action=review >> Source/WebCore/platform/MIMETypeRegistry.cpp:141 >> +#endif > > Just leave this one and it's an r+. Oh gosh. Ignore me. This is outside USE(CG) - I just didn't read the patch properly.
Comment on attachment 380618 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380618&action=review >>> Source/WebCore/platform/MIMETypeRegistry.cpp:141 >>> +#endif >> >> Just leave this one and it's an r+. > > Oh gosh. Ignore me. This is outside USE(CG) - I just didn't read the patch properly. Right. There are two main code-paths: USE(CG) that affects Mac/iOS and everything else. ENABLE(APNG) Only makes sense for everything else, because AFAIK on Mac/iOS the support for it depends on CoreGraphics (which I believe it supports it). It happens more or less like with the suport for JPEG2000. For GTK/WPE we have a build-time guard USE(OPENJPEG), but for Mac/iOS that guard isn't used. BTW, if you can review also bug 202783 that would be very nice, that way I can land this after first landing the test that this is supposed to fix. Thanks!
Created attachment 381033 [details] Patch Patch for landing: Test EWS first
Committed r251182: <https://trac.webkit.org/changeset/251182>
<rdar://problem/56324500>