Bug 192672

Summary: WebP image format is not supported
Product: WebKit Reporter: Michael Flores <mike>
Component: ImagesAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, dbates, ews-watchlist, me, sabouhallawa, simon.fraser, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=207718
Attachments:
Description Flags
Patch
none
Patch none

Description Michael Flores 2018-12-13 11:47:42 PST
I'd like Webkit to consider supporting WebP images because of the benefits in load-time that developers can take advantage of.
Comment 1 Said Abou-Hallawa 2019-12-19 13:44:03 PST
<rdar://problem/8509491>
Comment 2 Said Abou-Hallawa 2020-01-29 19:35:13 PST
Created attachment 389221 [details]
Patch
Comment 3 youenn fablet 2020-01-30 00:39:22 PST
Comment on attachment 389221 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=389221&action=review

> LayoutTests/platform/mac/TestExpectations:1798
> +[ Catalina+ ] fast/images/animated-webp-as-image.html [ Pass ]

Should we have similar expectations for iOS?
Comment 4 Simon Fraser (smfr) 2020-01-30 10:38:42 PST
Comment on attachment 389221 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=389221&action=review

Do we need a canvas image encoding test?

> Source/WebCore/platform/MIMETypeRegistry.cpp:86
> +        "image/webp"_s,

You put this in the "// This represents the subset of allowed image UTIs for which CoreServices has a corresponding MIME type." section. Is that right at this point?
Comment 5 Said Abou-Hallawa 2020-02-12 16:41:44 PST
<rdar://problem/59406585>
Comment 6 Said Abou-Hallawa 2020-02-12 17:05:24 PST
Created attachment 390592 [details]
Patch
Comment 7 Said Abou-Hallawa 2020-02-12 17:29:42 PST
Comment on attachment 389221 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=389221&action=review

>> Source/WebCore/platform/MIMETypeRegistry.cpp:86
>> +        "image/webp"_s,
> 
> You put this in the "// This represents the subset of allowed image UTIs for which CoreServices has a corresponding MIME type." section. Is that right at this point?

Yes. #if HAVE(WEBP) is true, CoreServices will have the corresponding MIME type.

>> LayoutTests/platform/mac/TestExpectations:1798
>> +[ Catalina+ ] fast/images/animated-webp-as-image.html [ Pass ]
> 
> Should we have similar expectations for iOS?

Currently there is no way to specify a passing iOS version on EWS. The test has to be disabled completely and then enabled when EWS has the passing iOS version.
Comment 8 WebKit Commit Bot 2020-02-12 21:53:39 PST
Comment on attachment 390592 [details]
Patch

Clearing flags on attachment: 390592

Committed r256501: <https://trac.webkit.org/changeset/256501>
Comment 9 WebKit Commit Bot 2020-02-12 21:53:40 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Said Abou-Hallawa 2020-02-13 11:17:52 PST
A follow up patch to disable the new layout tests on Catalina:

Committed r256526: <https://trac.webkit.org/changeset/256526>