Changeset 75567 in webkit


Ignore:
Timestamp:
Jan 11, 2011 4:33:21 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-01-11 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>

Reviewed by Adam Barth.

Use plug-in DB for extensions to MIME type convertion

Plugins extension to MIME type conversion was not used in the
frameLoader. This was causing some fallback to be use which as the side
effect of loosing all the <OBJECT> parameters or <EMBED> attributes.
This patch ensure that we try to convert the extension to MIME type
using the plugin database beofre using this fallback.

Attribute lost with Flash plugin without mime type set
https://bugs.webkit.org/show_bug.cgi?id=50657

  • plugins/no-mime-with-valid-extension.html: Added.
  • plugins/no-mime-with-valid-extension-expected.txt: Added.

2011-01-11 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>

Reviewed by Adam Barth.

Use plug-in DB for extensions to MIME type convertion

Plugins extension to MIME type conversion was not used in the
frameLoader. This was causing some fallback to be use which as the side
effect of loosing all the <OBJECT> parameters or <EMBED> attributes.
This patch ensure that we try to convert the extension to MIME type
using the plugin database beofre using this fallback.

Attribute lost with Flash plugin without mime type set
https://bugs.webkit.org/show_bug.cgi?id=50657

Test: plugins/no-mime-with-valid-extension.html

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::defaultObjectContentType): Use PluginDatabase for MIME
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r75564 r75567  
     12011-01-11  Nicolas Dufresne  <nicolas.dufresne@collabora.co.uk>
     2
     3        Reviewed by Adam Barth.
     4
     5        Use plug-in DB for extensions to MIME type convertion
     6
     7        Plugins extension to MIME type conversion was not used in the
     8        frameLoader. This was causing some fallback to be use which as the side
     9        effect of loosing all the <OBJECT> parameters or <EMBED> attributes.
     10        This patch ensure that we try to convert the extension to MIME type
     11        using the plugin database beofre using this fallback.
     12
     13        Attribute lost with Flash plugin without mime type set
     14        https://bugs.webkit.org/show_bug.cgi?id=50657
     15
     16        * plugins/no-mime-with-valid-extension.html: Added.
     17        * plugins/no-mime-with-valid-extension-expected.txt: Added.
     18
    1192011-01-11  Justin Schuh  <jschuh@chromium.org>
    220
  • trunk/Source/WebCore/ChangeLog

    r75560 r75567  
     12011-01-11  Nicolas Dufresne  <nicolas.dufresne@collabora.co.uk>
     2
     3        Reviewed by Adam Barth.
     4
     5        Use plug-in DB for extensions to MIME type convertion
     6
     7        Plugins extension to MIME type conversion was not used in the
     8        frameLoader. This was causing some fallback to be use which as the side
     9        effect of loosing all the <OBJECT> parameters or <EMBED> attributes.
     10        This patch ensure that we try to convert the extension to MIME type
     11        using the plugin database beofre using this fallback.
     12
     13        Attribute lost with Flash plugin without mime type set
     14        https://bugs.webkit.org/show_bug.cgi?id=50657
     15
     16        Test: plugins/no-mime-with-valid-extension.html
     17
     18        * loader/FrameLoader.cpp:
     19        (WebCore::FrameLoader::defaultObjectContentType): Use PluginDatabase for MIME
     20
    1212011-01-11  James Simonsen  <simonjam@chromium.org>
    222
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r75349 r75567  
    961961{
    962962    String mimeType = mimeTypeIn;
     963    String extension = url.path().substring(url.path().reverseFind('.') + 1);
     964
    963965    // We don't use MIMETypeRegistry::getMIMETypeForPath() because it returns "application/octet-stream" upon failure
    964966    if (mimeType.isEmpty())
    965         mimeType = MIMETypeRegistry::getMIMETypeForExtension(url.path().substring(url.path().reverseFind('.') + 1));
     967        mimeType = MIMETypeRegistry::getMIMETypeForExtension(extension);
     968
     969#if !PLATFORM(MAC) && !PLATFORM(CHROMIUM) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL
     970    if (mimeType.isEmpty())
     971        mimeType = PluginDatabase::installedPlugins()->MIMETypeForExtension(extension);
     972#endif
    966973
    967974    if (mimeType.isEmpty())
Note: See TracChangeset for help on using the changeset viewer.