Commit 48a9089f authored by robert@webkit.org's avatar robert@webkit.org
Browse files

2011-01-15 Robert Hogan <robert@webkit.org>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] plugins/no-mime-with-valid-extension.html fails

        Check extension of resource against installed
        plugins when determining mime-type.

        https://bugs.webkit.org/show_bug.cgi?id=52288
        https://bugs.webkit.org/show_bug.cgi?id=50657
        * platform/qt/Skipped:
2011-01-15  Robert Hogan  <robert@webkit.org>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] plugins/no-mime-with-valid-extension.html fails
        Check extension of resource against installed
        plugins when determining mime-type.

        https://bugs.webkit.org/show_bug.cgi?id=52288
        https://bugs.webkit.org/show_bug.cgi?id=50657

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::objectContentType):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 79739d99
2011-01-15 Robert Hogan <robert@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] plugins/no-mime-with-valid-extension.html fails
Check extension of resource against installed
plugins when determining mime-type.
https://bugs.webkit.org/show_bug.cgi?id=52288
https://bugs.webkit.org/show_bug.cgi?id=50657
* platform/qt/Skipped:
2011-01-15 Stephen White <senorblanco@chromium.org>
 
Unreviewed; updated chromium test expectations.
......
......@@ -5379,7 +5379,3 @@ fast/workers/storage/change-version-sync.html
fast/workers/storage/interrupt-database.html
fast/xmlhttprequest/null-document-xmlhttprequest-open.html
fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
# [Qt] plugins/no-mime-with-valid-extension.html fails
# https://bugs.webkit.org/show_bug.cgi?id=52288
plugins/no-mime-with-valid-extension.html
2011-01-15 Robert Hogan <robert@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] plugins/no-mime-with-valid-extension.html fails
Check extension of resource against installed
plugins when determining mime-type.
https://bugs.webkit.org/show_bug.cgi?id=52288
https://bugs.webkit.org/show_bug.cgi?id=50657
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::objectContentType):
2011-01-14 Sam Magnuson <smagnuso@gmail.com>
 
Reviewed by Kenneth Rohde Christiansen.
......
......@@ -1304,6 +1304,8 @@ void FrameLoaderClientQt::transferLoadingResourceFromPage(unsigned long, Documen
ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& _mimeType)
{
// qDebug()<<" ++++++++++++++++ url is "<<url.prettyURL()<<", mime = "<<_mimeType;
QFileInfo fi(url.path());
String extension = fi.suffix();
if (_mimeType == "application/x-qt-plugin" || _mimeType == "application/x-qt-styled-widget")
return ObjectContentOtherPlugin;
......@@ -1311,10 +1313,11 @@ ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const
return ObjectContentNone;
String mimeType = _mimeType;
if (!mimeType.length()) {
QFileInfo fi(url.path());
mimeType = MIMETypeRegistry::getMIMETypeForExtension(fi.suffix());
}
if (!mimeType.length())
mimeType = MIMETypeRegistry::getMIMETypeForExtension(extension);
if (!mimeType.length())
mimeType = PluginDatabase::installedPlugins()->MIMETypeForExtension(extension);
if (!mimeType.length())
return ObjectContentFrame;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment