Title: [149879] trunk
Revision
149879
Author
[email protected]
Date
2013-05-10 09:11:20 -0700 (Fri, 10 May 2013)

Log Message

[GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115904

Reviewed by Martin Robinson.

Source/WebCore:

* bindings/gobject/WebKitDOMEventTarget.cpp:
* platform/gtk/GtkVersioning.c:
* platform/gtk/GtkVersioning.h:

Source/WebKit2:

* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
(startTestServerMonitor):
* UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
(startTestServerMonitor):

Source/WTF:

* wtf/gobject/GRefPtr.cpp:

Tools:

* ImageDiff/gtk/ImageDiff.cpp:
(main):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (149878 => 149879)


--- trunk/Source/WTF/ChangeLog	2013-05-10 16:01:35 UTC (rev 149878)
+++ trunk/Source/WTF/ChangeLog	2013-05-10 16:11:20 UTC (rev 149879)
@@ -1,3 +1,12 @@
+2013-05-10  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
+        https://bugs.webkit.org/show_bug.cgi?id=115904
+
+        Reviewed by Martin Robinson.
+
+        * wtf/gobject/GRefPtr.cpp:
+
 2013-05-09  Darin Adler  <[email protected]>
 
         RenderQuote has giant function for language to quotes map

Modified: trunk/Source/WTF/wtf/gobject/GRefPtr.cpp (149878 => 149879)


--- trunk/Source/WTF/wtf/gobject/GRefPtr.cpp	2013-05-10 16:01:35 UTC (rev 149878)
+++ trunk/Source/WTF/wtf/gobject/GRefPtr.cpp	2013-05-10 16:11:20 UTC (rev 149879)
@@ -63,7 +63,6 @@
         g_main_loop_unref(ptr);
 }
 
-#if GLIB_CHECK_VERSION(2, 32, 0)
 template <> GBytes* refGPtr(GBytes* ptr)
 {
     if (ptr)
@@ -77,24 +76,6 @@
         g_bytes_unref(ptr);
 }
 
-# else
-
-typedef struct _GBytes {
-    bool fake;
-} GBytes;
-
-template <> GBytes* refGPtr(GBytes* ptr)
-{
-    return ptr;
-}
-
-template <> void derefGPtr(GBytes* ptr)
-{
-}
-
-#endif
-
-#if GLIB_CHECK_VERSION(2, 24, 0)
 template <> GVariant* refGPtr(GVariant* ptr)
 {
     if (ptr)
@@ -107,24 +88,6 @@
     g_variant_unref(ptr);
 }
 
