Bug 22905 - Implement ImageSource::filenameExtension for Cario
Summary: Implement ImageSource::filenameExtension for Cario
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-17 14:47 PST by Adam Barth
Modified: 2008-12-19 01:44 PST (History)
2 users (show)

See Also:


Attachments
patch (7.27 KB, patch)
2008-12-17 15:13 PST, Adam Barth
no flags Details | Formatted Diff | Diff
alternate patch (7.45 KB, patch)
2008-12-17 22:02 PST, Adam Barth
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.