Bug 22905

Summary: Implement ImageSource::filenameExtension for Cario
Product: WebKit Reporter: Adam Barth <abarth>
Component: PlatformAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, alice.barraclough
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
none
alternate patch darin: review+

Description Adam Barth 2008-12-17 14:47:21 PST
We recently added ImageSource::filenameExtension for CG, but we need to for Cario too.  Patch forthcoming.
Comment 1 Adam Barth 2008-12-17 15:13:58 PST
Created attachment 26102 [details]
patch
Comment 2 Darin Adler 2008-12-17 15:26:22 PST
Comment on attachment 26102 [details]
patch

Seems a little indirect to return MIME types and then map them to extensions? Why not just return extensions directly?
Comment 3 Adam Barth 2008-12-17 15:35:32 PST
> Seems a little indirect to return MIME types and then map them to extensions?
> Why not just return extensions directly?

In theory, the extensions vary by platform.  On Windows, for example, they are configurable in the registry.  I can change this to return the extension directly, if you like.
Comment 4 Adam Barth 2008-12-17 22:02:05 PST
Created attachment 26112 [details]
alternate patch

Here's an alternate version that skips the mimeType and defines the extension directly.  Go ahead an r+ whichever you like better (or r- them both :) )
Comment 5 Darin Adler 2008-12-18 07:42:34 PST
Comment on attachment 26112 [details]
alternate patch

This is better. Thanks.

r=me
Comment 6 Darin Adler 2008-12-18 07:42:47 PST
Comment on attachment 26102 [details]
patch

Clearing review patch on this one.
Comment 7 Darin Adler 2008-12-18 07:43:20 PST
The reason we are mapping MIME type to extension in the CoreGraphics version of this is that we're stuck with the API of ImageIO.
Comment 8 Adam Barth 2008-12-19 01:44:42 PST
Fixed in r39396.