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-20140916131226.patch (text/plain), 2.85 KB, created by
Zan Dobersek
on 2014-09-16 13:12:29 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2014-09-16 13:12:29 PDT
Size:
2.85 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 173667) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,21 @@ >+2014-09-16 Zan Dobersek <zdobersek@igalia.com> >+ >+ [GTK] Add a helper class for display system deduction >+ https://bugs.webkit.org/show_bug.cgi?id=136849 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ DisplaySystemType is a helper class that checks the type of the default >+ GdkDisplay object and initializes a static variable to the corresponding >+ value. DisplaySystemType::get() is then used to return that value. >+ >+ The class is declared and implemented in GtkUtilities files. >+ >+ * platform/gtk/GtkUtilities.cpp: >+ (WebCore::widgetIsOnscreenToplevelWindow): >+ (WebCore::DisplaySystemType::get): >+ * platform/gtk/GtkUtilities.h: >+ > 2014-09-16 peavo@outlook.com <peavo@outlook.com> > > [Curl] Sometimes incomplete or empty content can be loaded from cache. >Index: Source/WebCore/platform/gtk/GtkUtilities.cpp >=================================================================== >--- Source/WebCore/platform/gtk/GtkUtilities.cpp (revision 173667) >+++ 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,23 @@ bool widgetIsOnscreenToplevelWindow(GtkW > return gtk_widget_is_toplevel(widget) && GTK_IS_WINDOW(widget) && !GTK_IS_OFFSCREEN_WINDOW(widget); > } > >+DisplaySystemType::Type DisplaySystemType::get() >+{ >+ static Type type = Unknown; >+ if (type == Unknown) { >+ GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get()); >+#if PLATFORM(X11) >+ if (GDK_IS_X11_DISPLAY(display)) >+ type = X11; >+#endif >+#if PLATFORM(WAYLAND) && !defined(GTK_API_VERSION_2) >+ if (GDK_IS_WAYLAND_DISPLAY(display)) >+ type = Wayland; >+#endif >+ ASSERT(type != Unknown); >+ }; >+ >+ return type; >+} >+ > } // namespace WebCore >Index: Source/WebCore/platform/gtk/GtkUtilities.h >=================================================================== >--- Source/WebCore/platform/gtk/GtkUtilities.h (revision 173667) >+++ Source/WebCore/platform/gtk/GtkUtilities.h (working copy) >@@ -26,6 +26,17 @@ class IntPoint; > IntPoint convertWidgetPointToScreenPoint(GtkWidget*, const IntPoint&); > bool widgetIsOnscreenToplevelWindow(GtkWidget*); > >+class DisplaySystemType { >+public: >+ enum Type { >+ Unknown, >+ X11, >+ Wayland >+ }; >+ >+ static Type get(); >+}; >+ > } // 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