-#else
-
-// We do this so that we can avoid including the glib.h header in GRefPtr.h.
-typedef struct _GVariant {
-    bool fake;
-} GVariant; 
-
-template <> GVariant* refGPtr(GVariant* ptr)
-{
-    return ptr;
-}
-
-template <> void derefGPtr(GVariant* ptr)
-{
-}
-
-#endif
-
 template <> GSource* refGPtr(GSource* ptr)
 {
     if (ptr)

Modified: trunk/Source/WebCore/ChangeLog (149878 => 149879)


--- trunk/Source/WebCore/ChangeLog	2013-05-10 16:01:35 UTC (rev 149878)
+++ trunk/Source/WebCore/ChangeLog	2013-05-10 16:11:20 UTC (rev 149879)
@@ -1,3 +1,14 @@
+2013-05-10  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
+        https://bugs.webkit.org/show_bug.cgi?id=115904
+
+        Reviewed by Martin Robinson.
+
+        * bindings/gobject/WebKitDOMEventTarget.cpp:
+        * platform/gtk/GtkVersioning.c:
+        * platform/gtk/GtkVersioning.h:
+
 2013-05-10  Zoltan Arvai  <[email protected]>
 
         Unreviewed. Fix the ENABLE(SHARED_WORKERS) build after r149864.

Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp (149878 => 149879)


--- trunk/Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp	2013-05-10 16:01:35 UTC (rev 149878)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp	2013-05-10 16:11:20 UTC (rev 149879)
@@ -38,31 +38,9 @@
 #include "WebKitDOMPrivate.h"
 
 typedef WebKitDOMEventTargetIface WebKitDOMEventTargetInterface;
-#if GLIB_CHECK_VERSION(2, 24, 0)
+
 G_DEFINE_INTERFACE(WebKitDOMEventTarget, webkit_dom_event_target, G_TYPE_OBJECT)
-#else
-static void webkit_dom_event_target_default_init(WebKitDOMEventTargetIface*);
 
-GType webkit_dom_event_target_get_type(void)
-{
-    static volatile gsize typeIdVolatile = 0;
-
-    if (g_once_init_enter(&typeIdVolatile)) {
-        GType typeId = g_type_register_static_simple(G_TYPE_INTERFACE,
-                                                     g_intern_static_string("WebKitDOMEventTarget"),
-                                                     sizeof(WebKitDOMEventTargetInterface),
-                                                     (GClassInitFunc)webkit_dom_event_target_default_init,
-                                                     0,
-                                                     static_cast<GInstanceInitFunc>(0),
-                                                     static_cast<GTypeFlags>(0));
-        g_type_interface_add_prerequisite(typeId, G_TYPE_OBJECT);
-        g_once_init_leave(&typeIdVolatile, typeId);
-    }
-
-    return typeIdVolatile;
-}
-#endif
-
 static void webkit_dom_event_target_default_init(WebKitDOMEventTargetIface*)
 {
 }

Modified: trunk/Source/WebCore/platform/gtk/GtkVersioning.c (149878 => 149879)


--- trunk/Source/WebCore/platform/gtk/GtkVersioning.c	2013-05-10 16:01:35 UTC (rev 149878)
+++ trunk/Source/WebCore/platform/gtk/GtkVersioning.c	2013-05-10 16:11:20 UTC (rev 149879)
@@ -289,14 +289,6 @@
 
 #endif // GTK_API_VERSION_2
 
-#if !GLIB_CHECK_VERSION(2, 27, 1)
-gboolean g_signal_accumulator_first_wins(GSignalInvocationHint *invocationHint, GValue *returnAccumulator, const GValue *handlerReturn, gpointer data)
-{
-    g_value_copy(handlerReturn, returnAccumulator);
-    return FALSE;
-}
-#endif
-
 #if !GTK_CHECK_VERSION(2, 22, 0)
 cairo_surface_t *gdk_window_create_similar_surface(GdkWindow *window, cairo_content_t content, int width, int height)
 {

Modified: trunk/Source/WebCore/platform/gtk/GtkVersioning.h (149878 => 149879)


--- trunk/Source/WebCore/platform/gtk/GtkVersioning.h	2013-05-10 16:01:35 UTC (rev 149878)
+++ trunk/Source/WebCore/platform/gtk/GtkVersioning.h	2013-05-10 16:11:20 UTC (rev 149879)
@@ -114,10 +114,6 @@
 GdkDevice* getDefaultGDKPointerDevice(GdkWindow* window);
 GdkCursor* blankCursor();
 
-#if !GLIB_CHECK_VERSION(2, 27, 1)
-gboolean g_signal_accumulator_first_wins(GSignalInvocationHint* invocationHint, GValue* returnAccumulator, const GValue* handlerReturn, gpointer data);
-#endif
-
 #if !GTK_CHECK_VERSION(3, 3, 6)
 void gdk_screen_get_monitor_workarea(GdkScreen *, int monitor, GdkRectangle *area);
 #endif

Modified: trunk/Source/WebKit2/ChangeLog (149878 => 149879)


--- trunk/Source/WebKit2/ChangeLog	2013-05-10 16:01:35 UTC (rev 149878)
+++ trunk/Source/WebKit2/ChangeLog	2013-05-10 16:11:20 UTC (rev 149879)
@@ -1,3 +1,15 @@
+2013-05-10  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
+        https://bugs.webkit.org/show_bug.cgi?id=115904
+
+        Reviewed by Martin Robinson.
+
+        * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
+        (startTestServerMonitor):
+        * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
+        (startTestServerMonitor):
+
 2013-05-09  Anders Carlsson  <[email protected]>
 
         Fix build.

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp (149878 => 149879)


--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp	2013-05-10 16:01:35 UTC (rev 149878)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp	2013-05-10 16:11:20 UTC (rev 149879)
@@ -73,12 +73,7 @@
 static void startTestServerMonitor()
 {
     gChildIsReady = false;
-
-#if (!GLIB_CHECK_VERSION(2, 31, 0))
-    g_thread_create(testServerMonitorThreadFunc, 0, FALSE, 0);
-#else
     g_thread_new("TestServerMonitor", testServerMonitorThreadFunc, 0);
-#endif
 }
 
 static void startTestServer()

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp (149878 => 149879)


--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp	2013-05-10 16:01:35 UTC (rev 149878)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp	2013-05-10 16:11:20 UTC (rev 149879)
@@ -81,12 +81,7 @@
 static void startTestServerMonitor()
 {
     kChildIsReady = false;
-
-#if (!GLIB_CHECK_VERSION(2, 31, 0))
-    g_thread_create(testServerMonitorThreadFunc, 0, FALSE, 0);
-#else
     g_thread_new("TestServerMonitor", testServerMonitorThreadFunc, 0);
-#endif
 }
 
 static void startTestServer()

Modified: trunk/Tools/ChangeLog (149878 => 149879)


--- trunk/Tools/ChangeLog	2013-05-10 16:01:35 UTC (rev 149878)
+++ trunk/Tools/ChangeLog	2013-05-10 16:11:20 UTC (rev 149879)
@@ -1,3 +1,13 @@
+2013-05-10  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
+        https://bugs.webkit.org/show_bug.cgi?id=115904
+
+        Reviewed by Martin Robinson.
+
+        * ImageDiff/gtk/ImageDiff.cpp:
+        (main):
+
 2013-05-10  Balazs Kelemen  <[email protected]>
 
         Add my new address to contributors.json. (Unreviewed)

Modified: trunk/Tools/ImageDiff/gtk/ImageDiff.cpp (149878 => 149879)


--- trunk/Tools/ImageDiff/gtk/ImageDiff.cpp	2013-05-10 16:01:35 UTC (rev 149878)
+++ trunk/Tools/ImageDiff/gtk/ImageDiff.cpp	2013-05-10 16:11:20 UTC (rev 149879)
@@ -177,10 +177,6 @@
 
 int main(int argc, char* argv[])
 {
-#if !GLIB_CHECK_VERSION(2, 35, 0)
-    g_type_init();
-#endif
-
     GError* error = 0;
     GOptionContext* context = g_option_context_new("- compare two image files, printing their percentage difference and the difference image to stdout");
     g_option_context_add_main_entries(context, commandLineOptionEntries, 0);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to