[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.2.3-2-25-gb2c19be
Gustavo Noronha Silva
gns at gnome.org
Mon Sep 6 13:09:09 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit cf5482c28524aa2a8791a7669d9c1f4a39256fb1
Author: xan at webkit.org <xan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jun 15 19:14:38 2010 +0000
2010-06-15 Xan Lopez <xlopez at igalia.com>
Reviewed by Gustavo Noronha.
[GTK] Does not compile with -DGSEAL_ENABLE
https://bugs.webkit.org/show_bug.cgi?id=37851
Add GSEAL_ENABLE flag when doing debug builds.
* GNUmakefile.am:
WebCore:
2010-06-15 Xan Lopez <xlopez at igalia.com>
Reviewed by Gustavo Noronha.
[GTK] Does not compile with -DGSEAL_ENABLE
https://bugs.webkit.org/show_bug.cgi?id=37851
Fix compilation with GSEAL_ENABLE.
* platform/gtk/GtkVersioning.h:
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenDepth):
(WebCore::screenDepthPerComponent):
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenu::show):
* platform/gtk/ScrollbarGtk.cpp:
(ScrollbarGtk::detachAdjustment):
(ScrollbarGtk::updateThumbPosition):
(ScrollbarGtk::updateThumbProportion):
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::paint):
(WebCore::PluginView::initXEvent):
(WebCore::PluginView::platformGetValue):
(WebCore::PluginView::platformStart):
* plugins/gtk/gtk2xtbin.c:
(gtk_xtbin_realize):
(gtk_xtbin_new):
(gtk_xtbin_set_position):
(gtk_xtbin_unrealize):
WebKit/gtk:
2010-06-15 Xan Lopez <xlopez at igalia.com>
Reviewed by Gustavo Noronha.
[GTK] Does not compile with -DGSEAL_ENABLE
https://bugs.webkit.org/show_bug.cgi?id=37851
Fix compilation with GSEAL_ENABLE.
* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::pageRect):
(WebKit::ChromeClient::contentsSizeChanged):
* tests/testdomnode.c:
(test_dom_node_insertion):
* webkit/webkitwebview.cpp:
(webkit_web_view_realize):
(webkit_web_view_script_dialog):
(webkit_web_view_drag_end):
(webkit_web_view_init):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/ChangeLog b/ChangeLog
index cb60937..dc37ce8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-06-15 Xan Lopez <xlopez at igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Does not compile with -DGSEAL_ENABLE
+ https://bugs.webkit.org/show_bug.cgi?id=37851
+
+ Add GSEAL_ENABLE flag when doing debug builds.
+
+ * GNUmakefile.am:
+
2010-05-19 Dan Winship <danw at gnome.org>
Reviewed by Xan Lopez.
diff --git a/GNUmakefile.am b/GNUmakefile.am
index 6d3a9cb..ff707d7 100644
--- a/GNUmakefile.am
+++ b/GNUmakefile.am
@@ -284,14 +284,14 @@ endif
if !ENABLE_DEBUG
global_cppflags += -DNDEBUG
global_cflags += $(SYMBOL_VISIBILITY)
-
else
webcoregtk_cppflags += \
-DG_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
- -DPANGO_DISABLE_DEPRECATED
+ -DPANGO_DISABLE_DEPRECATED \
+ -DGSEAL_ENABLE
# Might be useful in the future
# -DGDK_MULTIHEAD_SAFE \
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ae28068..ed1f339 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,33 @@
+2010-06-15 Xan Lopez <xlopez at igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Does not compile with -DGSEAL_ENABLE
+ https://bugs.webkit.org/show_bug.cgi?id=37851
+
+ Fix compilation with GSEAL_ENABLE.
+
+ * platform/gtk/GtkVersioning.h:
+ * platform/gtk/PlatformScreenGtk.cpp:
+ (WebCore::screenDepth):
+ (WebCore::screenDepthPerComponent):
+ * platform/gtk/PopupMenuGtk.cpp:
+ (WebCore::PopupMenu::show):
+ * platform/gtk/ScrollbarGtk.cpp:
+ (ScrollbarGtk::detachAdjustment):
+ (ScrollbarGtk::updateThumbPosition):
+ (ScrollbarGtk::updateThumbProportion):
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::initXEvent):
+ (WebCore::PluginView::platformGetValue):
+ (WebCore::PluginView::platformStart):
+ * plugins/gtk/gtk2xtbin.c:
+ (gtk_xtbin_realize):
+ (gtk_xtbin_new):
+ (gtk_xtbin_set_position):
+ (gtk_xtbin_unrealize):
+
2010-06-07 Martin Robinson <mrobinson at igalia.com>
Reviewed by Xan Lopez.
diff --git a/WebCore/platform/gtk/GtkVersioning.h b/WebCore/platform/gtk/GtkVersioning.h
index cdd679c..24970d2 100644
--- a/WebCore/platform/gtk/GtkVersioning.h
+++ b/WebCore/platform/gtk/GtkVersioning.h
@@ -23,6 +23,17 @@
#include <gtk/gtk.h>
// Macros to avoid deprecation checking churn
+#if !GTK_CHECK_VERSION(2, 21, 2)
+#define gdk_visual_get_depth(visual) (visual)->depth
+#define gdk_visual_get_bits_per_rgb(visual) (visual)->bits_per_rgb
+#define gdk_drag_context_get_selected_action(context) (context)->action
+#endif // GTK_CHECK_VERSION(2, 21, 2)
+
+#if !GTK_CHECK_VERSION(2, 20, 0)
+#define gtk_widget_set_realized(widget, FALSE) GTK_WIDGET_UNSET_FLAGS((widget), GTK_REALIZED)
+#define gtk_widget_set_realized(widget, TRUE) GTK_WIDGET_SET_FLAGS((widget), GTK_REALIZED)
+#endif // GTK_CHECK_VERSION(2, 20, 0)
+
#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)
@@ -31,8 +42,18 @@
#define gtk_widget_is_sensitive(widget) GTK_WIDGET_IS_SENSITIVE(widget)
#endif // GTK_CHECK_VERSION(2, 19, 0)
+#if !GTK_CHECK_VERSION(2, 18, 0)
+#define gtk_widget_set_visible(widget, FALSE) GTK_WIDGET_UNSET_FLAGS((widget), GTK_VISIBLE)
+#define gtk_widget_set_visible(widget, TRUE) GTK_WIDGET_SET_FLAGS((widget), GTK_VISIBLE)
+#define gtk_widget_set_window(widget, new_window) (widget)->window = (new_window)
+#define gtk_widget_set_can_focus(widget, FALSE) GTK_WIDGET_UNSET_FLAGS((widget), GTK_CAN_FOCUS)
+#define gtk_widget_set_can_focus(widget, TRUE) GTK_WIDGET_SET_FLAGS((widget), GTK_CAN_FOCUS)
+#endif // GTK_CHECK_VERSION(2, 18, 0)
+
#if !GTK_CHECK_VERSION(2, 14, 0)
#define gtk_widget_get_window(widget) (widget)->window
-#endif
+#define gtk_adjustment_get_value(adj) (adj)->value
+#define gtk_dialog_get_content_area(dialog) (dialog)->vbox
+#endif // GTK_CHECK_VERSION(2, 14, 0)
#endif // GtkVersioning_h
diff --git a/WebCore/platform/gtk/PlatformScreenGtk.cpp b/WebCore/platform/gtk/PlatformScreenGtk.cpp
index 0ab00a1..6ace728 100644
--- a/WebCore/platform/gtk/PlatformScreenGtk.cpp
+++ b/WebCore/platform/gtk/PlatformScreenGtk.cpp
@@ -72,7 +72,7 @@ int screenDepth(Widget* widget)
GdkVisual* visual = getVisual(widget);
if (!visual)
return 24;
- return visual->depth;
+ return gdk_visual_get_depth(visual);
}
int screenDepthPerComponent(Widget* widget)
@@ -81,7 +81,7 @@ int screenDepthPerComponent(Widget* widget)
if (!visual)
return 8;
- return visual->bits_per_rgb;
+ return gdk_visual_get_bits_per_rgb(visual);
}
bool screenIsMonochrome(Widget* widget)
diff --git a/WebCore/platform/gtk/PopupMenuGtk.cpp b/WebCore/platform/gtk/PopupMenuGtk.cpp
index 865675f..d5b67f2 100644
--- a/WebCore/platform/gtk/PopupMenuGtk.cpp
+++ b/WebCore/platform/gtk/PopupMenuGtk.cpp
@@ -89,22 +89,24 @@ void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
gtk_widget_size_request(GTK_WIDGET(m_popup.get()), &requisition);
gtk_widget_set_size_request(GTK_WIDGET(m_popup.get()), std::max(rect.width(), requisition.width), -1);
- GList* children = GTK_MENU_SHELL(m_popup.get())->children;
+ GList* children = gtk_container_get_children(GTK_CONTAINER(m_popup.get()));
+ GList* p = children;
if (size)
for (int i = 0; i < size; i++) {
if (i > index)
break;
- GtkWidget* item = reinterpret_cast<GtkWidget*>(children->data);
+ GtkWidget* item = reinterpret_cast<GtkWidget*>(p->data);
GtkRequisition itemRequisition;
gtk_widget_get_child_requisition(item, &itemRequisition);
m_menuPosition.setY(m_menuPosition.y() - itemRequisition.height);
- children = g_list_next(children);
+ p = g_list_next(p);
} else
// Center vertically the empty popup in the combo box area
m_menuPosition.setY(m_menuPosition.y() - rect.height() / 2);
+ g_list_free(children);
gtk_menu_popup(m_popup.get(), 0, 0, reinterpret_cast<GtkMenuPositionFunc>(menuPositionFunction), this, 0, gtk_get_current_event_time());
}
diff --git a/WebCore/platform/gtk/ScrollbarGtk.cpp b/WebCore/platform/gtk/ScrollbarGtk.cpp
index 00cbcf0..e7ac337 100644
--- a/WebCore/platform/gtk/ScrollbarGtk.cpp
+++ b/WebCore/platform/gtk/ScrollbarGtk.cpp
@@ -119,11 +119,15 @@ void ScrollbarGtk::detachAdjustment()
// For the case where we only operate on the GtkAdjustment it is best to
// reset the values so that the surrounding scrollbar gets updated, or
// e.g. for a GtkScrolledWindow the scrollbar gets hidden.
+#if GTK_CHECK_VERSION(2, 14, 0)
+ gtk_adjustment_configure(m_adjustment, 0, 0, 0, 0, 0, 0);
+#else
m_adjustment->lower = 0;
m_adjustment->upper = 0;
m_adjustment->value = 0;
gtk_adjustment_changed(m_adjustment);
gtk_adjustment_value_changed(m_adjustment);
+#endif
g_object_unref(m_adjustment);
m_adjustment = 0;
}
@@ -157,19 +161,33 @@ void ScrollbarGtk::frameRectsChanged()
void ScrollbarGtk::updateThumbPosition()
{
- if (m_adjustment->value != m_currentPos) {
+ if (gtk_adjustment_get_value(m_adjustment) != m_currentPos) {
+#if GTK_CHECK_VERSION(2, 14, 0)
+ gtk_adjustment_set_value(m_adjustment, m_currentPos);
+#else
m_adjustment->value = m_currentPos;
gtk_adjustment_value_changed(m_adjustment);
+#endif
}
}
void ScrollbarGtk::updateThumbProportion()
{
+#if GTK_CHECK_VERSION(2, 14, 0)
+ gtk_adjustment_configure(m_adjustment,
+ gtk_adjustment_get_value(m_adjustment),
+ gtk_adjustment_get_lower(m_adjustment),
+ m_totalSize,
+ m_lineStep,
+ m_pageStep,
+ m_visibleSize);
+#else
m_adjustment->step_increment = m_lineStep;
m_adjustment->page_increment = m_pageStep;
m_adjustment->page_size = m_visibleSize;
m_adjustment->upper = m_totalSize;
gtk_adjustment_changed(m_adjustment);
+#endif
}
void ScrollbarGtk::setFrameRect(const IntRect& rect)
diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp
index 8de63e0..1edec11 100644
--- a/WebCore/plugins/gtk/PluginViewGtk.cpp
+++ b/WebCore/plugins/gtk/PluginViewGtk.cpp
@@ -39,6 +39,7 @@
#include "Frame.h"
#include "FrameView.h"
#include "GraphicsContext.h"
+#include "GtkVersioning.h"
#include "HTMLNames.h"
#include "HTMLPlugInElement.h"
#include "HostWindow.h"
@@ -214,7 +215,7 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
GdkDrawable* gdkBackingStore = 0;
gint xoff = 0, yoff = 0;
- gdk_window_get_internal_paint_info(widget->window, &gdkBackingStore, &xoff, &yoff);
+ gdk_window_get_internal_paint_info(gtk_widget_get_window(widget), &gdkBackingStore, &xoff, &yoff);
GC gc = XDefaultGC(GDK_DISPLAY(), gdk_screen_get_number(gdk_screen_get_default()));
if (gdkBackingStore) {
@@ -348,7 +349,7 @@ void PluginView::initXEvent(XEvent* xEvent)
// but does in the case of KeyPress, KeyRelease, ButtonPress, ButtonRelease, and MotionNotify
// events; thus, this is right:
GtkWidget* widget = m_parentFrame->view()->hostWindow()->platformPageClient();
- xEvent->xany.window = widget ? GDK_WINDOW_XWINDOW(widget->window) : 0;
+ xEvent->xany.window = widget ? GDK_WINDOW_XWINDOW(gtk_widget_get_window(widget)) : 0;
}
static void setXButtonEventSpecificFields(XEvent* xEvent, MouseEvent* event, const IntPoint& postZoomPos, Frame* parentFrame)
@@ -656,11 +657,13 @@ bool PluginView::platformGetValue(NPNVariable variable, void* value, NPError* re
case NPNVnetscapeWindow: {
#if defined(XP_UNIX)
void* w = reinterpret_cast<void*>(value);
- *((XID *)w) = GDK_WINDOW_XWINDOW(m_parentFrame->view()->hostWindow()->platformPageClient()->window);
+ GtkWidget* widget = m_parentFrame->view()->hostWindow()->platformPageClient();
+ *((XID *)w) = GDK_WINDOW_XWINDOW(gtk_widget_get_window(widget));
#endif
#ifdef GDK_WINDOWING_WIN32
HGDIOBJ* w = reinterpret_cast<HGDIOBJ*>(value);
- *w = GDK_WINDOW_HWND(m_parentFrame->view()->hostWindow()->platformPageClient()->window);
+ GtkWidget* widget = m_parentFrame->view()->hostWindow()->platformPageClient();
+ *w = GDK_WINDOW_HWND(gtk_widget_get_window(widget));
#endif
*result = NPERR_NO_ERROR;
return true;
@@ -810,7 +813,7 @@ bool PluginView::platformStart()
g_signal_connect(platformPluginWidget(), "plug-added", G_CALLBACK(plugAddedCallback), this);
g_signal_connect(platformPluginWidget(), "plug-removed", G_CALLBACK(plugRemovedCallback), NULL);
} else
- setPlatformWidget(gtk_xtbin_new(pageClient->window, 0));
+ setPlatformWidget(gtk_xtbin_new(gtk_widget_get_window(pageClient), 0));
#else
setPlatformWidget(gtk_socket_new());
gtk_container_add(GTK_CONTAINER(pageClient), platformPluginWidget());
@@ -831,12 +834,14 @@ bool PluginView::platformStart()
m_npWindow.type = NPWindowTypeWindow;
#if defined(XP_UNIX)
if (m_needsXEmbed) {
- gtk_widget_realize(platformPluginWidget());
+ GtkWidget* widget = platformPluginWidget();
+ gtk_widget_realize(widget);
m_npWindow.window = (void*)gtk_socket_get_id(GTK_SOCKET(platformPluginWidget()));
- ws->display = GDK_WINDOW_XDISPLAY(platformPluginWidget()->window);
- ws->visual = GDK_VISUAL_XVISUAL(gdk_drawable_get_visual(GDK_DRAWABLE(platformPluginWidget()->window)));
- ws->depth = gdk_drawable_get_visual(GDK_DRAWABLE(platformPluginWidget()->window))->depth;
- ws->colormap = GDK_COLORMAP_XCOLORMAP(gdk_drawable_get_colormap(GDK_DRAWABLE(platformPluginWidget()->window)));
+ GdkWindow* window = gtk_widget_get_window(widget);
+ ws->display = GDK_WINDOW_XDISPLAY(window);
+ ws->visual = GDK_VISUAL_XVISUAL(gdk_drawable_get_visual(GDK_DRAWABLE(window)));
+ ws->depth = gdk_visual_get_depth(gdk_drawable_get_visual(GDK_DRAWABLE(window)));
+ ws->colormap = GDK_COLORMAP_XCOLORMAP(gdk_drawable_get_colormap(GDK_DRAWABLE(window)));
} else {
m_npWindow.window = (void*)GTK_XTBIN(platformPluginWidget())->xtwindow;
ws->display = GTK_XTBIN(platformPluginWidget())->xtdisplay;
@@ -846,7 +851,7 @@ bool PluginView::platformStart()
}
XFlush (ws->display);
#elif defined(GDK_WINDOWING_WIN32)
- m_npWindow.window = (void*)GDK_WINDOW_HWND(platformPluginWidget()->window);
+ m_npWindow.window = (void*)GDK_WINDOW_HWND(gtk_widget_get_window(platformPluginWidget()));
#endif
} else {
m_npWindow.type = NPWindowTypeDrawable;
@@ -856,14 +861,14 @@ bool PluginView::platformStart()
GdkScreen* gscreen = gdk_screen_get_default();
GdkVisual* gvisual = gdk_screen_get_system_visual(gscreen);
- if (gvisual->depth == 32 || !m_plugin->quirks().contains(PluginQuirkRequiresDefaultScreenDepth)) {
+ if (gdk_visual_get_depth(gvisual) == 32 || !m_plugin->quirks().contains(PluginQuirkRequiresDefaultScreenDepth)) {
getVisualAndColormap(32, &m_visual, &m_colormap);
ws->depth = 32;
}
if (!m_visual) {
- getVisualAndColormap(gvisual->depth, &m_visual, &m_colormap);
- ws->depth = gvisual->depth;
+ getVisualAndColormap(gdk_visual_get_depth(gvisual), &m_visual, &m_colormap);
+ ws->depth = gdk_visual_get_depth(gvisual);
}
ws->display = GDK_DISPLAY();
diff --git a/WebCore/plugins/gtk/gtk2xtbin.c b/WebCore/plugins/gtk/gtk2xtbin.c
index fad66fe..bf7839c 100644
--- a/WebCore/plugins/gtk/gtk2xtbin.c
+++ b/WebCore/plugins/gtk/gtk2xtbin.c
@@ -270,6 +270,9 @@ gtk_xtbin_realize (GtkWidget *widget)
{
GtkXtBin *xtbin;
GtkAllocation allocation = { 0, 0, 200, 200 };
+#if GTK_CHECK_VERSION(2, 18, 0)
+ GtkAllocation widget_allocation;
+#endif
gint x, y, w, h, d; /* geometry of window */
#ifdef DEBUG_XTBIN
@@ -290,8 +293,14 @@ gtk_xtbin_realize (GtkWidget *widget)
printf("initial allocation %d %d %d %d\n", x, y, w, h);
#endif
+#if GTK_CHECK_VERSION(2, 18, 0)
+ gtk_widget_get_allocation(widget, &widget_allocation);
+ xtbin->width = widget_allocation.width;
+ xtbin->height = widget_allocation.height;
+#else
xtbin->width = widget->allocation.width;
xtbin->height = widget->allocation.height;
+#endif
/* use GtkSocket's realize */
(*GTK_WIDGET_CLASS(parent_class)->realize)(widget);
@@ -332,7 +341,7 @@ gtk_xtbin_new (GdkWindow *parent_window, String * f)
xt_client_init(&(xtbin->xtclient),
GDK_VISUAL_XVISUAL(gdk_rgb_get_visual()),
GDK_COLORMAP_XCOLORMAP(gdk_rgb_get_colormap()),
- gdk_rgb_get_visual()->depth);
+ gdk_visual_get_depth(gdk_rgb_get_visual()));
if (!xtbin->xtclient.xtdisplay) {
/* If XtOpenDisplay failed, we can't go any further.
@@ -402,8 +411,8 @@ gtk_xtbin_set_position (GtkXtBin *xtbin,
xtbin->x = x;
xtbin->y = y;
- if (gtk_widget_get_realized (xtbin))
- gdk_window_move (GTK_WIDGET (xtbin)->window, x, y);
+ if (gtk_widget_get_realized (GTK_WIDGET(xtbin)))
+ gdk_window_move (gtk_widget_get_window(GTK_WIDGET (xtbin)), x, y);
}
void
@@ -456,7 +465,7 @@ gtk_xtbin_unrealize (GtkWidget *object)
xtbin = GTK_XTBIN(object);
widget = GTK_WIDGET(object);
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_VISIBLE);
+ gtk_widget_set_visible(widget, FALSE);
if (gtk_widget_get_realized (widget)) {
xt_client_unrealize(&(xtbin->xtclient));
}
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 0fc742a..d30dafa 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,23 @@
+2010-06-15 Xan Lopez <xlopez at igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Does not compile with -DGSEAL_ENABLE
+ https://bugs.webkit.org/show_bug.cgi?id=37851
+
+ Fix compilation with GSEAL_ENABLE.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::pageRect):
+ (WebKit::ChromeClient::contentsSizeChanged):
+ * tests/testdomnode.c:
+ (test_dom_node_insertion):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_realize):
+ (webkit_web_view_script_dialog):
+ (webkit_web_view_drag_end):
+ (webkit_web_view_init):
+
2010-06-07 Martin Robinson <mrobinson at igalia.com>
Reviewed by Xan Lopez.
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index aa5ce1d..910b126 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -103,7 +103,12 @@ void ChromeClient::setWindowRect(const FloatRect& rect)
FloatRect ChromeClient::pageRect()
{
+ GtkAllocation allocation;
+#if GTK_CHECK_VERSION(2, 18, 0)
+ gtk_widget_get_allocation(GTK_WIDGET(m_webView), &allocation);
+#else
GtkAllocation allocation = GTK_WIDGET(m_webView)->allocation;
+#endif
return IntRect(allocation.x, allocation.y, allocation.width, allocation.height);
}
@@ -424,9 +429,15 @@ 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);
+ GtkRequisition requisition;
+#if GTK_CHECK_VERSION(2, 20, 0)
+ gtk_widget_get_requisition(widget, &requisition);
+#else
+ requisition = widget->requisition;
+#endif
if (gtk_widget_get_realized(widget)
- && (widget->requisition.height != size.height())
- || (widget->requisition.width != size.width()))
+ && (requisition.height != size.height())
+ || (requisition.width != size.width()))
gtk_widget_queue_resize_no_redraw(widget);
}
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 3fd2563..0db32d8 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -797,17 +797,24 @@ static gboolean webkit_web_view_focus_out_event(GtkWidget* widget, GdkEventFocus
static void webkit_web_view_realize(GtkWidget* widget)
{
- GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED);
+ gtk_widget_set_realized(widget, TRUE);
+
+ GtkAllocation allocation;
+#if GTK_CHECK_VERSION(2, 18, 0)
+ gtk_widget_get_allocation(widget, &allocation);
+#else
+ allocation = widget->allocation;
+#endif
GdkWindowAttr attributes;
attributes.window_type = GDK_WINDOW_CHILD;
- attributes.x = widget->allocation.x;
- attributes.y = widget->allocation.y;
- attributes.width = widget->allocation.width;
- attributes.height = widget->allocation.height;
+ attributes.x = allocation.x;
+ attributes.y = allocation.y;
+ attributes.width = allocation.width;
+ attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
- attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
+ attributes.visual = gtk_widget_get_visual(widget);
+ attributes.colormap = gtk_widget_get_colormap(widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK
| GDK_EXPOSURE_MASK
| GDK_BUTTON_PRESS_MASK
@@ -821,15 +828,20 @@ static void webkit_web_view_realize(GtkWidget* widget)
| GDK_BUTTON3_MOTION_MASK;
gint attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
- widget->window = gdk_window_new(gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
- gdk_window_set_user_data(widget->window, widget);
+ GdkWindow* window = gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, attributes_mask);
+ gtk_widget_set_window(widget, window);
+ gdk_window_set_user_data(window, widget);
- widget->style = gtk_style_attach(widget->style, widget->window);
- gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL);
+#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);
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
WebKitWebViewPrivate* priv = webView->priv;
- gtk_im_context_set_client_window(priv->imContext, widget->window);
+ gtk_im_context_set_client_window(priv->imContext, window);
}
static void webkit_web_view_set_scroll_adjustments(WebKitWebView* webView, GtkAdjustment* hadj, GtkAdjustment* vadj)
@@ -968,7 +980,7 @@ static gboolean webkit_web_view_script_dialog(WebKitWebView* webView, WebKitWebF
if (type == WEBKIT_SCRIPT_DIALOG_PROMPT) {
entry = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(entry), defaultValue);
- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), entry);
+ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), entry);
gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE);
gtk_widget_show(entry);
}
@@ -1306,7 +1318,7 @@ static void webkit_web_view_drag_end(GtkWidget* widget, GdkDragContext* context)
event->button.state = modifiers;
PlatformMouseEvent platformEvent(&event->button);
- frame->eventHandler()->dragSourceEndedAt(platformEvent, gdkDragActionToDragOperation(context->action));
+ frame->eventHandler()->dragSourceEndedAt(platformEvent, gdkDragActionToDragOperation(gdk_drag_context_get_selected_action(context)));
gdk_event_free(event);
}
@@ -2859,7 +2871,7 @@ static void webkit_web_view_init(WebKitWebView* webView)
g_object_ref_sink(priv->horizontalAdjustment);
g_object_ref_sink(priv->verticalAdjustment);
- GTK_WIDGET_SET_FLAGS(webView, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus(GTK_WIDGET(webView), TRUE);
priv->mainFrame = WEBKIT_WEB_FRAME(webkit_web_frame_new(webView));
priv->lastPopupXPosition = priv->lastPopupYPosition = -1;
priv->editable = false;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list