Title: [114641] trunk/Source
- Revision
- 114641
- Author
- pilg...@chromium.org
- Date
- 2012-04-19 09:40:28 -0700 (Thu, 19 Apr 2012)
Log Message
[Chromium] Call mimeRegistry directly
https://bugs.webkit.org/show_bug.cgi?id=84334
Reviewed by Kentaro Hara.
Part of a refactoring series. See tracking bug 82948.
Source/WebCore:
* platform/chromium/MIMETypeRegistryChromium.cpp:
(WebCore::MIMETypeRegistry::getMIMETypeForExtension):
(WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
(WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
(WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
(WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
* platform/chromium/PlatformSupport.h:
(PlatformSupport):
Source/WebKit/chromium:
* src/PlatformSupport.cpp:
(WebCore::PlatformSupport::layoutTestMode):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114640 => 114641)
--- trunk/Source/WebCore/ChangeLog 2012-04-19 16:27:25 UTC (rev 114640)
+++ trunk/Source/WebCore/ChangeLog 2012-04-19 16:40:28 UTC (rev 114641)
@@ -1,3 +1,22 @@
+2012-04-19 Mark Pilgrim <pilg...@chromium.org>
+
+ [Chromium] Call mimeRegistry directly
+ https://bugs.webkit.org/show_bug.cgi?id=84334
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * platform/chromium/MIMETypeRegistryChromium.cpp:
+ (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
+ (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension):
+ (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
+ (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
+ (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
+ (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
+ * platform/chromium/PlatformSupport.h:
+ (PlatformSupport):
+
2012-04-19 Victor Carbune <vcarb...@adobe.com>
Display a TextTrackCue when snap-to-lines flag is not set
Modified: trunk/Source/WebCore/platform/chromium/MIMETypeRegistryChromium.cpp (114640 => 114641)
--- trunk/Source/WebCore/platform/chromium/MIMETypeRegistryChromium.cpp 2012-04-19 16:27:25 UTC (rev 114640)
+++ trunk/Source/WebCore/platform/chromium/MIMETypeRegistryChromium.cpp 2012-04-19 16:40:28 UTC (rev 114641)
@@ -32,26 +32,28 @@
#include "MIMETypeRegistry.h"
#include "MediaPlayer.h"
-#include "PlatformSupport.h"
#include "PluginDataChromium.h"
+
+#include <public/Platform.h>
+#include <public/WebMimeRegistry.h>
#include <wtf/text/CString.h>
// NOTE: Unlike other ports, we don't use the shared implementation in
// MIMETypeRegistry.cpp. Instead, we need to route most functions via
-// the PlatformSupport to the embedder.
+// Platform.h to the embedder.
namespace WebCore {
String MIMETypeRegistry::getMIMETypeForExtension(const String &ext)
{
- return PlatformSupport::mimeTypeForExtension(ext);
+ return WebKit::Platform::current()->mimeRegistry()->mimeTypeForExtension(ext);
}
#if ENABLE(FILE_SYSTEM)
String MIMETypeRegistry::getWellKnownMIMETypeForExtension(const String &ext)
{
// This method must be thread safe and should not consult the OS/registry.
- return PlatformSupport::wellKnownMimeTypeForExtension(ext);
+ return WebKit::Platform::current()->mimeRegistry()->wellKnownMimeTypeForExtension(ext);
}
#endif
@@ -63,7 +65,7 @@
// FIXME: Is this really necessary??
String mimeType = type.substring(0, static_cast<unsigned>(type.find(';')));
- String ext = PlatformSupport::preferredExtensionForMIMEType(type);
+ String ext = WebKit::Platform::current()->mimeRegistry()->preferredExtensionForMIMEType(type);
if (!ext.isEmpty() && ext[0] == '.')
ext = ext.substring(1);
@@ -89,7 +91,8 @@
bool MIMETypeRegistry::isSupportedImageMIMEType(const String& mimeType)
{
- return PlatformSupport::isSupportedImageMIMEType(mimeType);
+ return WebKit::Platform::current()->mimeRegistry()->supportsImageMIMEType(mimeType)
+ != WebKit::WebMimeRegistry::IsNotSupported;
}
bool MIMETypeRegistry::isSupportedImageResourceMIMEType(const String& mimeType)
@@ -110,12 +113,14 @@
bool MIMETypeRegistry::isSupportedJavaScriptMIMEType(const String& mimeType)
{
- return PlatformSupport::isSupportedJavaScriptMIMEType(mimeType);
+ return WebKit::Platform::current()->mimeRegistry()->supportsJavaScriptMIMEType(mimeType)
+ != WebKit::WebMimeRegistry::IsNotSupported;
}
bool MIMETypeRegistry::isSupportedNonImageMIMEType(const String& mimeType)
{
- return PlatformSupport::isSupportedNonImageMIMEType(mimeType);
+ return WebKit::Platform::current()->mimeRegistry()->supportsNonImageMIMEType(mimeType)
+ != WebKit::WebMimeRegistry::IsNotSupported;
}
bool MIMETypeRegistry::isSupportedMediaMIMEType(const String& mimeType)
Modified: trunk/Source/WebCore/platform/chromium/PlatformSupport.h (114640 => 114641)
--- trunk/Source/WebCore/platform/chromium/PlatformSupport.h 2012-04-19 16:27:25 UTC (rev 114640)
+++ trunk/Source/WebCore/platform/chromium/PlatformSupport.h 2012-04-19 16:40:28 UTC (rev 114641)
@@ -213,15 +213,6 @@
// Delta of memory usage growth (vs. last actualMemoryUsageMB()) to force GC when memory usage is high.
static int highUsageDeltaMB();
- // MimeType -----------------------------------------------------------
- static bool isSupportedImageMIMEType(const String& mimeType);
- static bool isSupportedJavaScriptMIMEType(const String& mimeType);
- static bool isSupportedNonImageMIMEType(const String& mimeType);
- static String mimeTypeForExtension(const String& fileExtension);
- static String wellKnownMimeTypeForExtension(const String& fileExtension);
- static String mimeTypeFromFile(const String& filePath);
- static String preferredExtensionForMIMEType(const String& mimeType);
-
// Plugin -------------------------------------------------------------
static bool plugins(bool refresh, Vector<PluginInfo>*);
static NPObject* pluginScriptableObject(Widget*);
Modified: trunk/Source/WebKit/chromium/ChangeLog (114640 => 114641)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-04-19 16:27:25 UTC (rev 114640)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-04-19 16:40:28 UTC (rev 114641)
@@ -1,5 +1,17 @@
2012-04-19 Mark Pilgrim <pilg...@chromium.org>
+ [Chromium] Call mimeRegistry directly
+ https://bugs.webkit.org/show_bug.cgi?id=84334
+
+ Reviewed by Kentaro Hara.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * src/PlatformSupport.cpp:
+ (WebCore::PlatformSupport::layoutTestMode):
+
+2012-04-19 Mark Pilgrim <pilg...@chromium.org>
+
[Chromium] Call sampleGamepads directly
https://bugs.webkit.org/show_bug.cgi?id=84339
Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (114640 => 114641)
--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-04-19 16:27:25 UTC (rev 114640)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-04-19 16:40:28 UTC (rev 114641)
@@ -61,7 +61,6 @@
#include "platform/WebString.h"
#include "platform/WebURL.h"
#include "platform/WebVector.h"
-#include <public/WebMimeRegistry.h>
#if USE(CG)
#include <CoreGraphics/CGContext.h>
@@ -102,6 +101,7 @@
#include "Worker.h"
#include "WorkerContextProxy.h"
+#include <public/WebMimeRegistry.h>
#include <wtf/Assertions.h>
// We are part of the WebKit implementation.
@@ -563,46 +563,6 @@
return WebKit::layoutTestMode();
}
-// MimeType -------------------------------------------------------------------
-
-bool PlatformSupport::isSupportedImageMIMEType(const String& mimeType)
-{
- return webKitPlatformSupport()->mimeRegistry()->supportsImageMIMEType(mimeType)
- != WebMimeRegistry::IsNotSupported;
-}
-
-bool PlatformSupport::isSupportedJavaScriptMIMEType(const String& mimeType)
-{
- return webKitPlatformSupport()->mimeRegistry()->supportsJavaScriptMIMEType(mimeType)
- != WebMimeRegistry::IsNotSupported;
-}
-
-bool PlatformSupport::isSupportedNonImageMIMEType(const String& mimeType)
-{
- return webKitPlatformSupport()->mimeRegistry()->supportsNonImageMIMEType(mimeType)
- != WebMimeRegistry::IsNotSupported;
-}
-
-String PlatformSupport::mimeTypeForExtension(const String& extension)
-{
- return webKitPlatformSupport()->mimeRegistry()->mimeTypeForExtension(extension);
-}
-
-String PlatformSupport::wellKnownMimeTypeForExtension(const String& extension)
-{
- return webKitPlatformSupport()->mimeRegistry()->wellKnownMimeTypeForExtension(extension);
-}
-
-String PlatformSupport::mimeTypeFromFile(const String& path)
-{
- return webKitPlatformSupport()->mimeRegistry()->mimeTypeFromFile(path);
-}
-
-String PlatformSupport::preferredExtensionForMIMEType(const String& mimeType)
-{
- return webKitPlatformSupport()->mimeRegistry()->preferredExtensionForMIMEType(mimeType);
-}
-
// Plugin ---------------------------------------------------------------------
bool PlatformSupport::plugins(bool refresh, Vector<PluginInfo>* results)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes