Bug 202785

Summary: image/apng not recognized in source tag
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WebCore Misc.Assignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 202783    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Carlos Alberto Lopez Perez
Reported 2019-10-10 02:42:10 PDT
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.
Attachments
Patch (1.82 KB, patch)
2019-10-10 02:49 PDT, Carlos Alberto Lopez Perez
no flags
Patch (3.33 KB, patch)
2019-10-15 15:42 PDT, Carlos Alberto Lopez Perez
no flags
Carlos Alberto Lopez Perez
Comment 1 2019-10-10 02:49:56 PDT
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
Dean Jackson
Comment 2 2019-10-14 14:19:08 PDT
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?
Dean Jackson
Comment 3 2019-10-14 14:22:07 PDT
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+.
Dean Jackson
Comment 4 2019-10-14 15:06:12 PDT
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.
Dean Jackson
Comment 5 2019-10-14 15:18:27 PDT
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.
Carlos Alberto Lopez Perez
Comment 6 2019-10-14 15:38:24 PDT
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!
Carlos Alberto Lopez Perez
Comment 7 2019-10-15 15:42:28 PDT
Created attachment 381033 [details] Patch Patch for landing: Test EWS first
Carlos Alberto Lopez Perez
Comment 8 2019-10-16 02:01:03 PDT
Radar WebKit Bug Importer
Comment 9 2019-10-16 02:02:19 PDT
Note You need to log in before you can comment on or make changes to this bug.