Changeset 81916 in webkit


Ignore:
Timestamp:
Mar 24, 2011 4:34:53 PM (13 years ago)
Author:
aestes@apple.com
Message:

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

  • fast/images/embed-image-plugins-disabled.html: Added.
  • platform/mac/fast/images/embed-image-expected.checksum:
  • platform/mac/fast/images/embed-image-expected.png:
  • platform/mac/fast/images/embed-image-expected.txt:
  • platform/mac/fast/images/embed-image-plugins-disabled-expected.checksum: Added.
  • platform/mac/fast/images/embed-image-plugins-disabled-expected.png: Added.
  • platform/mac/fast/images/embed-image-plugins-disabled-expected.txt: Added.

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

Update objectContentType() implementation to handle the
shouldPreferPlugInsForImages flag.

  • src/FrameLoaderClientImpl.cpp: (WebKit::FrameLoaderClientImpl::objectContentType):
  • src/FrameLoaderClientImpl.h:

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

Update objectContentType() implementation to handle the
shouldPreferPlugInsForImages flag.

  • WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::objectContentType):
  • WebCoreSupport/FrameLoaderClientQt.h:

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

Update objectContentType() implementation to handle the
shouldPreferPlugInsForImages flag.

  • WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::objectContentType):
  • WebCoreSupport/FrameLoaderClientGtk.h:

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

Update objectContentType() implementation to handle the
shouldPreferPlugInsForImages flag.

  • WebFrame.cpp: (WebFrame::objectContentType):
  • WebFrame.h:

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

Update objectContentType() implementation to handle the
shouldPreferPlugInsForImages flag.

  • WebKitSupport/FrameLoaderClientWx.cpp: (WebCore::FrameLoaderClientWx::objectContentType):
  • WebKitSupport/FrameLoaderClientWx.h:

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

Update objectContentType() implementation to handle the
shouldPreferPlugInsForImages flag.

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::objectContentType):

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

Update objectContentType() implementation to handle the
shouldPreferPlugInsForImages flag.

  • WebCoreSupport/FrameLoaderClientHaiku.cpp: (WebCore::FrameLoaderClientHaiku::objectContentType):
  • WebCoreSupport/FrameLoaderClientHaiku.h:

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

Update objectContentType() implementation to handle the
shouldPreferPlugInsForImages flag.

  • WebCoreSupport/FrameLoaderClientWinCE.cpp: (WebKit::FrameLoaderClientWinCE::objectContentType):
  • WebCoreSupport/FrameLoaderClientWinCE.h:

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

Update objectContentType() implementation to handle the
shouldPreferPlugInsForImages flag.

  • WebCoreSupport/FrameLoaderClientEfl.cpp: (WebCore::FrameLoaderClientEfl::objectContentType):
  • WebCoreSupport/FrameLoaderClientEfl.h:

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

AC_QuickTime.js uses the common <object>/<embed> paradigm to embed the
QuickTime plug-in in web pages. r70748 removed our mapping of classids
to MIME types, which causes WebKit to fall back from the object to the
embed tag when QuickTime is embedded by this script. The script emits
the following embed tag to embed a QuickTime movie with a poster frame:

<embed src="poster-frame.png" target="quicktimeplayer" href="movie.mov">

The expectation is that a QuickTime plug-in is instantiated to display the
poster frame, since QuickTime registers for many common image MIME
types. This is how Gecko behaves for embed. However, WebKit prefers to
use its native image rendering for image embeds, in which case no movie
is played when the poster frame is clicked.

Fix this by changing embed to check for a plug-in that can handle the
image type before rendering the image natively. This matches Gecko.

Test: fast/images/embed-image-plugins-disabled.html

  • html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parametersForPlugin):
  • html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::isImageType): (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
  • html/HTMLPlugInImageElement.h: (WebCore::HTMLPlugInImageElement::preferPluginsForImages):
  • loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::objectContentType):
  • loader/FrameLoader.cpp: (WebCore::FrameLoader::defaultObjectContentType):
  • loader/FrameLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/SubframeLoader.cpp: (WebCore::SubframeLoader::resourceWillUsePlugin): (WebCore::SubframeLoader::requestPlugin): (WebCore::SubframeLoader::requestObject): (WebCore::SubframeLoader::shouldUsePlugin):
  • loader/SubframeLoader.h:

2011-03-24 Andy Estes <aestes@apple.com>

Reviewed by Darin Adler.

REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
https://bugs.webkit.org/show_bug.cgi?id=49016

