Commit 8e515664 authored by carlosgc@webkit.org's avatar carlosgc@webkit.org

[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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 788840c1
2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[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 <darin@apple.com>
RenderQuote has giant function for language to quotes map
......
......@@ -63,7 +63,6 @@ template <> void derefGPtr(GMainLoop* ptr)
g_main_loop_unref(ptr);
}
#if GLIB_CHECK_VERSION(2, 32, 0)
template <> GBytes* refGPtr(GBytes* ptr)
{
if (ptr)
......@@ -77,24 +76,6 @@ template <> void derefGPtr(GBytes* ptr)
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 @@ template <> void derefGPtr(GVariant* ptr)
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)
......
2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[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 <zarvai@inf.u-szeged.hu>
Unreviewed. Fix the ENABLE(SHARED_WORKERS) build after r149864.
......
......@@ -38,30 +38,8 @@
#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
G_DEFINE_INTERFACE(WebKitDOMEventTarget, webkit_dom_event_target, G_TYPE_OBJECT)
static void webkit_dom_event_target_default_init(WebKitDOMEventTargetIface*)
{
......
......@@ -289,14 +289,6 @@ void getGdkDrawableSize(GdkDrawable *drawable, int *width, int *height)
#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)
{
......
......@@ -114,10 +114,6 @@ void gtk_adjustment_set_value(GtkAdjustment* adjusment, gdouble value);
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
......
2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[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 <andersca@apple.com>
Fix build.
......
......@@ -73,12 +73,7 @@ static gpointer testServerMonitorThreadFunc(gpointer)
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()
......
......@@ -81,12 +81,7 @@ static gpointer testServerMonitorThreadFunc(gpointer)
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()
......
2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[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 <kbalazs@webkit.org>
Add my new address to contributors.json. (Unreviewed)
......
......@@ -177,10 +177,6 @@ void printImageDifferences(GdkPixbuf* baselineImage, GdkPixbuf* actualImage)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment