Title: [184843] trunk/Source
Revision
184843
Author
[email protected]
Date
2015-05-24 10:43:03 -0700 (Sun, 24 May 2015)

Log Message

Register media MIME types as supported by HTML view in WebKit1.
https://bugs.webkit.org/show_bug.cgi?id=145356

Patch by Jeremy Jones <[email protected]> on 2015-05-24
Reviewed by Eric Carlson.

Source/WebCore:

getSupportedMediaMIMETypes is now used in WebKit1.

* platform/MIMETypeRegistry.h: Export getSupportedMediaMIMETypes.

Source/WebKit/mac:

WebDataSource and WebFrame view knew about suppotedImageMIMETypes and supportedNonImageMIMETypes,
but not a third category supportedMediaMIMETypes. These are now included along-side
supportedNonImageMIMETypes.

* WebView/WebDataSource.mm:
(+[WebDataSource _repTypesAllowImageTypeOmission:]): use supportedMediaMIMETypes.
* WebView/WebFrameView.mm:
(+[WebFrameView _viewTypesAllowImageTypeOmission:]): use supportedMediaMIMETypes.
* WebView/WebHTMLRepresentation.h: declare -supportedMediaMIMETypes
* WebView/WebHTMLRepresentation.mm:
(+[WebHTMLRepresentation supportedMIMETypes]): include supportedMediaMIMETypes
(+[WebHTMLRepresentation supportedMediaMIMETypes]): added
* WebView/WebHTMLView.mm:
(+[WebHTMLView supportedMediaMIMETypes]): added
* WebView/WebHTMLViewPrivate.h: declare -supportedMediaMIMETypes

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (184842 => 184843)


--- trunk/Source/WebCore/ChangeLog	2015-05-24 04:00:52 UTC (rev 184842)
+++ trunk/Source/WebCore/ChangeLog	2015-05-24 17:43:03 UTC (rev 184843)
@@ -1,3 +1,14 @@
+2015-05-24  Jeremy Jones  <[email protected]>
+
+        Register media MIME types as supported by HTML view in WebKit1.
+        https://bugs.webkit.org/show_bug.cgi?id=145356
+
+        Reviewed by Eric Carlson.
+
+        getSupportedMediaMIMETypes is now used in WebKit1.
+
+        * platform/MIMETypeRegistry.h: Export getSupportedMediaMIMETypes.
+
 2015-05-23  Antti Koivisto  <[email protected]>
 
         Permanent redirects should have long implicit cache lifetime

Modified: trunk/Source/WebCore/platform/MIMETypeRegistry.h (184842 => 184843)


--- trunk/Source/WebCore/platform/MIMETypeRegistry.h	2015-05-24 04:00:52 UTC (rev 184842)
+++ trunk/Source/WebCore/platform/MIMETypeRegistry.h	2015-05-24 17:43:03 UTC (rev 184843)
@@ -90,7 +90,7 @@
     static HashSet<String>& getSupportedImageResourceMIMETypes();
     static HashSet<String>& getSupportedImageMIMETypesForEncoding();
     WEBCORE_EXPORT static HashSet<String>& getSupportedNonImageMIMETypes();
-    static HashSet<String>& getSupportedMediaMIMETypes();
+    WEBCORE_EXPORT static HashSet<String>& getSupportedMediaMIMETypes();
     WEBCORE_EXPORT static HashSet<String>& getPDFMIMETypes();
     static HashSet<String>& getPDFAndPostScriptMIMETypes();
     WEBCORE_EXPORT static HashSet<String>& getUnsupportedTextMIMETypes();

Modified: trunk/Source/WebKit/mac/ChangeLog (184842 => 184843)


--- trunk/Source/WebKit/mac/ChangeLog	2015-05-24 04:00:52 UTC (rev 184842)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-05-24 17:43:03 UTC (rev 184843)
@@ -1,3 +1,26 @@
+2015-05-24  Jeremy Jones  <[email protected]>
+
+        Register media MIME types as supported by HTML view in WebKit1.
+        https://bugs.webkit.org/show_bug.cgi?id=145356
+
+        Reviewed by Eric Carlson.
+
+        WebDataSource and WebFrame view knew about suppotedImageMIMETypes and supportedNonImageMIMETypes,
+        but not a third category supportedMediaMIMETypes. These are now included along-side 
+        supportedNonImageMIMETypes.
+
+        * WebView/WebDataSource.mm:
+        (+[WebDataSource _repTypesAllowImageTypeOmission:]): use supportedMediaMIMETypes.
+        * WebView/WebFrameView.mm:
+        (+[WebFrameView _viewTypesAllowImageTypeOmission:]): use supportedMediaMIMETypes.
+        * WebView/WebHTMLRepresentation.h: declare -supportedMediaMIMETypes
+        * WebView/WebHTMLRepresentation.mm:
+        (+[WebHTMLRepresentation supportedMIMETypes]): include supportedMediaMIMETypes
+        (+[WebHTMLRepresentation supportedMediaMIMETypes]): added
+        * WebView/WebHTMLView.mm:
+        (+[WebHTMLView supportedMediaMIMETypes]): added
+        * WebView/WebHTMLViewPrivate.h: declare -supportedMediaMIMETypes
+
 2015-05-22  Jon Lee  <[email protected]>
 
         Rename MediaPlaybackAllowsInline

