Title: [238492] trunk/Source/WebCore
- Revision
- 238492
- Author
- [email protected]
- Date
- 2018-11-26 06:18:37 -0800 (Mon, 26 Nov 2018)
Log Message
[GTK] Accessing default web context before gtk_init results in drawing failure (Gtk-WARNING **: drawing failure for widget 'WebKitWebView': invalid value for an input Visual*)
https://bugs.webkit.org/show_bug.cgi?id=150303
Reviewed by Michael Catanzaro.
Ensure gtk has been initialized before trying to get the default display.
* platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::createPlatformDisplay):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (238491 => 238492)
--- trunk/Source/WebCore/ChangeLog 2018-11-26 12:09:04 UTC (rev 238491)
+++ trunk/Source/WebCore/ChangeLog 2018-11-26 14:18:37 UTC (rev 238492)
@@ -1,3 +1,15 @@
+2018-11-26 Carlos Garcia Campos <[email protected]>
+
+ [GTK] Accessing default web context before gtk_init results in drawing failure (Gtk-WARNING **: drawing failure for widget 'WebKitWebView': invalid value for an input Visual*)
+ https://bugs.webkit.org/show_bug.cgi?id=150303
+
+ Reviewed by Michael Catanzaro.
+
+ Ensure gtk has been initialized before trying to get the default display.
+
+ * platform/graphics/PlatformDisplay.cpp:
+ (WebCore::PlatformDisplay::createPlatformDisplay):
+
2018-11-26 Javier Fernandez <[email protected]>
[css-grid] absolute positioned child is sized wrongly when using auto-fit, generating spurious collapsed tracks
Modified: trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp (238491 => 238492)
--- trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp 2018-11-26 12:09:04 UTC (rev 238491)
+++ trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp 2018-11-26 14:18:37 UTC (rev 238492)
@@ -47,7 +47,7 @@
#endif
#if PLATFORM(GTK)
-#include <gdk/gdk.h>
+#include <gtk/gtk.h>
#endif
#if PLATFORM(GTK) && PLATFORM(X11)
@@ -77,15 +77,17 @@
#if defined(GTK_API_VERSION_2)
return PlatformDisplayX11::create(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()));
#else
- GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get());
+ if (gtk_init_check(nullptr, nullptr)) {
+ GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get());
#if PLATFORM(X11)
- if (GDK_IS_X11_DISPLAY(display))
- return PlatformDisplayX11::create(GDK_DISPLAY_XDISPLAY(display));
+ if (GDK_IS_X11_DISPLAY(display))
+ return PlatformDisplayX11::create(GDK_DISPLAY_XDISPLAY(display));
#endif
#if PLATFORM(WAYLAND)
- if (GDK_IS_WAYLAND_DISPLAY(display))
- return PlatformDisplayWayland::create(gdk_wayland_display_get_wl_display(display));
+ if (GDK_IS_WAYLAND_DISPLAY(display))
+ return PlatformDisplayWayland::create(gdk_wayland_display_get_wl_display(display));
#endif
+ }
#endif
#endif // PLATFORM(GTK)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes