Title: [177482] trunk/Source
- Revision
- 177482
- Author
- [email protected]
- Date
- 2014-12-17 17:56:18 -0800 (Wed, 17 Dec 2014)
Log Message
Get rid of FrameLoader::defaultObjectContentType
https://bugs.webkit.org/show_bug.cgi?id=139758
Reviewed by Geoffrey Garen.
Source/WebCore:
Move the FrameLoader::defaultObjectContentType implementation to its only caller in WebKit/win.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::defaultObjectContentType): Deleted.
* loader/FrameLoader.h:
Source/WebKit/win:
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::objectContentType):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (177481 => 177482)
--- trunk/Source/WebCore/ChangeLog 2014-12-18 01:29:57 UTC (rev 177481)
+++ trunk/Source/WebCore/ChangeLog 2014-12-18 01:56:18 UTC (rev 177482)
@@ -1,3 +1,16 @@
+2014-12-17 Anders Carlsson <[email protected]>
+
+ Get rid of FrameLoader::defaultObjectContentType
+ https://bugs.webkit.org/show_bug.cgi?id=139758
+
+ Reviewed by Geoffrey Garen.
+
+ Move the FrameLoader::defaultObjectContentType implementation to its only caller in WebKit/win.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::defaultObjectContentType): Deleted.
+ * loader/FrameLoader.h:
+
2014-12-17 [email protected] <[email protected]>
[Curl] Compile error, setWasCached method has been removed.
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (177481 => 177482)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2014-12-18 01:29:57 UTC (rev 177481)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2014-12-18 01:56:18 UTC (rev 177482)
@@ -957,41 +957,6 @@
}
#endif // ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
-ObjectContentType FrameLoader::defaultObjectContentType(const URL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
-{
- String mimeType = mimeTypeIn;
-
- if (mimeType.isEmpty())
- mimeType = mimeTypeFromURL(url);
-
-#if !PLATFORM(COCOA) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does EFL
- if (mimeType.isEmpty()) {
- String decodedPath = decodeURLEscapeSequences(url.path());
- mimeType = PluginDatabase::installedPlugins()->MIMETypeForExtension(decodedPath.substring(decodedPath.reverseFind('.') + 1));
- }
-#endif
-
- if (mimeType.isEmpty())
- return ObjectContentFrame; // Go ahead and hope that we can display the content.
-
-#if !PLATFORM(COCOA) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does EFL
- bool plugInSupportsMIMEType = PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType);
-#else
- bool plugInSupportsMIMEType = false;
-#endif
-
- if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
- return shouldPreferPlugInsForImages && plugInSupportsMIMEType ? WebCore::ObjectContentNetscapePlugin : WebCore::ObjectContentImage;
-
- if (plugInSupportsMIMEType)
- return WebCore::ObjectContentNetscapePlugin;
-
- if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType))
- return WebCore::ObjectContentFrame;
-
- return WebCore::ObjectContentNone;
-}
-
String FrameLoader::outgoingReferrer() const
{
// See http://www.whatwg.org/specs/web-apps/current-work/#fetching-resources
Modified: trunk/Source/WebCore/loader/FrameLoader.h (177481 => 177482)
--- trunk/Source/WebCore/loader/FrameLoader.h 2014-12-18 01:29:57 UTC (rev 177481)
+++ trunk/Source/WebCore/loader/FrameLoader.h 2014-12-18 01:56:18 UTC (rev 177482)
@@ -267,8 +267,6 @@
bool suppressOpenerInNewFrame() const { return m_suppressOpenerInNewFrame; }
- static ObjectContentType defaultObjectContentType(const URL&, const String& mimeType, bool shouldPreferPlugInsForImages);
-
bool quickRedirectComing() const { return m_quickRedirectComing; }
WEBCORE_EXPORT bool shouldClose();
Modified: trunk/Source/WebKit/win/ChangeLog (177481 => 177482)
--- trunk/Source/WebKit/win/ChangeLog 2014-12-18 01:29:57 UTC (rev 177481)
+++ trunk/Source/WebKit/win/ChangeLog 2014-12-18 01:56:18 UTC (rev 177482)
@@ -1,3 +1,13 @@
+2014-12-17 Anders Carlsson <[email protected]>
+
+ Get rid of FrameLoader::defaultObjectContentType
+ https://bugs.webkit.org/show_bug.cgi?id=139758
+
+ Reviewed by Geoffrey Garen.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::objectContentType):
+
2014-12-16 Andreas Kling <[email protected]>
Use Ref for SecurityOrigin.
Modified: trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (177481 => 177482)
--- trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp 2014-12-18 01:29:57 UTC (rev 177481)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp 2014-12-18 01:56:18 UTC (rev 177482)
@@ -71,7 +71,9 @@
#include <WebCore/HTMLPlugInElement.h>
#include <WebCore/HistoryItem.h>
#include <WebCore/LocalizedStrings.h>
+#include <WebCore/MIMETypeRegistry.h>
#include <WebCore/Page.h>
+#include <WebCore/PluginDatabase.h>
#include <WebCore/PluginPackage.h>
#include <WebCore/PluginView.h>
#include <WebCore/PolicyChecker.h>
@@ -1075,9 +1077,33 @@
return childFrame.release();
}
-ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
+ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
{
- return WebCore::FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages);
+ String mimeType = mimeTypeIn;
+
+ if (mimeType.isEmpty())
+ mimeType = mimeTypeFromURL(url);
+
+ if (mimeType.isEmpty()) {
+ String decodedPath = decodeURLEscapeSequences(url.path());
+ mimeType = PluginDatabase::installedPlugins()->MIMETypeForExtension(decodedPath.substring(decodedPath.reverseFind('.') + 1));
+ }
+
+ if (mimeType.isEmpty())
+ return ObjectContentFrame; // Go ahead and hope that we can display the content.
+
+ bool plugInSupportsMIMEType = PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType);
+
+ if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
+ return shouldPreferPlugInsForImages && plugInSupportsMIMEType ? WebCore::ObjectContentNetscapePlugin : WebCore::ObjectContentImage;
+
+ if (plugInSupportsMIMEType)
+ return WebCore::ObjectContentNetscapePlugin;
+
+ if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType))
+ return WebCore::ObjectContentFrame;
+
+ return WebCore::ObjectContentNone;
}
void WebFrameLoaderClient::dispatchDidFailToStartPlugin(const PluginView* pluginView) const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes