WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-84334-20120419094806.patch (text/plain), 8.11 KB, created by
Mark Pilgrim (Google)
on 2012-04-19 06:48:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Mark Pilgrim (Google)
Created:
2012-04-19 06:48:21 PDT
Size:
8.11 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 114629) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2012-04-19 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Call mimeRegistry directly >+ https://bugs.webkit.org/show_bug.cgi?id=84334 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 Vsevolod Vlasov <vsevik@chromium.org> > > Web Inspector: x-frame security errors logged when typing in the console are annoying. >Index: Source/WebCore/platform/chromium/MIMETypeRegistryChromium.cpp >=================================================================== >--- Source/WebCore/platform/chromium/MIMETypeRegistryChromium.cpp (revision 114627) >+++ Source/WebCore/platform/chromium/MIMETypeRegistryChromium.cpp (working copy) >@@ -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 @@ String MIMETypeRegistry::getPreferredExt > // 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()->mimeTypeFromFile(type); > if (!ext.isEmpty() && ext[0] == '.') > ext = ext.substring(1); > >@@ -89,7 +91,8 @@ String MIMETypeRegistry::getMIMETypeForP > > 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::isSupportedImageM > > 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) >Index: Source/WebCore/platform/chromium/PlatformSupport.h >=================================================================== >--- Source/WebCore/platform/chromium/PlatformSupport.h (revision 114627) >+++ Source/WebCore/platform/chromium/PlatformSupport.h (working copy) >@@ -217,15 +217,6 @@ public: > // 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*); >Index: Source/WebKit/chromium/ChangeLog >=================================================================== >--- Source/WebKit/chromium/ChangeLog (revision 114629) >+++ Source/WebKit/chromium/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2012-04-19 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Call mimeRegistry directly >+ https://bugs.webkit.org/show_bug.cgi?id=84334 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Part of a refactoring series. See tracking bug 82948. >+ >+ * src/PlatformSupport.cpp: >+ (WebCore::PlatformSupport::layoutTestMode): >+ > 2012-04-18 Nico Weber <thakis@chromium.org> > > [chromium/mac] Fix build. >Index: Source/WebKit/chromium/src/PlatformSupport.cpp >=================================================================== >--- Source/WebKit/chromium/src/PlatformSupport.cpp (revision 114627) >+++ Source/WebKit/chromium/src/PlatformSupport.cpp (working copy) >@@ -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> >@@ -103,6 +102,7 @@ > > #include "Worker.h" > #include "WorkerContextProxy.h" >+#include <public/WebMimeRegistry.h> > #include <wtf/Assertions.h> > > // We are part of the WebKit implementation. >@@ -589,46 +589,6 @@ bool PlatformSupport::layoutTestMode() > 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)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 84334
:
137895
|
137904