Title: [249938] trunk/Source/WebCore
Revision
249938
Author
[email protected]
Date
2019-09-16 20:05:13 -0700 (Mon, 16 Sep 2019)

Log Message

[AppleWin] Assertion failure in defaultSupportedImageTypes in UTIRegistry.cpp
https://bugs.webkit.org/show_bug.cgi?id=198286

Reviewed by Brent Fulgham.

Some image types aren't supported by CG for Windows.

No new tests, covered by existing tests.

* platform/graphics/cg/ImageSourceCGWin.cpp:
(WebCore::MIMETypeForImageType): Return the correct MIME types for
com.microsoft.cur and com.microsoft.ico.
* platform/graphics/cg/UTIRegistry.cpp:
(WebCore::defaultSupportedImageTypes): Excluded public.jpeg-2000 and public.mpo-image if PLATFORM(WIN).

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (249937 => 249938)


--- trunk/Source/WebCore/ChangeLog	2019-09-17 02:56:54 UTC (rev 249937)
+++ trunk/Source/WebCore/ChangeLog	2019-09-17 03:05:13 UTC (rev 249938)
@@ -1,5 +1,22 @@
 2019-09-16  Fujii Hironori  <[email protected]>
 
+        [AppleWin] Assertion failure in defaultSupportedImageTypes in UTIRegistry.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=198286
+
+        Reviewed by Brent Fulgham.
+
+        Some image types aren't supported by CG for Windows.
+
+        No new tests, covered by existing tests.
+
+        * platform/graphics/cg/ImageSourceCGWin.cpp:
+        (WebCore::MIMETypeForImageType): Return the correct MIME types for
+        com.microsoft.cur and com.microsoft.ico.
+        * platform/graphics/cg/UTIRegistry.cpp:
+        (WebCore::defaultSupportedImageTypes): Excluded public.jpeg-2000 and public.mpo-image if PLATFORM(WIN).
+
+2019-09-16  Fujii Hironori  <[email protected]>
+
         [Cairo] Image::drawTiled → Cairo::drawSurface → cairo_paint_with_alpha → segfault happens in pixman
         https://bugs.webkit.org/show_bug.cgi?id=201755
 

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageSourceCGWin.cpp (249937 => 249938)


--- trunk/Source/WebCore/platform/graphics/cg/ImageSourceCGWin.cpp	2019-09-17 02:56:54 UTC (rev 249937)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageSourceCGWin.cpp	2019-09-17 03:05:13 UTC (rev 249938)
@@ -39,7 +39,9 @@
     // a MIME type like image/type will work for common image UTIs like jpeg, 
     // png, tiff, gif but won't work for UTIs like: public.jpeg-2000,
     // public.xbitmap-image, com.apple.quicktime-image, and others.
-    if (int dotLocation = type.reverseFind('.'))
+    if (type == "com.microsoft.cur" || type == "com.microsoft.ico")
+        mimeType = "image/vnd.microsoft.icon"_s;
+    else if (int dotLocation = type.reverseFind('.'))
         mimeType = "image/" + type.substring(dotLocation + 1);
     return mimeType;
 }

Modified: trunk/Source/WebCore/platform/graphics/cg/UTIRegistry.cpp (249937 => 249938)


--- trunk/Source/WebCore/platform/graphics/cg/UTIRegistry.cpp	2019-09-17 02:56:54 UTC (rev 249937)
+++ trunk/Source/WebCore/platform/graphics/cg/UTIRegistry.cpp	2019-09-17 03:05:13 UTC (rev 249938)
@@ -50,10 +50,12 @@
         "com.microsoft.cur",
         "com.microsoft.ico",
         "public.jpeg",
+        "public.png",
+        "public.tiff",
+#if !PLATFORM(WIN)
         "public.jpeg-2000",
         "public.mpo-image",
-        "public.png",
-        "public.tiff",
+#endif
     };
 
 #ifndef NDEBUG
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to