Bug 45643 - [Qt] Don't add empty strings to list of supported image MIME types
Summary: [Qt] Don't add empty strings to list of supported image MIME types
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: QtWebKit Unassigned
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-09-13 02:10 PDT by Andreas Kling
Modified: 2011-01-26 13:17 PST (History)
5 users (show)

See Also:


Attachments
Proposed patch (2.51 KB, patch)
2010-09-13 02:11 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Proposed patch v2 (r=kenneth) (4.99 KB, patch)
2010-09-13 03:11 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Proposed patch v3 (r=kenneth) (2.63 KB, patch)
2010-09-13 03:13 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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:
http://trac.webkit.org/changeset/67376
http://trac.webkit.org/changeset/67375
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>