Update objectContentType() implementation to handle the
shouldPreferPlugInsForImages flag.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::objectContentType):
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
Location:
trunk
Files:
4 added
45 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r81906 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        * fast/images/embed-image-plugins-disabled.html: Added.
     9        * platform/mac/fast/images/embed-image-expected.checksum:
     10        * platform/mac/fast/images/embed-image-expected.png:
     11        * platform/mac/fast/images/embed-image-expected.txt:
     12        * platform/mac/fast/images/embed-image-plugins-disabled-expected.checksum: Added.
     13        * platform/mac/fast/images/embed-image-plugins-disabled-expected.png: Added.
     14        * platform/mac/fast/images/embed-image-plugins-disabled-expected.txt: Added.
     15
    1162011-03-24  Adam Klein  <adamk@chromium.org>
    217
  • trunk/LayoutTests/platform/mac/fast/images/embed-image-expected.checksum

    r38121 r81916  
    1 ad5bb30c7be3655a525d5f57f8731d58
     1f85b6c26e377cb0c2f3da7c3ead45a03
  • trunk/LayoutTests/platform/mac/fast/images/embed-image-expected.txt

    r35606 r81916  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderImage {EMBED} at (0,0) size 38x24
    76      RenderText {#text} at (0,0) size 0x0
     7layer at (8,8) size 38x24
     8  RenderEmbeddedObject {EMBED} at (0,0) size 38x24
  • trunk/Source/WebCore/ChangeLog

    r81915 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        AC_QuickTime.js uses the common <object>/<embed> paradigm to embed the
     9        QuickTime plug-in in web pages. r70748 removed our mapping of classids
     10        to MIME types, which causes WebKit to fall back from the object to the
     11        embed tag when QuickTime is embedded by this script. The script emits
     12        the following embed tag to embed a QuickTime movie with a poster frame:
     13
     14        <embed src="poster-frame.png" target="quicktimeplayer" href="movie.mov">
     15
     16        The expectation is that a QuickTime plug-in is instantiated to display the
     17        poster frame, since QuickTime registers for many common image MIME
     18        types. This is how Gecko behaves for embed. However, WebKit prefers to
     19        use its native image rendering for image embeds, in which case no movie
     20        is played when the poster frame is clicked.
     21
     22        Fix this by changing embed to check for a plug-in that can handle the
     23        image type before rendering the image natively. This matches Gecko.
     24
     25        Test: fast/images/embed-image-plugins-disabled.html
     26
     27        * html/HTMLObjectElement.cpp:
     28        (WebCore::HTMLObjectElement::parametersForPlugin):
     29        * html/HTMLPlugInImageElement.cpp:
     30        (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
     31        (WebCore::HTMLPlugInImageElement::isImageType):
     32        (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
     33        * html/HTMLPlugInImageElement.h:
     34        (WebCore::HTMLPlugInImageElement::preferPluginsForImages):
     35        * loader/EmptyClients.h:
     36        (WebCore::EmptyFrameLoaderClient::objectContentType):
     37        * loader/FrameLoader.cpp:
     38        (WebCore::FrameLoader::defaultObjectContentType):
     39        * loader/FrameLoader.h:
     40        * loader/FrameLoaderClient.h:
     41        * loader/SubframeLoader.cpp:
     42        (WebCore::SubframeLoader::resourceWillUsePlugin):
     43        (WebCore::SubframeLoader::requestPlugin):
     44        (WebCore::SubframeLoader::requestObject):
     45        (WebCore::SubframeLoader::shouldUsePlugin):
     46        * loader/SubframeLoader.h:
     47
    1482011-03-24  Mike Reed  <reed@google.com>
    249
  • trunk/Source/WebCore/html/HTMLEmbedElement.cpp

    r81611 r81916  
    33 *           (C) 1999 Antti Koivisto (koivisto@kde.org)
    44 *           (C) 2000 Stefan Schimanski (1Stein@gmx.de)
    5  * Copyright (C) 2004, 2005, 2006, 2008, 2009 Apple Inc. All rights reserved.
     5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2011 Apple Inc. All rights reserved.
    66 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
    77 *
     
    4747
    4848inline HTMLEmbedElement::HTMLEmbedElement(const QualifiedName& tagName, Document* document, bool createdByParser)
    49     : HTMLPlugInImageElement(tagName, document, createdByParser)
     49    : HTMLPlugInImageElement(tagName, document, createdByParser, ShouldPreferPlugInsForImages)
    5050{
    5151    ASSERT(hasTagName(embedTag));
  • trunk/Source/WebCore/html/HTMLObjectElement.cpp

    r81611 r81916  
    33 *           (C) 1999 Antti Koivisto (koivisto@kde.org)
    44 *           (C) 2000 Stefan Schimanski (1Stein@gmx.de)
    5  * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
     5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
    66 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
    77 *
     
    4949
    5050inline HTMLObjectElement::HTMLObjectElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form, bool createdByParser)
    51     : HTMLPlugInImageElement(tagName, document, createdByParser)
     51    : HTMLPlugInImageElement(tagName, document, createdByParser, ShouldNotPreferPlugInsForImages)
    5252    , FormAssociatedElement(form)
    5353    , m_docNamedItem(true)
     
    218218    if (url.isEmpty() && !urlParameter.isEmpty()) {
    219219        SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
    220         if (loader->resourceWillUsePlugin(urlParameter, serviceType))
     220        if (loader->resourceWillUsePlugin(urlParameter, serviceType, shouldPreferPlugInsForImages()))
    221221            url = urlParameter;
    222222    }
  • trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp

    r77366 r81916  
    11/*
    2  * Copyright (C) 2008 Apple Inc. All rights reserved.
     2 * Copyright (C) 2008, 2011 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2626#include "FrameLoaderClient.h"
    2727#include "HTMLImageLoader.h"
     28#include "HTMLNames.h"
    2829#include "Image.h"
    2930#include "Page.h"
     
    3334namespace WebCore {
    3435
    35 HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document, bool createdByParser)
     36HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document, bool createdByParser, PreferPlugInsForImagesOption preferPlugInsForImagesOption)
    3637    : HTMLPlugInElement(tagName, document)
    3738    // m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay
     
    4041    // the same codepath in this class.
    4142    , m_needsWidgetUpdate(!createdByParser)
     43    , m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption == ShouldPreferPlugInsForImages)
    4244{
    4345}
     
    5961    if (Frame* frame = document()->frame()) {
    6062        KURL completedURL = frame->loader()->completeURL(m_url);
    61         return frame->loader()->client()->objectContentType(completedURL, m_serviceType) == ObjectContentImage;
     63        return frame->loader()->client()->objectContentType(completedURL, m_serviceType, shouldPreferPlugInsForImages()) == ObjectContentImage;
    6264    }
    6365
     
    100102        completedURL = frameLoader->completeURL(url);
    101103
    102     if (frameLoader->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin)
     104    if (frameLoader->client()->objectContentType(completedURL, serviceType, shouldPreferPlugInsForImages()) == ObjectContentNetscapePlugin)
    103105        return true;
    104106    return false;
  • trunk/Source/WebCore/html/HTMLPlugInImageElement.h

    r77366 r81916  
    11/*
    2  * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    3434    CreateOnlyNonNetscapePlugins,
    3535};
     36   
     37enum PreferPlugInsForImagesOption {
     38    ShouldPreferPlugInsForImages,
     39    ShouldNotPreferPlugInsForImages
     40};
    3641
    3742// Base class for HTMLObjectElement and HTMLEmbedElement
     
    4449    const String& serviceType() const { return m_serviceType; }
    4550    const String& url() const { return m_url; }
     51    bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForImages; }
    4652
    4753protected:
    48     HTMLPlugInImageElement(const QualifiedName& tagName, Document*, bool createdByParser);
     54    HTMLPlugInImageElement(const QualifiedName& tagName, Document*, bool createdByParser, PreferPlugInsForImagesOption);
    4955
    5056    bool isImageType();
     
    7682   
    7783    bool m_needsWidgetUpdate;
     84    bool m_shouldPreferPlugInsForImages;
    7885};
    7986
  • trunk/Source/WebCore/loader/EmptyClients.h

    r81855 r81916  
    11/*
    22 * Copyright (C) 2006 Eric Seidel (eric@webkit.org)
    3  * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
     3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
    44 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    55 *
     
    371371#endif
    372372
    373     virtual ObjectContentType objectContentType(const KURL&, const String&) { return ObjectContentType(); }
     373    virtual ObjectContentType objectContentType(const KURL&, const String&, bool) { return ObjectContentType(); }
    374374    virtual String overrideMediaType() const { return String(); }
    375375
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r81897 r81916  
    11/*
    2  * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
    33 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
    44 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
     
    984984#endif // ENABLE(WEB_ARCHIVE)
    985985
    986 ObjectContentType FrameLoader::defaultObjectContentType(const KURL& url, const String& mimeTypeIn)
     986ObjectContentType FrameLoader::defaultObjectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
    987987{
    988988    String mimeType = mimeTypeIn;
     
    10011001        return ObjectContentFrame; // Go ahead and hope that we can display the content.
    10021002
     1003#if !PLATFORM(MAC) && !PLATFORM(CHROMIUM) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL
     1004    bool plugInSupportsMIMEType = PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType);
     1005#else
     1006    bool plugInSupportsMIMEType = false;
     1007#endif
     1008
    10031009    if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
    1004         return WebCore::ObjectContentImage;
    1005 
    1006 #if !PLATFORM(MAC) && !PLATFORM(CHROMIUM) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL
    1007     if (PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType))
     1010        return shouldPreferPlugInsForImages && plugInSupportsMIMEType ? WebCore::ObjectContentNetscapePlugin : WebCore::ObjectContentImage;
     1011
     1012    if (plugInSupportsMIMEType)
    10081013        return WebCore::ObjectContentNetscapePlugin;
    1009 #endif
    10101014
    10111015    if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType))
  • trunk/Source/WebCore/loader/FrameLoader.h

    r81484 r81916  
    11/*
    2  * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
    33 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
    44 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
     
    324324    bool suppressOpenerInNewFrame() const { return m_suppressOpenerInNewFrame; }
    325325
    326     static ObjectContentType defaultObjectContentType(const KURL& url, const String& mimeType);
     326    static ObjectContentType defaultObjectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages);
    327327
    328328    void clear(bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true);
  • trunk/Source/WebCore/loader/FrameLoaderClient.h

    r80475 r81916  
    11/*
    2  * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    260260#endif
    261261
    262         virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType) = 0;
     262        virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages) = 0;
    263263        virtual String overrideMediaType() const = 0;
    264264
  • trunk/Source/WebCore/loader/SubframeLoader.cpp

    r77752 r81916  
    11/*
    2  * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
    33 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
    44 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
     
    8989}
    9090   
    91 bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mimeType)
     91bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mimeType, bool shouldPreferPlugInsForImages)
    9292{
    9393    KURL completedURL;
    9494    if (!url.isEmpty())
    9595        completedURL = completeURL(url);
     96
    9697    bool useFallback;
    97     return shouldUsePlugin(completedURL, mimeType, false, useFallback);
    98 }
    99 
    100 bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const String& url, const AtomicString& frameName,
    101     const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues)
     98    return shouldUsePlugin(completedURL, mimeType, shouldPreferPlugInsForImages, false, useFallback);
     99}
     100
     101bool SubframeLoader::requestPlugin(HTMLPlugInImageElement* ownerElement, const KURL& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
     102{
     103    Settings* settings = m_frame->settings();
     104    if ((!allowPlugins(AboutToInstantiatePlugin)
     105         // Application plug-ins are plug-ins implemented by the user agent, for example Qt plug-ins,
     106         // as opposed to third-party code such as Flash. The user agent decides whether or not they are
     107         // permitted, rather than WebKit.
     108         && !MIMETypeRegistry::isApplicationPluginMIMEType(mimeType))
     109        || (!settings->isJavaEnabled() && MIMETypeRegistry::isJavaAppletMIMEType(mimeType)))
     110        return false;
     111
     112    if (m_frame->document() && m_frame->document()->securityOrigin()->isSandboxed(SandboxPlugins))
     113        return false;
     114
     115    ASSERT(ownerElement->hasTagName(objectTag) || ownerElement->hasTagName(embedTag));
     116    return loadPlugin(ownerElement, url, mimeType, paramNames, paramValues, useFallback);
     117}
     118 
     119bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const String& url, const AtomicString& frameName, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues)
    102120{
    103121    if (url.isEmpty() && mimeType.isEmpty())
     
    115133
    116134    bool useFallback;
    117     if (shouldUsePlugin(completedURL, mimeType, renderer->hasFallbackContent(), useFallback)) {
    118         Settings* settings = m_frame->settings();
    119         if ((!allowPlugins(AboutToInstantiatePlugin)
    120              // Application plugins are plugins implemented by the user agent, for example Qt plugins,
    121              // as opposed to third-party code such as flash. The user agent decides whether or not they are
    122              // permitted, rather than WebKit.
    123              && !MIMETypeRegistry::isApplicationPluginMIMEType(mimeType))
    124             || (!settings->isJavaEnabled() && MIMETypeRegistry::isJavaAppletMIMEType(mimeType)))
    125             return false;
    126         if (m_frame->document() && m_frame->document()->securityOrigin()->isSandboxed(SandboxPlugins))
    127             return false;
    128 
    129         ASSERT(ownerElement->hasTagName(objectTag) || ownerElement->hasTagName(embedTag));
    130         HTMLPlugInImageElement* pluginElement = static_cast<HTMLPlugInImageElement*>(ownerElement);
    131 
    132         return loadPlugin(pluginElement, completedURL, mimeType, paramNames, paramValues, useFallback);
    133     }
     135    if (shouldUsePlugin(completedURL, mimeType, ownerElement->shouldPreferPlugInsForImages(), renderer->hasFallbackContent(), useFallback))
     136        return requestPlugin(ownerElement, completedURL, mimeType, paramNames, paramValues, useFallback);
    134137
    135138    // If the plug-in element already contains a subframe, loadOrRedirectSubframe will re-use it. Otherwise,
     
    290293}
    291294
    292 bool SubframeLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback)
     295bool SubframeLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages, bool hasFallback, bool& useFallback)
    293296{
    294297    if (m_frame->loader()->client()->shouldUsePluginDocument(mimeType)) {
     
    306309    }
    307310       
    308     ObjectContentType objectType = m_frame->loader()->client()->objectContentType(url, mimeType);
     311    ObjectContentType objectType = m_frame->loader()->client()->objectContentType(url, mimeType, shouldPreferPlugInsForImages);
    309312    // If an object's content can't be handled and it has no fallback, let
    310313    // it be handled as a plugin to show the broken plugin icon.
  • trunk/Source/WebCore/loader/SubframeLoader.h

    r76248 r81916  
    11/*
    2  * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
    33 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
    44 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
     
    7878    bool containsPlugins() const { return m_containsPlugins; }
    7979   
    80     bool resourceWillUsePlugin(const String& url, const String& mimeType);
     80    bool resourceWillUsePlugin(const String& url, const String& mimeType, bool shouldPreferPlugInsForImages);
    8181
    8282private:
     83    bool requestPlugin(HTMLPlugInImageElement*, const KURL&, const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
    8384    Frame* loadOrRedirectSubframe(HTMLFrameOwnerElement*, const KURL&, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList);
    8485    Frame* loadSubframe(HTMLFrameOwnerElement*, const KURL&, const String& name, const String& referrer);
     
    8687        const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
    8788
    88     bool shouldUsePlugin(const KURL&, const String& mimeType, bool hasFallback, bool& useFallback);
     89    bool shouldUsePlugin(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages, bool hasFallback, bool& useFallback);
    8990
    9091    Document* document() const;
  • trunk/Source/WebKit/chromium/ChangeLog

    r81913 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        Update objectContentType() implementation to handle the
     9        shouldPreferPlugInsForImages flag.
     10
     11        * src/FrameLoaderClientImpl.cpp:
     12        (WebKit::FrameLoaderClientImpl::objectContentType):
     13        * src/FrameLoaderClientImpl.h:
     14
    1152011-03-24  Bill Budge  <bbudge@chromium.org>
    216
  • trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp

    r80475 r81916  
    11/*
    22 * Copyright (C) 2009 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    14801481ObjectContentType FrameLoaderClientImpl::objectContentType(
    14811482    const KURL& url,
    1482     const String& explicitMimeType)
     1483    const String& explicitMimeType,
     1484    bool shouldPreferPlugInsForImages)
    14831485{
    14841486    // This code is based on Apple's implementation from
     
    15041506    }
    15051507
    1506     if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
    1507         return ObjectContentImage;
    1508 
    15091508    // If Chrome is started with the --disable-plugins switch, pluginData is 0.
    15101509    PluginData* pluginData = m_webFrame->frame()->page()->pluginData();
    1511     if (pluginData && pluginData->supportsMimeType(mimeType))
     1510    bool plugInSupportsMIMEType = pluginData && pluginData->supportsMimeType(mimeType);
     1511
     1512    if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
     1513        return shouldPreferPlugInsForImages && plugInSupportsMIMEType ? return ObjectContentNetscapePlugin : return ObjectContentImage;
     1514
     1515    if (plugInSupportsMIMEType)
    15121516        return ObjectContentNetscapePlugin;
    15131517
  • trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.h

    r80475 r81916  
    11/*
    22 * Copyright (C) 2009 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    198199        const Vector<WTF::String>& paramValues);
    199200    virtual WebCore::ObjectContentType objectContentType(
    200         const WebCore::KURL& url, const WTF::String& mimeType);
     201        const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages);
    201202    virtual WTF::String overrideMediaType() const;
    202203    virtual void didPerformFirstNavigation() const;
  • trunk/Source/WebKit/efl/ChangeLog

    r81824 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        Update objectContentType() implementation to handle the
     9        shouldPreferPlugInsForImages flag.
     10
     11        * WebCoreSupport/FrameLoaderClientEfl.cpp:
     12        (WebCore::FrameLoaderClientEfl::objectContentType):
     13        * WebCoreSupport/FrameLoaderClientEfl.h:
     14
    1152011-03-23  Brady Eidson  <beidson@apple.com>
    216
  • trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp

    r80475 r81916  
    11/*
    22 * Copyright (C) 2006 Zack Rusin <zack@kde.org>
    3  * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
     3 * Copyright (C) 2006, 2011 Apple Inc. All rights reserved.
    44 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
    55 * Copyright (C) 2008 Collabora Ltd. All rights reserved.
     
    400400}
    401401
    402 ObjectContentType FrameLoaderClientEfl::objectContentType(const KURL& url, const String& mimeType)
    403 {
     402ObjectContentType FrameLoaderClientEfl::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
     403{
     404    // FIXME: once plugin support is enabled, this method needs to correctly handle the 'shouldPreferPlugInsForImages' flag. See
     405    // WebCore::FrameLoader::defaultObjectContentType() for an example.
     406    UNUSED_PARAM(shouldPreferPlugInsForImages);
     407
    404408    if (url.isEmpty() && mimeType.isEmpty())
    405409        return ObjectContentNone;
  • trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h

    r80475 r81916  
    11/*
    22 * Copyright (C) 2006 Zack Rusin <zack@kde.org>
    3  * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
     3 * Copyright (C) 2006, 2011 Apple Inc. All rights reserved.
    44 * Copyright (C) 2008 Collabora Ltd. All rights reserved.
    55 * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
     
    150150    virtual void registerForIconNotification(bool);
    151151
    152     virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
     152    virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages);
    153153
    154154    virtual void setMainFrameDocumentReady(bool);
  • trunk/Source/WebKit/gtk/ChangeLog

    r81824 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        Update objectContentType() implementation to handle the
     9        shouldPreferPlugInsForImages flag.
     10
     11        * WebCoreSupport/FrameLoaderClientGtk.cpp:
     12        (WebKit::FrameLoaderClient::objectContentType):
     13        * WebCoreSupport/FrameLoaderClientGtk.h:
     14
    1152011-03-23  Brady Eidson  <beidson@apple.com>
    216
  • trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

    r80561 r81916  
    77 *  Copyright (C) Research In Motion Limited 2009. All rights reserved.
    88 *  Copyright (C) 2010 Igalia S.L.
     9 *  Copyright (C) 2011 Apple Inc. All rights reserved.
    910 *
    1011 *  This library is free software; you can redistribute it and/or
     
    712713}
    713714
    714 ObjectContentType FrameLoaderClient::objectContentType(const KURL& url, const String& mimeType)
    715 {
    716     return FrameLoader::defaultObjectContentType(url, mimeType);
     715ObjectContentType FrameLoaderClient::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
     716{
     717    return FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages);
    717718}
    718719
  • trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h

    r80475 r81916  
    11/*
    22 * Copyright (C) 2006 Zack Rusin <zack@kde.org>
    3  * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
     3 * Copyright (C) 2006, 2011 Apple Inc. All rights reserved.
    44 * Copyright (C) 2008 Collabora Ltd. All rights reserved.
    55 *
     
    127127        virtual void registerForIconNotification(bool);
    128128
    129         virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WTF::String& mimeType);
     129        virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages);
    130130
    131131        virtual void setMainFrameDocumentReady(bool);
  • trunk/Source/WebKit/haiku/ChangeLog

    r80475 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        Update objectContentType() implementation to handle the
     9        shouldPreferPlugInsForImages flag.
     10
     11        * WebCoreSupport/FrameLoaderClientHaiku.cpp:
     12        (WebCore::FrameLoaderClientHaiku::objectContentType):
     13        * WebCoreSupport/FrameLoaderClientHaiku.h:
     14
    1152011-03-07  Sam Weinig  <sam@webkit.org>
    216
  • trunk/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp

    r80475 r81916  
    22 * Copyright (C) 2006 Don Gibson <dgibson77@gmail.com>
    33 * Copyright (C) 2006 Zack Rusin <zack@kde.org>
    4  * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
     4 * Copyright (C) 2006, 2011 Apple Inc. All rights reserved.
    55 * Copyright (C) 2007 Trolltech ASA
    66 * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> All rights reserved.
     
    755755}
    756756
    757 ObjectContentType FrameLoaderClientHaiku::objectContentType(const KURL& url, const String& mimeType)
     757ObjectContentType FrameLoaderClientHaiku::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
    758758{
    759759    notImplemented();
  • trunk/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h

    r80475 r81916  
    11/*
    22 * Copyright (C) 2006 Zack Rusin <zack@kde.org>
    3  * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
     3 * Copyright (C) 2006, 2011 Apple Inc. All rights reserved.
    44 * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> All rights reserved.
    55 *
     
    240240                                                          const Vector<String>& paramValues);
    241241
    242         virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
     242        virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages);
    243243        virtual String overrideMediaType() const;
    244244
  • trunk/Source/WebKit/mac/ChangeLog

    r81904 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        Update objectContentType() implementation to handle the
     9        shouldPreferPlugInsForImages flag.
     10
     11        * WebCoreSupport/WebFrameLoaderClient.h:
     12        * WebCoreSupport/WebFrameLoaderClient.mm:
     13        (WebFrameLoaderClient::objectContentType):
     14
    1152011-03-24  Geoffrey Garen  <ggaren@apple.com>
    216
  • trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h

    r80475 r81916  
    11/*
    2  * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    217217#endif
    218218   
    219     virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WTF::String& mimeType);
     219    virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages);
    220220    virtual WTF::String overrideMediaType() const;
    221221   
  • trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r80475 r81916  
    11/*
    2  * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    14551455}
    14561456
    1457 ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeType)
     1457ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
    14581458{
    14591459    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    14921492        return ObjectContentFrame; // Go ahead and hope that we can display the content.
    14931493
    1494     if (MIMETypeRegistry::isSupportedImageMIMEType(type))
    1495         return ObjectContentImage;
    1496 
    14971494    WebBasePluginPackage *package = [getWebView(m_webFrame.get()) _pluginForMIMEType:type];
     1495    ObjectContentType plugInType = ObjectContentNone;
    14981496    if (package) {
    14991497#if ENABLE(NETSCAPE_PLUGIN_API)
    15001498        if ([package isKindOfClass:[WebNetscapePluginPackage class]])
    1501             return ObjectContentNetscapePlugin;
     1499            plugInType = ObjectContentNetscapePlugin;
     1500        else
    15021501#endif
    1503         ASSERT([package isKindOfClass:[WebPluginPackage class]]);
    1504         return ObjectContentOtherPlugin;
    1505     }
     1502        {
     1503            ASSERT([package isKindOfClass:[WebPluginPackage class]]);
     1504            plugInType = ObjectContentOtherPlugin;
     1505        }
     1506    }
     1507   
     1508    if (MIMETypeRegistry::isSupportedImageMIMEType(type))
     1509        return shouldPreferPlugInsForImages && plugInType != ObjectContentNone ? plugInType : ObjectContentImage;
     1510
     1511    if (plugInType != ObjectContentNone)
     1512        return plugInType;
    15061513
    15071514    if ([m_webFrame->_private->webFrameView _viewClassForMIMEType:type])
  • trunk/Source/WebKit/qt/ChangeLog

    r81886 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        Update objectContentType() implementation to handle the
     9        shouldPreferPlugInsForImages flag.
     10
     11        * WebCoreSupport/FrameLoaderClientQt.cpp:
     12        (WebCore::FrameLoaderClientQt::objectContentType):
     13        * WebCoreSupport/FrameLoaderClientQt.h:
     14
    1152011-03-24  Benjamin Poulain  <benjamin.poulain@nokia.com>
    216
  • trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r81868 r81916  
    11/*
    22 * Copyright (C) 2006 Zack Rusin <zack@kde.org>
    3  * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
     3 * Copyright (C) 2006, 2011 Apple Inc. All rights reserved.
    44 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
    55 * Copyright (C) 2008 Collabora Ltd. All rights reserved.
     
    13131313}
    13141314
    1315 ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& _mimeType)
    1316 {
    1317 //    qDebug()<<" ++++++++++++++++ url is "<<url.prettyURL()<<", mime = "<<_mimeType;
     1315ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
     1316{
     1317//    qDebug()<<" ++++++++++++++++ url is "<<url.prettyURL()<<", mime = "<<mimeTypeIn;
    13181318    QFileInfo fi(url.path());
    13191319    String extension = fi.suffix();
    1320     if (_mimeType == "application/x-qt-plugin" || _mimeType == "application/x-qt-styled-widget")
     1320    if (mimeTypeIn == "application/x-qt-plugin" || mimeTypeIn == "application/x-qt-styled-widget")
    13211321        return ObjectContentOtherPlugin;
    13221322
    1323     if (url.isEmpty() && !_mimeType.length())
     1323    if (url.isEmpty() && !mimeTypeIn.length())
    13241324        return ObjectContentNone;
    13251325
    1326     String mimeType = _mimeType;
     1326    String mimeType = mimeTypeIn;
    13271327    if (!mimeType.length())
    13281328        mimeType = MIMETypeRegistry::getMIMETypeForExtension(extension);
     
    13341334        return ObjectContentFrame;
    13351335
     1336    ObjectContentType plugInType = ObjectContentNone;
     1337    if (PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType))
     1338        plugInType = ObjectContentNetscapePlugin;
     1339    else if (m_frame->page() && m_frame->page()->pluginData() && m_frame->page()->pluginData()->supportsMimeType(mimeType))
     1340        plugInType = ObjectContentOtherPlugin;
     1341       
    13361342    if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
    1337         return ObjectContentImage;
    1338 
    1339     if (PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType))
    1340         return ObjectContentNetscapePlugin;
    1341 
    1342     if (m_frame->page() && m_frame->page()->pluginData() && m_frame->page()->pluginData()->supportsMimeType(mimeType))
    1343         return ObjectContentOtherPlugin;
     1343        return shouldPreferPlugInsForImages && plugInType != ObjectContentNone ? plugInType : ObjectContentImage;
     1344   
     1345    if (plugInType != ObjectContentNone)
     1346        return plugInType;
    13441347
    13451348    if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType))
  • trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h

    r80768 r81916  
    11/*
    22 * Copyright (C) 2006 Zack Rusin <zack@kde.org>
    3  * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
     3 * Copyright (C) 2006, 2011 Apple Inc. All rights reserved.
    44 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
    55 * Copyright (C) 2008 Collabora Ltd. All rights reserved.
     
    212212    virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
    213213
    214     virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
     214    virtual ObjectContentType objectContentType(const KURL&, const String& mimeTypeIn, bool shouldPreferPlugInsForImages);
    215215    virtual String overrideMediaType() const;
    216216
  • trunk/Source/WebKit/win/ChangeLog

    r81824 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        Update objectContentType() implementation to handle the
     9        shouldPreferPlugInsForImages flag.
     10
     11        * WebFrame.cpp:
     12        (WebFrame::objectContentType):
     13        * WebFrame.h:
     14
    1152011-03-23  Brady Eidson  <beidson@apple.com>
    216
  • trunk/Source/WebKit/win/WebFrame.cpp

    r80475 r81916  
    11/*
    2  * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
    33 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
    44 *
     
    19001900}
    19011901
    1902 ObjectContentType WebFrame::objectContentType(const KURL& url, const String& mimeType)
    1903 {
    1904     return WebCore::FrameLoader::defaultObjectContentType(url, mimeType);
     1902ObjectContentType WebFrame::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
     1903{
     1904    return WebCore::FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages);
    19051905}
    19061906
  • trunk/Source/WebKit/win/WebFrame.h

    r80475 r81916  
    11/*
    2  * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    342342    virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const Vector<WTF::String>& paramNames, const Vector<WTF::String>& paramValues);
    343343
    344     virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WTF::String& mimeType);
     344    virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages);
    345345    virtual WTF::String overrideMediaType() const;
    346346
  • trunk/Source/WebKit/wince/ChangeLog

    r80475 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        Update objectContentType() implementation to handle the
     9        shouldPreferPlugInsForImages flag.
     10
     11        * WebCoreSupport/FrameLoaderClientWinCE.cpp:
     12        (WebKit::FrameLoaderClientWinCE::objectContentType):
     13        * WebCoreSupport/FrameLoaderClientWinCE.h:
     14
    1152011-03-07  Sam Weinig  <sam@webkit.org>
    216
  • trunk/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp

    r80475 r81916  
    11/*
    22 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    183184}
    184185
    185 ObjectContentType FrameLoaderClientWinCE::objectContentType(const KURL& url, const String& mimeType)
    186 {
    187     return FrameLoader::defaultObjectContentType(url, mimeType);
     186ObjectContentType FrameLoaderClientWinCE::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
     187{
     188    return FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages);
    188189}
    189190
  • trunk/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h

    r80475 r81916  
    11/*
    22 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    121122    virtual void registerForIconNotification(bool);
    122123
    123     virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WTF::String& mimeType);
     124    virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages);
    124125
    125126    virtual void setMainFrameDocumentReady(bool);
  • trunk/Source/WebKit/wx/ChangeLog

    r81600 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        Update objectContentType() implementation to handle the
     9        shouldPreferPlugInsForImages flag.
     10
     11        * WebKitSupport/FrameLoaderClientWx.cpp:
     12        (WebCore::FrameLoaderClientWx::objectContentType):
     13        * WebKitSupport/FrameLoaderClientWx.h:
     14
    1152011-03-21  Chang Shu  <cshu@webkit.org>
    216
  • trunk/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp

    r80475 r81916  
    11/*
    22 * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com>
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * All rights reserved.
     
    871872}
    872873
    873 ObjectContentType FrameLoaderClientWx::objectContentType(const KURL& url, const String& mimeType)
     874ObjectContentType FrameLoaderClientWx::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
    874875{
    875876    notImplemented();
  • trunk/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h

    r80475 r81916  
    11/*
    22 * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com>
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * All rights reserved.
     
    218219        virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
    219220
    220         virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
     221        virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages);
    221222        virtual String overrideMediaType() const;
    222223
  • trunk/Source/WebKit2/ChangeLog

    r81912 r81916  
     12011-03-24  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
     6        https://bugs.webkit.org/show_bug.cgi?id=49016
     7
     8        Update objectContentType() implementation to handle the
     9        shouldPreferPlugInsForImages flag.
     10
     11        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     12        (WebKit::WebFrameLoaderClient::objectContentType):
     13        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
     14
    1152011-03-24  Adam Roben  <aroben@apple.com>
    216
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r81732 r81916  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    12691269}
    12701270
    1271 ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeTypeIn)
     1271ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
    12721272{
    12731273    // FIXME: This should be merged with WebCore::FrameLoader::defaultObjectContentType when the plugin code
     
    12951295        return ObjectContentFrame;
    12961296
    1297     if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
    1298         return WebCore::ObjectContentImage;
    1299 
     1297    bool plugInSupportsMIMEType = false;
    13001298    if (WebPage* webPage = m_frame->page()) {
    13011299        if (PluginData* pluginData = webPage->corePage()->pluginData()) {
    13021300            if (pluginData->supportsMimeType(mimeType))
    1303                 return ObjectContentNetscapePlugin;
     1301                plugInSupportsMIMEType = true;
    13041302        }
    13051303    }
     1304   
     1305    if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
     1306        return shouldPreferPlugInsForImages && plugInSupportsMIMEType ? ObjectContentNetscapePlugin : ObjectContentImage;
     1307
     1308    if (plugInSupportsMIMEType)
     1309        return ObjectContentNetscapePlugin;
    13061310
    13071311    if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType))
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h

    r80475 r81916  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    192192    virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
    193193   
    194     virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const String& mimeType);
     194    virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL&, const String& mimeType, bool shouldPreferPlugInsForImages);
    195195    virtual String overrideMediaType() const;
    196196
Note: See TracChangeset for help on using the changeset viewer.