[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
Gustavo Noronha Silva
gns at gnome.org
Thu Apr 8 02:24:25 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit bd2c8859f357ffbafe97bcd08d2f78e2fac23bb8
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 23 13:23:26 2010 +0000
WebCore
2010-03-23 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Holger Freyther.
[GTK] Does not build with latest GTK+ development release
https://bugs.webkit.org/show_bug.cgi?id=36398
Fix building with newest GTK+ versions.
* GNUmakefile.am:
* platform/gtk/GtkPluginWidget.cpp:
(WebCore::GtkPluginWidget::invalidateRect):
(WebCore::GtkPluginWidget::paint):
* platform/gtk/GtkVersioning.h: Added.
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::getVisual):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
* platform/gtk/ScrollbarGtk.cpp:
(ScrollbarGtk::paint):
* plugins/gtk/gtk2xtbin.c:
(gtk_xtbin_set_position):
(gtk_xtbin_unrealize):
WebKit/gtk
2010-03-23 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Holger Freyther.
[GTK] Does not build with latest GTK+ development release
https://bugs.webkit.org/show_bug.cgi?id=36398
Fix building with newest GTK+ versions.
* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::windowRect):
(WebKit::ChromeClient::setWindowRect):
(WebKit::ChromeClient::unfocus):
(WebKit::ChromeClient::canTakeFocus):
(WebKit::ChromeClient::contentsSizeChanged):
* webkit/webkitprivate.cpp:
(currentToplevelCallback):
* webkit/webkitwebframe.cpp:
(webkit_web_frame_print_full):
(webkit_web_frame_print):
* webkit/webkitwebview.cpp:
(webkit_web_view_grab_focus):
(webkit_web_view_focus_in_event):
(webkit_web_view_script_dialog):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d0a867c..cb00ad8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-03-23 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
+
+ Reviewed by Holger Freyther.
+
+ [GTK] Does not build with latest GTK+ development release
+ https://bugs.webkit.org/show_bug.cgi?id=36398
+
+ Fix building with newest GTK+ versions.
+
+ * GNUmakefile.am:
+ * platform/gtk/GtkPluginWidget.cpp:
+ (WebCore::GtkPluginWidget::invalidateRect):
+ (WebCore::GtkPluginWidget::paint):
+ * platform/gtk/GtkVersioning.h: Added.
+ * platform/gtk/PlatformScreenGtk.cpp:
+ (WebCore::getVisual):
+ (WebCore::screenRect):
+ (WebCore::screenAvailableRect):
+ * platform/gtk/ScrollbarGtk.cpp:
+ (ScrollbarGtk::paint):
+ * plugins/gtk/gtk2xtbin.c:
+ (gtk_xtbin_set_position):
+ (gtk_xtbin_unrealize):
+
2010-03-19 Abhishek Arya <inferno at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index b20d15f..e1cb4d8 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -2052,6 +2052,7 @@ webcoregtk_sources += \
WebCore/platform/gtk/GRefPtrGtk.h \
WebCore/platform/gtk/GtkPluginWidget.cpp \
WebCore/platform/gtk/GtkPluginWidget.h \
+ WebCore/platform/gtk/GtkVersioning.h \
WebCore/platform/gtk/KURLGtk.cpp \
WebCore/platform/gtk/KeyEventGtk.cpp \
WebCore/platform/gtk/Language.cpp \
diff --git a/WebCore/platform/gtk/GtkPluginWidget.cpp b/WebCore/platform/gtk/GtkPluginWidget.cpp
index bc2dd92..67bf4b1 100644
--- a/WebCore/platform/gtk/GtkPluginWidget.cpp
+++ b/WebCore/platform/gtk/GtkPluginWidget.cpp
@@ -28,6 +28,7 @@
#include "GtkPluginWidget.h"
#include "GraphicsContext.h"
+#include "GtkVersioning.h"
#include "ScrollView.h"
#include <gtk/gtk.h>
@@ -43,7 +44,7 @@ GtkPluginWidget::GtkPluginWidget(GtkWidget* widget)
void GtkPluginWidget::invalidateRect(const IntRect& _rect)
{
/* no need to */
- if (GTK_WIDGET_NO_WINDOW(platformWidget()))
+ if (!gtk_widget_get_has_window(platformWidget()))
return;
GdkWindow* window = platformWidget()->window;
@@ -70,12 +71,12 @@ void GtkPluginWidget::paint(GraphicsContext* context, const IntRect& rect)
if (!context->gdkExposeEvent())
return;
- /* only paint widgets with NO_WINDOW this way */
- if (!GTK_WIDGET_NO_WINDOW(platformWidget()))
+ /* only paint widgets with no window this way */
+ if (gtk_widget_get_has_window(platformWidget()))
return;
GtkWidget* widget = platformWidget();
- ASSERT(GTK_WIDGET_NO_WINDOW(widget));
+ ASSERT(!gtk_widget_get_has_window(widget));
GdkEvent* event = gdk_event_new(GDK_EXPOSE);
event->expose = *context->gdkExposeEvent();
diff --git a/WebCore/platform/gtk/GtkVersioning.h b/WebCore/platform/gtk/GtkVersioning.h
new file mode 100644
index 0000000..fc92d8b
--- /dev/null
+++ b/WebCore/platform/gtk/GtkVersioning.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2010 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef GtkVersioning_h
+#define GtkVersioning_h
+
+#include <gtk/gtk.h>
+
+// Macros to avoid deprecation checking churn
+#if !GTK_CHECK_VERSION(2, 19, 0)
+#define gtk_widget_is_toplevel(widget) GTK_WIDGET_TOPLEVEL(widget)
+#define gtk_widget_get_realized(widget) GTK_WIDGET_REALIZED(widget)
+#define gtk_widget_get_has_window(widget) !GTK_WIDGET_NO_WINDOW(widget)
+#define gtk_widget_get_can_focus(widget) GTK_WIDGET_CAN_FOCUS(widget)
+#define gtk_widget_is_sensitive(widget) GTK_WIDGET_IS_SENSITIVE(widget)
+#endif // GTK_CHECK_VERSION(2, 19, 0)
+
+#endif // GtkVersioning_h
diff --git a/WebCore/platform/gtk/PlatformScreenGtk.cpp b/WebCore/platform/gtk/PlatformScreenGtk.cpp
index 92ccff4..9341714 100644
--- a/WebCore/platform/gtk/PlatformScreenGtk.cpp
+++ b/WebCore/platform/gtk/PlatformScreenGtk.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "PlatformScreen.h"
+#include "GtkVersioning.h"
#include "HostWindow.h"
#include "ScrollView.h"
#include "Widget.h"
@@ -54,13 +55,9 @@ static GdkVisual* getVisual(Widget* widget)
if (!container)
return 0;
- if (!GTK_WIDGET_REALIZED(container)) {
+ if (!gtk_widget_get_realized(container)) {
GtkWidget* toplevel = gtk_widget_get_toplevel(container);
-#if GTK_CHECK_VERSION(2, 18, 0)
if (gtk_widget_is_toplevel(toplevel))
-#else
- if (GTK_WIDGET_TOPLEVEL(toplevel))
-#endif
container = toplevel;
else
return 0;
@@ -98,11 +95,7 @@ FloatRect screenRect(Widget* widget)
return FloatRect();
GtkWidget* container = gtk_widget_get_toplevel(GTK_WIDGET(widget->root()->hostWindow()->platformPageClient()));
-#if GTK_CHECK_VERSION(2, 18, 0)
if (!gtk_widget_is_toplevel(container))
-#else
- if (!GTK_WIDGET_TOPLEVEL(container))
-#endif
return FloatRect();
GdkScreen* screen = gtk_widget_has_screen(container) ? gtk_widget_get_screen(container) : gdk_screen_get_default();
@@ -126,7 +119,7 @@ FloatRect screenAvailableRect(Widget* widget)
if (!container)
return FloatRect();
- if (!GTK_WIDGET_REALIZED(container))
+ if (!gtk_widget_get_realized(container))
return screenRect(widget);
GdkDrawable* rootWindow = GDK_DRAWABLE(gtk_widget_get_root_window(container));
diff --git a/WebCore/platform/gtk/ScrollbarGtk.cpp b/WebCore/platform/gtk/ScrollbarGtk.cpp
index 0c3037a..00cbcf0 100644
--- a/WebCore/platform/gtk/ScrollbarGtk.cpp
+++ b/WebCore/platform/gtk/ScrollbarGtk.cpp
@@ -196,7 +196,7 @@ void ScrollbarGtk::setEnabled(bool shouldEnable)
/*
* Strategy to painting a Widget:
* 1.) do not paint if there is no GtkWidget set
- * 2.) We assume that GTK_NO_WINDOW is set and that frameRectsChanged positioned
+ * 2.) We assume that the widget has no window and that frameRectsChanged positioned
* the widget correctly. ATM we do not honor the GraphicsContext translation.
*/
void ScrollbarGtk::paint(GraphicsContext* context, const IntRect& rect)
@@ -208,7 +208,7 @@ void ScrollbarGtk::paint(GraphicsContext* context, const IntRect& rect)
return;
GtkWidget* widget = platformWidget();
- ASSERT(GTK_WIDGET_NO_WINDOW(widget));
+ ASSERT(!gtk_widget_get_has_window(widget));
GdkEvent* event = gdk_event_new(GDK_EXPOSE);
event->expose = *context->gdkExposeEvent();
diff --git a/WebCore/plugins/gtk/gtk2xtbin.c b/WebCore/plugins/gtk/gtk2xtbin.c
index 68c5373..fad66fe 100644
--- a/WebCore/plugins/gtk/gtk2xtbin.c
+++ b/WebCore/plugins/gtk/gtk2xtbin.c
@@ -42,6 +42,7 @@
* inside a GTK application.
*/
+#include "GtkVersioning.h"
#include "xembed.h"
#include "gtk2xtbin.h"
#include <gtk/gtk.h>
@@ -401,7 +402,7 @@ gtk_xtbin_set_position (GtkXtBin *xtbin,
xtbin->x = x;
xtbin->y = y;
- if (GTK_WIDGET_REALIZED (xtbin))
+ if (gtk_widget_get_realized (xtbin))
gdk_window_move (GTK_WIDGET (xtbin)->window, x, y);
}
@@ -456,7 +457,7 @@ gtk_xtbin_unrealize (GtkWidget *object)
widget = GTK_WIDGET(object);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_VISIBLE);
- if (GTK_WIDGET_REALIZED (widget)) {
+ if (gtk_widget_get_realized (widget)) {
xt_client_unrealize(&(xtbin->xtclient));
}
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 4589719..7c76716 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,28 @@
+2010-03-23 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
+
+ Reviewed by Holger Freyther.
+
+ [GTK] Does not build with latest GTK+ development release
+ https://bugs.webkit.org/show_bug.cgi?id=36398
+
+ Fix building with newest GTK+ versions.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::windowRect):
+ (WebKit::ChromeClient::setWindowRect):
+ (WebKit::ChromeClient::unfocus):
+ (WebKit::ChromeClient::canTakeFocus):
+ (WebKit::ChromeClient::contentsSizeChanged):
+ * webkit/webkitprivate.cpp:
+ (currentToplevelCallback):
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_print_full):
+ (webkit_web_frame_print):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_grab_focus):
+ (webkit_web_view_focus_in_event):
+ (webkit_web_view_script_dialog):
+
2010-03-18 Philip Chimento <philip.chimento at gmail.com>
Reviewed by Oliver Hunt.
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index c63a03b..87c766f 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -28,6 +28,7 @@
#include "FileChooser.h"
#include "FloatRect.h"
#include "FrameLoadRequest.h"
+#include "GtkVersioning.h"
#include "IntRect.h"
#include "PlatformString.h"
#include "CString.h"
@@ -65,11 +66,7 @@ void ChromeClient::chromeDestroyed()
FloatRect ChromeClient::windowRect()
{
GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView));
-#if GTK_CHECK_VERSION(2, 18, 0)
if (gtk_widget_is_toplevel(window)) {
-#else
- if (GTK_WIDGET_TOPLEVEL(window)) {
-#endif
gint left, top, width, height;
gtk_window_get_position(GTK_WINDOW(window), &left, &top);
gtk_window_get_size(GTK_WINDOW(window), &width, &height);
@@ -98,11 +95,7 @@ void ChromeClient::setWindowRect(const FloatRect& rect)
return;
GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView));
-#if GTK_CHECK_VERSION(2, 18, 0)
if (gtk_widget_is_toplevel(window)) {
-#else
- if (GTK_WIDGET_TOPLEVEL(window)) {
-#endif
gtk_window_move(GTK_WINDOW(window), intrect.x(), intrect.y());
gtk_window_resize(GTK_WINDOW(window), intrect.width(), intrect.height());
}
@@ -128,11 +121,7 @@ void ChromeClient::focus()
void ChromeClient::unfocus()
{
GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView));
-#if GTK_CHECK_VERSION(2, 18, 0)
if (gtk_widget_is_toplevel(window))
-#else
- if (GTK_WIDGET_TOPLEVEL(window))
-#endif
gtk_window_set_focus(GTK_WINDOW(window), NULL);
}
@@ -260,11 +249,7 @@ void ChromeClient::closeWindowSoon()
bool ChromeClient::canTakeFocus(FocusDirection)
{
-#if GTK_CHECK_VERSION(2, 18, 0)
return gtk_widget_get_can_focus(GTK_WIDGET(m_webView));
-#else
- return GTK_WIDGET_CAN_FOCUS(m_webView);
-#endif
}
void ChromeClient::takeFocus(FocusDirection)
@@ -439,7 +424,7 @@ void ChromeClient::contentsSizeChanged(Frame* frame, const IntSize& size) const
// We need to queue a resize request only if the size changed,
// otherwise we get into an infinite loop!
GtkWidget* widget = GTK_WIDGET(m_webView);
- if (GTK_WIDGET_REALIZED(widget)
+ if (gtk_widget_get_realized(widget)
&& (widget->requisition.height != size.height())
|| (widget->requisition.width != size.width()))
gtk_widget_queue_resize_no_redraw(widget);
diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp
index be88bb5..445051b 100644
--- a/WebKit/gtk/webkit/webkitprivate.cpp
+++ b/WebKit/gtk/webkit/webkitprivate.cpp
@@ -28,6 +28,7 @@
#include "Frame.h"
#include "FrameLoader.h"
#include "FrameLoaderClientGtk.h"
+#include "GtkVersioning.h"
#include "HitTestResult.h"
#include "IconDatabase.h"
#include <libintl.h>
@@ -223,11 +224,7 @@ static GtkWidget* currentToplevelCallback(WebKitSoupAuthDialog* feature, SoupMes
return NULL;
GtkWidget* toplevel = gtk_widget_get_toplevel(GTK_WIDGET(frame->page()->chrome()->platformPageClient()));
-#if GTK_CHECK_VERSION(2, 18, 0)
if (gtk_widget_is_toplevel(toplevel))
-#else
- if (GTK_WIDGET_TOPLEVEL(toplevel))
-#endif
return toplevel;
else
return NULL;
diff --git a/WebKit/gtk/webkit/webkitwebframe.cpp b/WebKit/gtk/webkit/webkitwebframe.cpp
index 9876c1a..e441c2a 100644
--- a/WebKit/gtk/webkit/webkitwebframe.cpp
+++ b/WebKit/gtk/webkit/webkitwebframe.cpp
@@ -45,6 +45,7 @@
#include <glib/gi18n-lib.h>
#include "GCController.h"
#include "GraphicsContext.h"
+#include "GtkVersioning.h"
#include "HTMLFrameOwnerElement.h"
#include "JSDOMWindow.h"
#include "JSLock.h"
@@ -956,11 +957,7 @@ GtkPrintOperationResult webkit_web_frame_print_full(WebKitWebFrame* frame, GtkPr
GtkWidget* topLevel = gtk_widget_get_toplevel(GTK_WIDGET(webkit_web_frame_get_web_view(frame)));
-#if GTK_CHECK_VERSION(2, 18, 0)
if (!gtk_widget_is_toplevel(topLevel))
-#else
- if (!GTK_WIDGET_TOPLEVEL(topLevel))
-#endif
topLevel = NULL;
Frame* coreFrame = core(frame);
@@ -999,19 +996,11 @@ void webkit_web_frame_print(WebKitWebFrame* frame)
if (error) {
GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(priv->webView));
-#if GTK_CHECK_VERSION(2, 18, 0)
GtkWidget* dialog = gtk_message_dialog_new(gtk_widget_is_toplevel(window) ? GTK_WINDOW(window) : 0,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"%s", error->message);
-#else
- GtkWidget* dialog = gtk_message_dialog_new(GTK_WIDGET_TOPLEVEL(window) ? GTK_WINDOW(window) : 0,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- "%s", error->message);
-#endif
g_error_free(error);
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index d8e854b..b9fd283 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -64,6 +64,7 @@
#include <glib/gi18n-lib.h>
#include <GOwnPtr.h>
#include "GraphicsContext.h"
+#include "GtkVersioning.h"
#include "HitTestRequest.h"
#include "HitTestResult.h"
#include "IconDatabase.h"
@@ -696,11 +697,7 @@ static void webkit_web_view_size_allocate(GtkWidget* widget, GtkAllocation* allo
static void webkit_web_view_grab_focus(GtkWidget* widget)
{
-#if GTK_CHECK_VERSION(2, 18, 0)
if (gtk_widget_is_sensitive(widget)) {
-#else
- if (GTK_WIDGET_IS_SENSITIVE(widget)) {
-#endif
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
FocusController* focusController = core(webView)->focusController();
@@ -720,11 +717,7 @@ static gboolean webkit_web_view_focus_in_event(GtkWidget* widget, GdkEventFocus*
// TODO: Improve focus handling as suggested in
// http://bugs.webkit.org/show_bug.cgi?id=16910
GtkWidget* toplevel = gtk_widget_get_toplevel(widget);
-#if GTK_CHECK_VERSION(2, 18, 0)
if (gtk_widget_is_toplevel(toplevel) && gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel))) {
-#else
- if (GTK_WIDGET_TOPLEVEL(toplevel) && gtk_window_has_toplevel_focus(GTK_WINDOW(toplevel))) {
-#endif
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
FocusController* focusController = core(webView)->focusController();
@@ -923,11 +916,7 @@ static gboolean webkit_web_view_script_dialog(WebKitWebView* webView, WebKitWebF
}
window = gtk_widget_get_toplevel(GTK_WIDGET(webView));
-#if GTK_CHECK_VERSION(2, 18, 0)
dialog = gtk_message_dialog_new(gtk_widget_is_toplevel(window) ? GTK_WINDOW(window) : 0, GTK_DIALOG_DESTROY_WITH_PARENT, messageType, buttons, "%s", message);
-#else
- dialog = gtk_message_dialog_new(GTK_WIDGET_TOPLEVEL(window) ? GTK_WINDOW(window) : 0, GTK_DIALOG_DESTROY_WITH_PARENT, messageType, buttons, "%s", message);
-#endif
gchar* title = g_strconcat("JavaScript - ", webkit_web_frame_get_uri(frame), NULL);
gtk_window_set_title(GTK_WINDOW(dialog), title);
g_free(title);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list