Title: [217553] trunk/Source/WebCore
Revision
217553
Author
[email protected]
Date
2017-05-30 07:31:25 -0700 (Tue, 30 May 2017)

Log Message

[WinCairo] TestWebKitAPI: SHOULD NEVER BE REACHED in WebCore::cairoSurfaceSize
https://bugs.webkit.org/show_bug.cgi?id=172699

Patch by Fujii Hironori <[email protected]> on 2017-05-30
Reviewed by Brent Fulgham.

Tests: WebCore.BitmapImageEmptyFrameTest in TestWebKitAPI

* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::cairoSurfaceSize): Added a case for win32 surface type.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (217552 => 217553)


--- trunk/Source/WebCore/ChangeLog	2017-05-30 14:02:48 UTC (rev 217552)
+++ trunk/Source/WebCore/ChangeLog	2017-05-30 14:31:25 UTC (rev 217553)
@@ -1,3 +1,15 @@
+2017-05-30  Fujii Hironori  <[email protected]>
+
+        [WinCairo] TestWebKitAPI: SHOULD NEVER BE REACHED in WebCore::cairoSurfaceSize
+        https://bugs.webkit.org/show_bug.cgi?id=172699
+
+        Reviewed by Brent Fulgham.
+
+        Tests: WebCore.BitmapImageEmptyFrameTest in TestWebKitAPI
+
+        * platform/graphics/cairo/CairoUtilities.cpp:
+        (WebCore::cairoSurfaceSize): Added a case for win32 surface type.
+
 2017-05-30  Miguel Gomez  <[email protected]>
 
         [GTK][WPE][GSTREAMER_GL] Do not use cairo to copy video textures to an accelerated canvas

Modified: trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp (217552 => 217553)


--- trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp	2017-05-30 14:02:48 UTC (rev 217552)
+++ trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp	2017-05-30 14:31:25 UTC (rev 217553)
@@ -46,6 +46,10 @@
 #include <cairo-gl.h>
 #endif
 
+#if OS(WINDOWS)
+#include <cairo-win32.h>
+#endif
+
 namespace WebCore {
 
 #if USE(FREETYPE) && !PLATFORM(GTK)
@@ -309,6 +313,13 @@
     case CAIRO_SURFACE_TYPE_GL:
         return IntSize(cairo_gl_surface_get_width(surface), cairo_gl_surface_get_height(surface));
 #endif
+#if OS(WINDOWS)
+    case CAIRO_SURFACE_TYPE_WIN32:
+        surface = cairo_win32_surface_get_image(surface);
+        ASSERT(surface);
+        ASSERT(cairo_surface_get_type(surface) == CAIRO_SURFACE_TYPE_IMAGE);
+        return IntSize(cairo_image_surface_get_width(surface), cairo_image_surface_get_height(surface));
+#endif
     default:
         ASSERT_NOT_REACHED();
         return IntSize();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to