Bug 111185

Summary: [Qt] Use Qt5.1 supportedMimeTypes methods.
Product: WebKit Reporter: Allan Sandfeld Jensen <allan.jensen>
Component: Page LoadingAssignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: hausmann, jturcotte, webkit-ews
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch jturcotte: review+

Description Allan Sandfeld Jensen 2013-03-01 08:44:07 PST
QImageReader and QImageWriter now includes methods that returns the supported mimetypes directly, so we don't have to guess them from the format keys.

This should not a make any difference to the official imageformat plugins, but is cleaner and likely to fix 3rd party plugins.
Comment 1 Allan Sandfeld Jensen 2013-03-01 08:46:09 PST
Created attachment 190971 [details]
Patch
Comment 2 Early Warning System Bot 2013-03-01 08:57:37 PST
Comment on attachment 190971 [details]
Patch

Attachment 190971 [details] did not pass qt-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/16836263
Comment 3 Early Warning System Bot 2013-03-01 09:00:41 PST
Comment on attachment 190971 [details]
Patch

Attachment 190971 [details] did not pass qt-wk2-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/16867009
Comment 4 Allan Sandfeld Jensen 2013-03-01 09:17:11 PST
Comment on attachment 190971 [details]
Patch

C&P error
Comment 5 Allan Sandfeld Jensen 2013-03-01 09:46:36 PST
Created attachment 190979 [details]
Patch
Comment 6 Jocelyn Turcotte 2013-03-06 05:40:58 PST
Comment on attachment 190979 [details]
Patch

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

We should remove the old code as soon as 5.1 has been released, those ifdef are getting heavy.

> Source/WebCore/platform/MIMETypeRegistry.cpp:248
> +#if QT_VERSION >= 0x050100

#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)

> Source/WebCore/platform/MIMETypeRegistry.cpp:265
> +    //  Don't treat SVG as images directly if we can handle them internally.

"internally" is ambiguous, adding something like "let WebKit handle them" could help.

> Source/WebCore/platform/MIMETypeRegistry.cpp:295
> +#if QT_VERSION >= 0x050100

ditto

> Source/WebCore/platform/MIMETypeRegistry.cpp:307
> +#endif

This could deserve a "// QT_VERSION" as well
Comment 7 Allan Sandfeld Jensen 2013-03-07 05:30:28 PST
Created attachment 191978 [details]
Patch
Comment 8 Allan Sandfeld Jensen 2013-03-07 05:54:42 PST
Committed r145066: <http://trac.webkit.org/changeset/145066>