Title: [262440] branches/safari-610.1.15-branch/Source/WebCore
Revision
262440
Author
alanc...@apple.com
Date
2020-06-02 14:57:55 -0700 (Tue, 02 Jun 2020)

Log Message

Cherry-pick r262208. rdar://problem/63891613

    REGRESSION (r254541): Valid mime types can only be added to the HashSet of the supported types for encoding
    https://bugs.webkit.org/show_bug.cgi?id=212427

    Patch by Said Abou-Hallawa <sabouhall...@apple.com> on 2020-05-27
    Reviewed by Darin Adler.

    Add back a check for the mime type validity which was removed in r254541.

    * platform/MIMETypeRegistry.cpp:
    (WebCore::MIMETypeRegistry::createMIMETypeRegistryThreadGlobalData):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262208 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-610.1.15-branch/Source/WebCore/ChangeLog (262439 => 262440)


--- branches/safari-610.1.15-branch/Source/WebCore/ChangeLog	2020-06-02 21:19:51 UTC (rev 262439)
+++ branches/safari-610.1.15-branch/Source/WebCore/ChangeLog	2020-06-02 21:57:55 UTC (rev 262440)
@@ -1,3 +1,32 @@
+2020-06-02  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r262208. rdar://problem/63891613
+
+    REGRESSION (r254541): Valid mime types can only be added to the HashSet of the supported types for encoding
+    https://bugs.webkit.org/show_bug.cgi?id=212427
+    
+    Patch by Said Abou-Hallawa <sabouhall...@apple.com> on 2020-05-27
+    Reviewed by Darin Adler.
+    
+    Add back a check for the mime type validity which was removed in r254541.
+    
+    * platform/MIMETypeRegistry.cpp:
+    (WebCore::MIMETypeRegistry::createMIMETypeRegistryThreadGlobalData):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-05-27  Said Abou-Hallawa  <sabouhall...@apple.com>
+
+            REGRESSION (r254541): Valid mime types can only be added to the HashSet of the supported types for encoding
+            https://bugs.webkit.org/show_bug.cgi?id=212427
+
+            Reviewed by Darin Adler.
+
+            Add back a check for the mime type validity which was removed in r254541.
+
+            * platform/MIMETypeRegistry.cpp:
+            (WebCore::MIMETypeRegistry::createMIMETypeRegistryThreadGlobalData):
+
 2020-05-23  Zalan Bujtas  <za...@apple.com>
 
         [LFC][TFC] Non-collapsing row border should not make the table wider/taller

Modified: branches/safari-610.1.15-branch/Source/WebCore/platform/MIMETypeRegistry.cpp (262439 => 262440)


--- branches/safari-610.1.15-branch/Source/WebCore/platform/MIMETypeRegistry.cpp	2020-06-02 21:19:51 UTC (rev 262439)
+++ branches/safari-610.1.15-branch/Source/WebCore/platform/MIMETypeRegistry.cpp	2020-06-02 21:57:55 UTC (rev 262440)
@@ -456,10 +456,12 @@
     CFIndex count = CFArrayGetCount(supportedTypes.get());
     for (CFIndex i = 0; i < count; i++) {
         CFStringRef supportedType = reinterpret_cast<CFStringRef>(CFArrayGetValueAtIndex(supportedTypes.get(), i));
-        if (isSupportedImageType(supportedType)) {
-            String mimeType = MIMETypeForImageType(supportedType);
-            supportedImageMIMETypesForEncoding.add(mimeType);
-        }
+        if (!isSupportedImageType(supportedType))
+            continue;
+        String mimeType = MIMETypeForImageType(supportedType);
+        if (mimeType.isEmpty())
+            continue;
+        supportedImageMIMETypesForEncoding.add(mimeType);
     }
 #else
     HashSet<String, ASCIICaseInsensitiveHash> supportedImageMIMETypesForEncoding = std::initializer_list<String> {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to