Modified: trunk/Source/WebKit/mac/WebView/WebDataSource.mm (184842 => 184843)


--- trunk/Source/WebKit/mac/WebView/WebDataSource.mm	2015-05-24 04:00:52 UTC (rev 184842)
+++ trunk/Source/WebKit/mac/WebView/WebDataSource.mm	2015-05-24 17:43:03 UTC (rev 184843)
@@ -263,6 +263,7 @@
     if (!repTypes) {
         repTypes = [[NSMutableDictionary alloc] init];
         addTypesFromClass(repTypes, [WebHTMLRepresentation class], [WebHTMLRepresentation supportedNonImageMIMETypes]);
+        addTypesFromClass(repTypes, [WebHTMLRepresentation class], [WebHTMLRepresentation supportedMediaMIMETypes]);
         
         // Since this is a "secret default" we don't both registering it.
         BOOL omitPDFSupport = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitOmitPDFSupport"];

Modified: trunk/Source/WebKit/mac/WebView/WebFrameView.mm (184842 => 184843)


--- trunk/Source/WebKit/mac/WebView/WebFrameView.mm	2015-05-24 04:00:52 UTC (rev 184842)
+++ trunk/Source/WebKit/mac/WebView/WebFrameView.mm	2015-05-24 17:43:03 UTC (rev 184843)
@@ -273,6 +273,7 @@
     if (!viewTypes) {
         viewTypes = [[NSMutableDictionary alloc] init];
         addTypesFromClass(viewTypes, [WebHTMLView class], [WebHTMLView supportedNonImageMIMETypes]);
+        addTypesFromClass(viewTypes, [WebHTMLView class], [WebHTMLView supportedMediaMIMETypes]);
 
         // Since this is a "secret default" we don't bother registering it.
         BOOL omitPDFSupport = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitOmitPDFSupport"];

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.h (184842 => 184843)


--- trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.h	2015-05-24 04:00:52 UTC (rev 184842)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.h	2015-05-24 17:43:03 UTC (rev 184843)
@@ -49,6 +49,7 @@
 }
 
 + (NSArray *)supportedMIMETypes;
++ (NSArray *)supportedMediaMIMETypes;
 + (NSArray *)supportedNonImageMIMETypes;
 + (NSArray *)supportedImageMIMETypes;
 + (NSArray *)unsupportedTextMIMETypes;

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm (184842 => 184843)


--- trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm	2015-05-24 04:00:52 UTC (rev 184842)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm	2015-05-24 17:43:03 UTC (rev 184843)
@@ -106,10 +106,17 @@
 
 + (NSArray *)supportedMIMETypes
 {
-    static __unsafe_unretained NSArray *staticSupportedMIMETypes = newArrayByConcatenatingArrays([self supportedNonImageMIMETypes], [self supportedImageMIMETypes]);
+    static __unsafe_unretained NSArray *staticSupportedMIMETypes = newArrayByConcatenatingArrays([self supportedNonImageMIMETypes],
+        newArrayByConcatenatingArrays([self supportedImageMIMETypes], [self supportedMediaMIMETypes]));
     return staticSupportedMIMETypes;
 }
 
++ (NSArray *)supportedMediaMIMETypes
+{
+    static __unsafe_unretained NSArray *staticSupportedMediaMIMETypes = newArrayWithStrings(MIMETypeRegistry::getSupportedMediaMIMETypes());
+    return staticSupportedMediaMIMETypes;
+}
+
 + (NSArray *)supportedNonImageMIMETypes
 {
     static __unsafe_unretained NSArray *staticSupportedNonImageMIMETypes = newArrayWithStrings(MIMETypeRegistry::getSupportedNonImageMIMETypes());

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (184842 => 184843)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2015-05-24 04:00:52 UTC (rev 184842)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2015-05-24 17:43:03 UTC (rev 184843)
@@ -1262,6 +1262,11 @@
     return [WebHTMLRepresentation supportedMIMETypes];
 }
 
++ (NSArray *)supportedMediaMIMETypes
+{
+    return [WebHTMLRepresentation supportedMediaMIMETypes];
+}
+
 + (NSArray *)supportedImageMIMETypes
 {
     return [WebHTMLRepresentation supportedImageMIMETypes];

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLViewPrivate.h (184842 => 184843)


--- trunk/Source/WebKit/mac/WebView/WebHTMLViewPrivate.h	2015-05-24 04:00:52 UTC (rev 184842)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLViewPrivate.h	2015-05-24 17:43:03 UTC (rev 184843)
@@ -45,6 +45,7 @@
 @interface WebHTMLView (WebPrivate)
 
 + (NSArray *)supportedMIMETypes;
++ (NSArray *)supportedMediaMIMETypes;
 + (NSArray *)supportedImageMIMETypes;
 + (NSArray *)supportedNonImageMIMETypes;
 + (NSArray *)unsupportedTextMIMETypes;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to