2011-03-25 Andy Estes <aestes@apple.com>
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Mar 2011 23:07:43 +0000 (23:07 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Mar 2011 23:07:43 +0000 (23:07 +0000)
commite9111cab69112720ec907a1ba8e146fd383d95e8
tree77f4d763eddd55b48d2d0e2635e2211da7f03c1b
parent0c0ced807f14d6c77f01f81806c56977877fc891
2011-03-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

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

        TestNetscapePlugIn needs to register support for an image MIME type so
        we can test that the embed tag prefers plug-ins to render image MIME
        types.

        * DumpRenderTree/TestNetscapePlugIn/mac/Info.plist: Register image/png.
        * DumpRenderTree/TestNetscapePlugIn/main.cpp:
        (NP_GetMIMEDescription): Ditto.
        * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc: Ditto.
2011-03-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

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

        * fast/images/embed-image.html: Disable plug-ins to continue testing
        native image rendering with embed.
        * plugins/embed-prefers-plugins-for-images-expected.txt: Added.
        * plugins/embed-prefers-plugins-for-images.html: Added.
        * plugins/plugin-javascript-access-expected.txt: Updated to include the
        new MIME type registered by TestNetscapePlugIn.
2011-03-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

        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-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

        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-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

        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-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

        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-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

        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-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

        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-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

        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-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

        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-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

        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-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

        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: plugins/embed-prefers-plugins-for-images.html

        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::HTMLEmbedElement):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::HTMLObjectElement):
        (WebCore::HTMLObjectElement::parametersForPlugin):
        * html/HTMLPlugInImageElement.cpp:
        (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
        (WebCore::HTMLPlugInImageElement::isImageType):
        (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
        * html/HTMLPlugInImageElement.h:
        (WebCore::HTMLPlugInImageElement::shouldPreferPlugInsForImages):
        * 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-25  Andy Estes  <aestes@apple.com>

        Reviewed by Adele Peterson.

        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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
50 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/images/embed-image.html
LayoutTests/plugins/embed-prefers-plugins-for-images-expected.txt [new file with mode: 0644]
LayoutTests/plugins/embed-prefers-plugins-for-images.html [new file with mode: 0644]
LayoutTests/plugins/plugin-javascript-access-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.h
Source/WebCore/loader/EmptyClients.h
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoader.h
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/loader/SubframeLoader.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
Source/WebKit/chromium/src/FrameLoaderClientImpl.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
Source/WebKit/haiku/ChangeLog
Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebFrame.cpp
Source/WebKit/win/WebFrame.h
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h
Source/WebKit/wx/ChangeLog
Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Tools/ChangeLog
Tools/DumpRenderTree/TestNetscapePlugIn/mac/Info.plist
Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp
Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc