Bug 45643

Summary: [Qt] Don't add empty strings to list of supported image MIME types
Product: WebKit Reporter: Andreas Kling <kling>
Component: WebCore Misc.Assignee: QtWebKit Unassigned <webkit-qt-unassigned>
Severity: Normal CC: abarth, ademar, eric, robert, webkit.review.bot
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
Proposed patch
Proposed patch v2 (r=kenneth)
Proposed patch v3 (r=kenneth) none

Description Andreas Kling 2010-09-13 02:10:09 PDT
After <http://trac.webkit.org/changeset/67355> getMIMETypeForExtension() returns an empty string instead of "application/octet-stream" for unsupported extensions. We shouldn't add this to the list of supported types.

We can also remove the logic in initializeSupportedImageMIMETypes() and initializeSupportedImageMIMETypesForEncoding() that cleans out "application/octet-stream" from the list of supported types.
Comment 1 Andreas Kling 2010-09-13 02:11:50 PDT
Created attachment 67380 [details]
Proposed patch
Comment 2 Kenneth Rohde Christiansen 2010-09-13 02:34:16 PDT
Comment on attachment 67380 [details]
Proposed patch

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

Any tests for this?
Comment 3 Andreas Kling 2010-09-13 03:11:35 PDT
Created attachment 67389 [details]
Proposed patch v2 (r=kenneth)

Don't know how to test this since I'd need to call WebCore internals.
Added comment to ChangeLog about this fixing a crash in initializeMIMETypeRegistry().
Comment 4 Andreas Kling 2010-09-13 03:13:29 PDT
Created attachment 67390 [details]
Proposed patch v3 (r=kenneth)

Oops, remove junk from patch.
Comment 5 Andreas Kling 2010-09-13 03:15:42 PDT
Comment on attachment 67390 [details]
Proposed patch v3 (r=kenneth)

Clearing flags on attachment: 67390

Committed r67375: <http://trac.webkit.org/changeset/67375>
Comment 6 Andreas Kling 2010-09-13 03:15:53 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 WebKit Review Bot 2010-09-13 04:16:49 PDT
http://trac.webkit.org/changeset/67375 might have broken Qt Linux Release
The following changes are on the blame list:
Comment 8 Ademar Reis 2011-01-26 13:17:02 PST
Revision r67375 cherry-picked into qtwebkit-2.1.x with commit 495f6f1 <http://gitorious.org/webkit/qtwebkit/commit/495f6f1>