Changeset 81916 in webkit
- Timestamp:
- Mar 24, 2011 4:34:53 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 45 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r81906 r81916 1 2011-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 1 16 2011-03-24 Adam Klein <adamk@chromium.org> 2 17 -
trunk/LayoutTests/platform/mac/fast/images/embed-image-expected.checksum
r38121 r81916 1 ad5bb30c7be3655a525d5f57f8731d58 1 f85b6c26e377cb0c2f3da7c3ead45a03 -
trunk/LayoutTests/platform/mac/fast/images/embed-image-expected.txt
r35606 r81916 4 4 RenderBlock {HTML} at (0,0) size 800x600 5 5 RenderBody {BODY} at (8,8) size 784x584 6 RenderImage {EMBED} at (0,0) size 38x247 6 RenderText {#text} at (0,0) size 0x0 7 layer at (8,8) size 38x24 8 RenderEmbeddedObject {EMBED} at (0,0) size 38x24 -
trunk/Source/WebCore/ChangeLog
r81915 r81916 1 2011-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 1 48 2011-03-24 Mike Reed <reed@google.com> 2 49 -
trunk/Source/WebCore/html/HTMLEmbedElement.cpp
r81611 r81916 3 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 4 * (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. 6 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 7 * … … 47 47 48 48 inline HTMLEmbedElement::HTMLEmbedElement(const QualifiedName& tagName, Document* document, bool createdByParser) 49 : HTMLPlugInImageElement(tagName, document, createdByParser )49 : HTMLPlugInImageElement(tagName, document, createdByParser, ShouldPreferPlugInsForImages) 50 50 { 51 51 ASSERT(hasTagName(embedTag)); -
trunk/Source/WebCore/html/HTMLObjectElement.cpp
r81611 r81916 3 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 4 * (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. 6 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 7 * … … 49 49 50 50 inline HTMLObjectElement::HTMLObjectElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form, bool createdByParser) 51 : HTMLPlugInImageElement(tagName, document, createdByParser )51 : HTMLPlugInImageElement(tagName, document, createdByParser, ShouldNotPreferPlugInsForImages) 52 52 , FormAssociatedElement(form) 53 53 , m_docNamedItem(true) … … 218 218 if (url.isEmpty() && !urlParameter.isEmpty()) { 219 219 SubframeLoader* loader = document()->frame()->loader()->subframeLoader(); 220 if (loader->resourceWillUsePlugin(urlParameter, serviceType ))220 if (loader->resourceWillUsePlugin(urlParameter, serviceType, shouldPreferPlugInsForImages())) 221 221 url = urlParameter; 222 222 } -
trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp
r77366 r81916 1 1 /* 2 * Copyright (C) 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2008, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 26 26 #include "FrameLoaderClient.h" 27 27 #include "HTMLImageLoader.h" 28 #include "HTMLNames.h" 28 29 #include "Image.h" 29 30 #include "Page.h" … … 33 34 namespace WebCore { 34 35 35 HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document, bool createdByParser )36 HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document, bool createdByParser, PreferPlugInsForImagesOption preferPlugInsForImagesOption) 36 37 : HTMLPlugInElement(tagName, document) 37 38 // m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay … … 40 41 // the same codepath in this class. 41 42 , m_needsWidgetUpdate(!createdByParser) 43 , m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption == ShouldPreferPlugInsForImages) 42 44 { 43 45 } … … 59 61 if (Frame* frame = document()->frame()) { 60 62 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; 62 64 } 63 65 … … 100 102 completedURL = frameLoader->completeURL(url); 101 103 102 if (frameLoader->client()->objectContentType(completedURL, serviceType ) == ObjectContentNetscapePlugin)104 if (frameLoader->client()->objectContentType(completedURL, serviceType, shouldPreferPlugInsForImages()) == ObjectContentNetscapePlugin) 103 105 return true; 104 106 return false; -
trunk/Source/WebCore/html/HTMLPlugInImageElement.h
r77366 r81916 1 1 /* 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * This library is free software; you can redistribute it and/or … … 34 34 CreateOnlyNonNetscapePlugins, 35 35 }; 36 37 enum PreferPlugInsForImagesOption { 38 ShouldPreferPlugInsForImages, 39 ShouldNotPreferPlugInsForImages 40 }; 36 41 37 42 // Base class for HTMLObjectElement and HTMLEmbedElement … … 44 49 const String& serviceType() const { return m_serviceType; } 45 50 const String& url() const { return m_url; } 51 bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForImages; } 46 52 47 53 protected: 48 HTMLPlugInImageElement(const QualifiedName& tagName, Document*, bool createdByParser );54 HTMLPlugInImageElement(const QualifiedName& tagName, Document*, bool createdByParser, PreferPlugInsForImagesOption); 49 55 50 56 bool isImageType(); … … 76 82 77 83 bool m_needsWidgetUpdate; 84 bool m_shouldPreferPlugInsForImages; 78 85 }; 79 86 -
trunk/Source/WebCore/loader/EmptyClients.h
r81855 r81916 1 1 /* 2 2 * 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. 4 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 5 * … … 371 371 #endif 372 372 373 virtual ObjectContentType objectContentType(const KURL&, const String& ) { return ObjectContentType(); }373 virtual ObjectContentType objectContentType(const KURL&, const String&, bool) { return ObjectContentType(); } 374 374 virtual String overrideMediaType() const { return String(); } 375 375 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r81897 r81916 1 1 /* 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. 3 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) … … 984 984 #endif // ENABLE(WEB_ARCHIVE) 985 985 986 ObjectContentType FrameLoader::defaultObjectContentType(const KURL& url, const String& mimeTypeIn )986 ObjectContentType FrameLoader::defaultObjectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages) 987 987 { 988 988 String mimeType = mimeTypeIn; … … 1001 1001 return ObjectContentFrame; // Go ahead and hope that we can display the content. 1002 1002 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 1003 1009 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) 1008 1013 return WebCore::ObjectContentNetscapePlugin; 1009 #endif1010 1014 1011 1015 if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType)) -
trunk/Source/WebCore/loader/FrameLoader.h
r81484 r81916 1 1 /* 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. 3 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) 4 4 * Copyright (C) Research In Motion Limited 2009. All rights reserved. … … 324 324 bool suppressOpenerInNewFrame() const { return m_suppressOpenerInNewFrame; } 325 325 326 static ObjectContentType defaultObjectContentType(const KURL& url, const String& mimeType);326 static ObjectContentType defaultObjectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages); 327 327 328 328 void clear(bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true); -
trunk/Source/WebCore/loader/FrameLoaderClient.h
r80475 r81916 1 1 /* 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. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 260 260 #endif 261 261 262 virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType) = 0;262 virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages) = 0; 263 263 virtual String overrideMediaType() const = 0; 264 264 -
trunk/Source/WebCore/loader/SubframeLoader.cpp
r77752 r81916 1 1 /* 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. 3 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) … … 89 89 } 90 90 91 bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mimeType )91 bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mimeType, bool shouldPreferPlugInsForImages) 92 92 { 93 93 KURL completedURL; 94 94 if (!url.isEmpty()) 95 95 completedURL = completeURL(url); 96 96 97 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 101 bool 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 119 bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const String& url, const AtomicString& frameName, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues) 102 120 { 103 121 if (url.isEmpty() && mimeType.isEmpty()) … … 115 133 116 134 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); 134 137 135 138 // If the plug-in element already contains a subframe, loadOrRedirectSubframe will re-use it. Otherwise, … … 290 293 } 291 294 292 bool SubframeLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback)295 bool SubframeLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages, bool hasFallback, bool& useFallback) 293 296 { 294 297 if (m_frame->loader()->client()->shouldUsePluginDocument(mimeType)) { … … 306 309 } 307 310 308 ObjectContentType objectType = m_frame->loader()->client()->objectContentType(url, mimeType );311 ObjectContentType objectType = m_frame->loader()->client()->objectContentType(url, mimeType, shouldPreferPlugInsForImages); 309 312 // If an object's content can't be handled and it has no fallback, let 310 313 // it be handled as a plugin to show the broken plugin icon. -
trunk/Source/WebCore/loader/SubframeLoader.h
r76248 r81916 1 1 /* 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. 3 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) 4 4 * Copyright (C) Research In Motion Limited 2009. All rights reserved. … … 78 78 bool containsPlugins() const { return m_containsPlugins; } 79 79 80 bool resourceWillUsePlugin(const String& url, const String& mimeType );80 bool resourceWillUsePlugin(const String& url, const String& mimeType, bool shouldPreferPlugInsForImages); 81 81 82 82 private: 83 bool requestPlugin(HTMLPlugInImageElement*, const KURL&, const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback); 83 84 Frame* loadOrRedirectSubframe(HTMLFrameOwnerElement*, const KURL&, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList); 84 85 Frame* loadSubframe(HTMLFrameOwnerElement*, const KURL&, const String& name, const String& referrer); … … 86 87 const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback); 87 88 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); 89 90 90 91 Document* document() const; -
trunk/Source/WebKit/chromium/ChangeLog
r81913 r81916 1 2011-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 1 15 2011-03-24 Bill Budge <bbudge@chromium.org> 2 16 -
trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
r80475 r81916 1 1 /* 2 2 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 1480 1481 ObjectContentType FrameLoaderClientImpl::objectContentType( 1481 1482 const KURL& url, 1482 const String& explicitMimeType) 1483 const String& explicitMimeType, 1484 bool shouldPreferPlugInsForImages) 1483 1485 { 1484 1486 // This code is based on Apple's implementation from … … 1504 1506 } 1505 1507 1506 if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))1507 return ObjectContentImage;1508 1509 1508 // If Chrome is started with the --disable-plugins switch, pluginData is 0. 1510 1509 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) 1512 1516 return ObjectContentNetscapePlugin; 1513 1517 -
trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.h
r80475 r81916 1 1 /* 2 2 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 198 199 const Vector<WTF::String>& paramValues); 199 200 virtual WebCore::ObjectContentType objectContentType( 200 const WebCore::KURL& url, const WTF::String& mimeType);201 const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages); 201 202 virtual WTF::String overrideMediaType() const; 202 203 virtual void didPerformFirstNavigation() const; -
trunk/Source/WebKit/efl/ChangeLog
r81824 r81916 1 2011-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 1 15 2011-03-23 Brady Eidson <beidson@apple.com> 2 16 -
trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
r80475 r81916 1 1 /* 2 2 * 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. 4 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 5 5 * Copyright (C) 2008 Collabora Ltd. All rights reserved. … … 400 400 } 401 401 402 ObjectContentType FrameLoaderClientEfl::objectContentType(const KURL& url, const String& mimeType) 403 { 402 ObjectContentType 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 404 408 if (url.isEmpty() && mimeType.isEmpty()) 405 409 return ObjectContentNone; -
trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
r80475 r81916 1 1 /* 2 2 * 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. 4 4 * Copyright (C) 2008 Collabora Ltd. All rights reserved. 5 5 * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia … … 150 150 virtual void registerForIconNotification(bool); 151 151 152 virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);152 virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages); 153 153 154 154 virtual void setMainFrameDocumentReady(bool); -
trunk/Source/WebKit/gtk/ChangeLog
r81824 r81916 1 2011-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 1 15 2011-03-23 Brady Eidson <beidson@apple.com> 2 16 -
trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
r80561 r81916 7 7 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 8 8 * Copyright (C) 2010 Igalia S.L. 9 * Copyright (C) 2011 Apple Inc. All rights reserved. 9 10 * 10 11 * This library is free software; you can redistribute it and/or … … 712 713 } 713 714 714 ObjectContentType FrameLoaderClient::objectContentType(const KURL& url, const String& mimeType )715 { 716 return FrameLoader::defaultObjectContentType(url, mimeType );715 ObjectContentType FrameLoaderClient::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages) 716 { 717 return FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages); 717 718 } 718 719 -
trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
r80475 r81916 1 1 /* 2 2 * 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. 4 4 * Copyright (C) 2008 Collabora Ltd. All rights reserved. 5 5 * … … 127 127 virtual void registerForIconNotification(bool); 128 128 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); 130 130 131 131 virtual void setMainFrameDocumentReady(bool); -
trunk/Source/WebKit/haiku/ChangeLog
r80475 r81916 1 2011-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 1 15 2011-03-07 Sam Weinig <sam@webkit.org> 2 16 -
trunk/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
r80475 r81916 2 2 * Copyright (C) 2006 Don Gibson <dgibson77@gmail.com> 3 3 * 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. 5 5 * Copyright (C) 2007 Trolltech ASA 6 6 * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> All rights reserved. … … 755 755 } 756 756 757 ObjectContentType FrameLoaderClientHaiku::objectContentType(const KURL& url, const String& mimeType )757 ObjectContentType FrameLoaderClientHaiku::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages) 758 758 { 759 759 notImplemented(); -
trunk/Source/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.h
r80475 r81916 1 1 /* 2 2 * 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. 4 4 * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> All rights reserved. 5 5 * … … 240 240 const Vector<String>& paramValues); 241 241 242 virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);242 virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages); 243 243 virtual String overrideMediaType() const; 244 244 -
trunk/Source/WebKit/mac/ChangeLog
r81904 r81916 1 2011-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 1 15 2011-03-24 Geoffrey Garen <ggaren@apple.com> 2 16 -
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
r80475 r81916 1 1 /* 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 217 217 #endif 218 218 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); 220 220 virtual WTF::String overrideMediaType() const; 221 221 -
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r80475 r81916 1 1 /* 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. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 1455 1455 } 1456 1456 1457 ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeType )1457 ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages) 1458 1458 { 1459 1459 BEGIN_BLOCK_OBJC_EXCEPTIONS; … … 1492 1492 return ObjectContentFrame; // Go ahead and hope that we can display the content. 1493 1493 1494 if (MIMETypeRegistry::isSupportedImageMIMEType(type))1495 return ObjectContentImage;1496 1497 1494 WebBasePluginPackage *package = [getWebView(m_webFrame.get()) _pluginForMIMEType:type]; 1495 ObjectContentType plugInType = ObjectContentNone; 1498 1496 if (package) { 1499 1497 #if ENABLE(NETSCAPE_PLUGIN_API) 1500 1498 if ([package isKindOfClass:[WebNetscapePluginPackage class]]) 1501 return ObjectContentNetscapePlugin; 1499 plugInType = ObjectContentNetscapePlugin; 1500 else 1502 1501 #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; 1506 1513 1507 1514 if ([m_webFrame->_private->webFrameView _viewClassForMIMEType:type]) -
trunk/Source/WebKit/qt/ChangeLog
r81886 r81916 1 2011-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 1 15 2011-03-24 Benjamin Poulain <benjamin.poulain@nokia.com> 2 16 -
trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
r81868 r81916 1 1 /* 2 2 * 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. 4 4 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) 5 5 * Copyright (C) 2008 Collabora Ltd. All rights reserved. … … 1313 1313 } 1314 1314 1315 ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& _mimeType)1316 { 1317 // qDebug()<<" ++++++++++++++++ url is "<<url.prettyURL()<<", mime = "<< _mimeType;1315 ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages) 1316 { 1317 // qDebug()<<" ++++++++++++++++ url is "<<url.prettyURL()<<", mime = "<<mimeTypeIn; 1318 1318 QFileInfo fi(url.path()); 1319 1319 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") 1321 1321 return ObjectContentOtherPlugin; 1322 1322 1323 if (url.isEmpty() && ! _mimeType.length())1323 if (url.isEmpty() && !mimeTypeIn.length()) 1324 1324 return ObjectContentNone; 1325 1325 1326 String mimeType = _mimeType;1326 String mimeType = mimeTypeIn; 1327 1327 if (!mimeType.length()) 1328 1328 mimeType = MIMETypeRegistry::getMIMETypeForExtension(extension); … … 1334 1334 return ObjectContentFrame; 1335 1335 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 1336 1342 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; 1344 1347 1345 1348 if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType)) -
trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
r80768 r81916 1 1 /* 2 2 * 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. 4 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 5 5 * Copyright (C) 2008 Collabora Ltd. All rights reserved. … … 212 212 virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues); 213 213 214 virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);214 virtual ObjectContentType objectContentType(const KURL&, const String& mimeTypeIn, bool shouldPreferPlugInsForImages); 215 215 virtual String overrideMediaType() const; 216 216 -
trunk/Source/WebKit/win/ChangeLog
r81824 r81916 1 2011-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 1 15 2011-03-23 Brady Eidson <beidson@apple.com> 2 16 -
trunk/Source/WebKit/win/WebFrame.cpp
r80475 r81916 1 1 /* 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. 3 3 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 4 4 * … … 1900 1900 } 1901 1901 1902 ObjectContentType WebFrame::objectContentType(const KURL& url, const String& mimeType )1903 { 1904 return WebCore::FrameLoader::defaultObjectContentType(url, mimeType );1902 ObjectContentType WebFrame::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages) 1903 { 1904 return WebCore::FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages); 1905 1905 } 1906 1906 -
trunk/Source/WebKit/win/WebFrame.h
r80475 r81916 1 1 /* 2 * Copyright (C) 2006, 2007 Apple Inc.All rights reserved.2 * Copyright (C) 2006, 2007, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 342 342 virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const Vector<WTF::String>& paramNames, const Vector<WTF::String>& paramValues); 343 343 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); 345 345 virtual WTF::String overrideMediaType() const; 346 346 -
trunk/Source/WebKit/wince/ChangeLog
r80475 r81916 1 2011-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 1 15 2011-03-07 Sam Weinig <sam@webkit.org> 2 16 -
trunk/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
r80475 r81916 1 1 /* 2 2 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 183 184 } 184 185 185 ObjectContentType FrameLoaderClientWinCE::objectContentType(const KURL& url, const String& mimeType )186 { 187 return FrameLoader::defaultObjectContentType(url, mimeType );186 ObjectContentType FrameLoaderClientWinCE::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages) 187 { 188 return FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages); 188 189 } 189 190 -
trunk/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h
r80475 r81916 1 1 /* 2 2 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 121 122 virtual void registerForIconNotification(bool); 122 123 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); 124 125 125 126 virtual void setMainFrameDocumentReady(bool); -
trunk/Source/WebKit/wx/ChangeLog
r81600 r81916 1 2011-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 1 15 2011-03-21 Chang Shu <cshu@webkit.org> 2 16 -
trunk/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
r80475 r81916 1 1 /* 2 2 * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com> 3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 4 * 4 5 * All rights reserved. … … 871 872 } 872 873 873 ObjectContentType FrameLoaderClientWx::objectContentType(const KURL& url, const String& mimeType )874 ObjectContentType FrameLoaderClientWx::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages) 874 875 { 875 876 notImplemented(); -
trunk/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
r80475 r81916 1 1 /* 2 2 * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com> 3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 4 * 4 5 * All rights reserved. … … 218 219 virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues); 219 220 220 virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);221 virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages); 221 222 virtual String overrideMediaType() const; 222 223 -
trunk/Source/WebKit2/ChangeLog
r81912 r81916 1 2011-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 1 15 2011-03-24 Adam Roben <aroben@apple.com> 2 16 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r81732 r81916 1 1 /* 2 * Copyright (C) 2010 Apple Inc. All rights reserved.2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 1269 1269 } 1270 1270 1271 ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeTypeIn )1271 ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages) 1272 1272 { 1273 1273 // FIXME: This should be merged with WebCore::FrameLoader::defaultObjectContentType when the plugin code … … 1295 1295 return ObjectContentFrame; 1296 1296 1297 if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType)) 1298 return WebCore::ObjectContentImage; 1299 1297 bool plugInSupportsMIMEType = false; 1300 1298 if (WebPage* webPage = m_frame->page()) { 1301 1299 if (PluginData* pluginData = webPage->corePage()->pluginData()) { 1302 1300 if (pluginData->supportsMimeType(mimeType)) 1303 return ObjectContentNetscapePlugin;1301 plugInSupportsMIMEType = true; 1304 1302 } 1305 1303 } 1304 1305 if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType)) 1306 return shouldPreferPlugInsForImages && plugInSupportsMIMEType ? ObjectContentNetscapePlugin : ObjectContentImage; 1307 1308 if (plugInSupportsMIMEType) 1309 return ObjectContentNetscapePlugin; 1306 1310 1307 1311 if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType)) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
r80475 r81916 1 1 /* 2 * Copyright (C) 2010 Apple Inc. All rights reserved.2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 192 192 virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues); 193 193 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); 195 195 virtual String overrideMediaType() const; 196 196
Note: See TracChangeset
for help on using the changeset viewer.