WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-136849-20140916143220.patch (text/plain), 3.01 KB, created by
Zan Dobersek
on 2014-09-16 14:32:23 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2014-09-16 14:32:23 PDT
Size:
3.01 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 173670) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,24 @@ >+2014-09-16 Zan Dobersek <zdobersek@igalia.com> >+ >+ [GTK] Add a helper function for display system deduction >+ https://bugs.webkit.org/show_bug.cgi?id=136849 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ getDisplaySystemType() is a helper function that checks the type of the >+ default GdkDisplay object and initializes a static variable to the >+ corresponding value. It then returns the value of that variable. >+ >+ When building with the GTK+2 API (still the case with the GTK+2 plugin >+ process) we default to X11. >+ >+ The function is declared and implemented in GtkUtilities files. >+ >+ * platform/gtk/GtkUtilities.cpp: >+ (WebCore::widgetIsOnscreenToplevelWindow): >+ (WebCore::getDisplaySystemType): >+ * platform/gtk/GtkUtilities.h: >+ > 2014-09-16 Enrica Casucci <enrica@apple.com> > > Move HTMLConverter from editing/cocoa to platform/cocoa. >Index: Source/WebCore/platform/gtk/GtkUtilities.cpp >=================================================================== >--- Source/WebCore/platform/gtk/GtkUtilities.cpp (revision 173670) >+++ Source/WebCore/platform/gtk/GtkUtilities.cpp (working copy) >@@ -22,6 +22,13 @@ > #include "IntPoint.h" > #include <gtk/gtk.h> > >+#if PLATFORM(X11) >+#include <gdk/gdkx.h> >+#endif >+#if PLATFORM(WAYLAND) && !defined(GTK_API_VERSION_2) >+#include <gdk/gdkwayland.h> >+#endif >+ > namespace WebCore { > > IntPoint convertWidgetPointToScreenPoint(GtkWidget* widget, const IntPoint& point) >@@ -52,4 +59,26 @@ bool widgetIsOnscreenToplevelWindow(GtkW > return gtk_widget_is_toplevel(widget) && GTK_IS_WINDOW(widget) && !GTK_IS_OFFSCREEN_WINDOW(widget); > } > >+DisplaySystemType getDisplaySystemType() >+{ >+#if defined(GTK_API_VERSION_2) >+ return DisplaySystemType::X11; >+#else >+ static DisplaySystemType type = [] { >+ GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get()); >+#if PLATFORM(X11) >+ if (GDK_IS_X11_DISPLAY(display)) >+ return DisplaySystemType::X11; >+#endif >+#if PLATFORM(WAYLAND) >+ if (GDK_IS_WAYLAND_DISPLAY(display)) >+ return DisplaySystemType::Wayland; >+#endif >+ ASSERT_NOT_REACHED(); >+ return DisplaySystemType::X11; >+ }(); >+ return type; >+#endif >+} >+ > } // namespace WebCore >Index: Source/WebCore/platform/gtk/GtkUtilities.h >=================================================================== >--- Source/WebCore/platform/gtk/GtkUtilities.h (revision 173670) >+++ Source/WebCore/platform/gtk/GtkUtilities.h (working copy) >@@ -26,6 +26,13 @@ class IntPoint; > IntPoint convertWidgetPointToScreenPoint(GtkWidget*, const IntPoint&); > bool widgetIsOnscreenToplevelWindow(GtkWidget*); > >+enum class DisplaySystemType { >+ X11, >+ Wayland >+}; >+ >+DisplaySystemType getDisplaySystemType(); >+ > } // namespace WebCore > > #endif // GtkUtilities_h
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 136849
:
238188
|
238195
| 238211