[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
mrobinson at webkit.org
mrobinson at webkit.org
Fri Jan 21 15:18:35 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit fc00228b9346ba3fde62e62cc2b65b76e4252332
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 10 23:52:29 2011 +0000
2011-01-10 Martin Robinson <mrobinson at igalia.com>
Reviewed by Xan Lopez.
[GTK] Remove use of deprecated GTK+ methods before the 1.3.10 release
https://bugs.webkit.org/show_bug.cgi?id=52173
No new tests. This is only a build fix.
* platform/gtk/GRefPtrGtk.cpp: Guard the GdkCursor specialization against GTK+ 3.x.
In GTK+ 3.x, GdkCursor is just a GObject.
* platform/gtk/GRefPtrGtk.h: Ditto.
2011-01-10 Martin Robinson <mrobinson at igalia.com>
Reviewed by Xan Lopez.
[GTK] Remove use of deprecated GTK+ methods before the 1.3.10 release
https://bugs.webkit.org/show_bug.cgi?id=52173
* WebCoreSupport/FullscreenVideoController.cpp:
(FullscreenVideoController::enterFullscreen): Use a GRefPtr here to avoid having to
call either g_object_unref or gdk_cursor_unref.
* webkit/webkitwebview.cpp: Guard use of deprecated methods.
(webkit_web_view_realize): Ditto.
(webkit_web_view_drag_end): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 5d0dbfb..8170f43 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-10 Martin Robinson <mrobinson at igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Remove use of deprecated GTK+ methods before the 1.3.10 release
+ https://bugs.webkit.org/show_bug.cgi?id=52173
+
+ No new tests. This is only a build fix.
+
+ * platform/gtk/GRefPtrGtk.cpp: Guard the GdkCursor specialization against GTK+ 3.x.
+ In GTK+ 3.x, GdkCursor is just a GObject.
+ * platform/gtk/GRefPtrGtk.h: Ditto.
+
2011-01-10 Geoffrey Garen <ggaren at apple.com>
Reviewed by Oliver Hunt.
diff --git a/Source/WebCore/platform/gtk/GRefPtrGtk.cpp b/Source/WebCore/platform/gtk/GRefPtrGtk.cpp
index 6647b99..9a9d679 100644
--- a/Source/WebCore/platform/gtk/GRefPtrGtk.cpp
+++ b/Source/WebCore/platform/gtk/GRefPtrGtk.cpp
@@ -38,6 +38,7 @@ template <> void derefGPtr(GtkTargetList* ptr)
gtk_target_list_unref(ptr);
}
+#ifdef GTK_API_VERSION_2
template <> GdkCursor* refGPtr(GdkCursor* ptr)
{
if (ptr)
@@ -50,5 +51,6 @@ template <> void derefGPtr(GdkCursor* ptr)
if (ptr)
gdk_cursor_unref(ptr);
}
+#endif
}
diff --git a/Source/WebCore/platform/gtk/GRefPtrGtk.h b/Source/WebCore/platform/gtk/GRefPtrGtk.h
index 1fb9772..a9f491f 100644
--- a/Source/WebCore/platform/gtk/GRefPtrGtk.h
+++ b/Source/WebCore/platform/gtk/GRefPtrGtk.h
@@ -28,8 +28,10 @@ namespace WTF {
template <> GtkTargetList* refGPtr(GtkTargetList* ptr);
template <> void derefGPtr(GtkTargetList* ptr);
+#ifdef GTK_API_VERSION_2
template <> GdkCursor* refGPtr(GdkCursor* ptr);
template <> void derefGPtr(GdkCursor* ptr);
+#endif
}
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 69ab081..f315d62 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-10 Martin Robinson <mrobinson at igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Remove use of deprecated GTK+ methods before the 1.3.10 release
+ https://bugs.webkit.org/show_bug.cgi?id=52173
+
+ * WebCoreSupport/FullscreenVideoController.cpp:
+ (FullscreenVideoController::enterFullscreen): Use a GRefPtr here to avoid having to
+ call either g_object_unref or gdk_cursor_unref.
+ * webkit/webkitwebview.cpp: Guard use of deprecated methods.
+ (webkit_web_view_realize): Ditto.
+ (webkit_web_view_drag_end): Ditto.
+
2011-01-10 Alejandro G. Castro <alex at igalia.com>
Reviewed by Xan Lopez.
diff --git a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
index c042b5e..5653aba 100644
--- a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
+++ b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
@@ -271,9 +271,13 @@ void FullscreenVideoController::enterFullscreen()
createHud();
// Ensure black background.
- GdkColor color;
- gdk_color_parse("black", &color);
+#ifdef GTK_API_VERSION_2
+ GdkColor color = { 1, 0, 0, 0 };
gtk_widget_modify_bg(m_window, GTK_STATE_NORMAL, &color);
+#else
+ GdkRGBA color = { 0, 0, 0, 1};
+ gtk_widget_override_background_color(m_window, GTK_STATE_FLAG_NORMAL, &color);
+#endif
gtk_widget_set_double_buffered(m_window, FALSE);
g_signal_connect(m_window, "key-press-event", G_CALLBACK(onFullscreenGtkKeyPressEvent), this);
@@ -283,9 +287,8 @@ void FullscreenVideoController::enterFullscreen()
gtk_widget_show_all(m_window);
GdkWindow* window = gtk_widget_get_window(m_window);
- GdkCursor* cursor = blankCursor();
- gdk_window_set_cursor(window, cursor);
- gdk_cursor_unref(cursor);
+ GRefPtr<GdkCursor> cursor(adoptGRef(blankCursor()));
+ gdk_window_set_cursor(window, cursor.get());
g_signal_connect(m_window, "motion-notify-event", G_CALLBACK(onFullscreenGtkMotionNotifyEvent), this);
g_signal_connect(m_window, "configure-event", G_CALLBACK(onFullscreenGtkConfigureEvent), this);
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index bd3538c..bd023f8 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -1091,12 +1091,16 @@ static void webkit_web_view_realize(GtkWidget* widget)
gtk_widget_set_window(widget, window);
gdk_window_set_user_data(window, widget);
+#ifdef GTK_API_VERSION_2
#if GTK_CHECK_VERSION(2, 20, 0)
gtk_widget_style_attach(widget);
#else
widget->style = gtk_style_attach(gtk_widget_get_style(widget), window);
#endif
gtk_style_set_background(gtk_widget_get_style(widget), window, GTK_STATE_NORMAL);
+#else
+ gtk_style_context_set_background(gtk_widget_get_style_context(widget), window);
+#endif
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
WebKitWebViewPrivate* priv = webView->priv;
@@ -1544,17 +1548,21 @@ static void webkit_web_view_drag_end(GtkWidget* widget, GdkDragContext* context)
if (!frame)
return;
- GdkEvent* event = gdk_event_new(GDK_BUTTON_RELEASE);
+ GOwnPtr<GdkEvent> event(gdk_event_new(GDK_BUTTON_RELEASE));
int x, y, xRoot, yRoot;
- GdkModifierType modifiers;
+ GdkModifierType modifiers = static_cast<GdkModifierType>(0);
+#ifdef GTK_API_VERSION_2
GdkDisplay* display = gdk_display_get_default();
gdk_display_get_pointer(display, 0, &xRoot, &yRoot, &modifiers);
+ event->button.window = gdk_display_get_window_at_pointer(display, &x, &y);
+#else
+ GdkDevice* device = gdk_drag_context_get_device(context);
+ event->button.window = gdk_device_get_window_at_position(device, &x, &y);
+ gdk_device_get_position(device, 0, &xRoot, &yRoot);
+#endif
- GdkWindow* window = gdk_display_get_window_at_pointer(display, &x, &y);
- if (window) {
- g_object_ref(window);
- event->button.window = window;
- }
+ if (event->button.window)
+ g_object_ref(event->button.window);
event->button.x = x;
event->button.y = y;
event->button.x_root = xRoot;
@@ -1563,8 +1571,6 @@ static void webkit_web_view_drag_end(GtkWidget* widget, GdkDragContext* context)
PlatformMouseEvent platformEvent(&event->button);
frame->eventHandler()->dragSourceEndedAt(platformEvent, gdkDragActionToDragOperation(gdk_drag_context_get_selected_action(context)));
-
- gdk_event_free(event);
}
static void webkit_web_view_drag_data_get(GtkWidget* widget, GdkDragContext* context, GtkSelectionData* selectionData, guint info, guint)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list