2010-09-13  Andreas Kling  <andreas.kling@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Don't add empty strings to list of supported image MIME types
        https://bugs.webkit.org/show_bug.cgi?id=45643

        After <http://trac.webkit.org/changeset/67355> getMIMETypeForExtension()
        returns an empty string instead of "application/octet-stream" for unsupported
        extensions. Don't add these to the list of supported types, and clean out
        the logic that removed "application/octet-stream" from supported types.

        Fixes crash in initializeMIMETypeRegistry() due to inserting String() into
        a HashSet<String>.

        * platform/MIMETypeRegistry.cpp:
        (WebCore::initializeSupportedImageMIMETypes):
        (WebCore::initializeSupportedImageMIMETypesForEncoding):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2 files changed