[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
xan at webkit.org
xan at webkit.org
Wed Dec 22 12:28:36 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 6d2c14cdd50f288c9d16064cfe4e3dacf63fda66
Author: xan at webkit.org <xan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 24 14:13:43 2010 +0000
2010-08-24 Xan Lopez <xlopez at igalia.com>
Reviewed by Gustavo Noronha.
Update code to compile with latest GTK+ 3.x.
* platform/gtk/gtk2drawing.c:
(TSOffsetStyleGCs):
(moz_gtk_entry_paint):
* plugins/gtk/gtk2xtbin.c:
(gtk_xtbin_new):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3f7676c..86f6776 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-24 Xan Lopez <xlopez at igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Update code to compile with latest GTK+ 3.x.
+
+ * platform/gtk/gtk2drawing.c:
+ (TSOffsetStyleGCs):
+ (moz_gtk_entry_paint):
+ * plugins/gtk/gtk2xtbin.c:
+ (gtk_xtbin_new):
+
2010-08-24 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
diff --git a/WebCore/platform/gtk/gtk2drawing.c b/WebCore/platform/gtk/gtk2drawing.c
index 306afb4..349bde0 100644
--- a/WebCore/platform/gtk/gtk2drawing.c
+++ b/WebCore/platform/gtk/gtk2drawing.c
@@ -732,6 +732,7 @@ ConvertGtkState(GtkWidgetState* state)
return GTK_STATE_NORMAL;
}
+#ifdef GTK_API_VERSION_2
static gint
TSOffsetStyleGCArray(GdkGC** gcs, gint xorigin, gint yorigin)
{
@@ -741,10 +742,12 @@ TSOffsetStyleGCArray(GdkGC** gcs, gint xorigin, gint yorigin)
gdk_gc_set_ts_origin(gcs[i], xorigin, yorigin);
return MOZ_GTK_SUCCESS;
}
+#endif
static gint
TSOffsetStyleGCs(GtkStyle* style, gint xorigin, gint yorigin)
{
+#ifdef GTK_API_VERSION_2
TSOffsetStyleGCArray(style->fg_gc, xorigin, yorigin);
TSOffsetStyleGCArray(style->bg_gc, xorigin, yorigin);
TSOffsetStyleGCArray(style->light_gc, xorigin, yorigin);
@@ -754,6 +757,7 @@ TSOffsetStyleGCs(GtkStyle* style, gint xorigin, gint yorigin)
TSOffsetStyleGCArray(style->base_gc, xorigin, yorigin);
gdk_gc_set_ts_origin(style->black_gc, xorigin, yorigin);
gdk_gc_set_ts_origin(style->white_gc, xorigin, yorigin);
+#endif
return MOZ_GTK_SUCCESS;
}
@@ -1578,8 +1582,17 @@ moz_gtk_entry_paint(GdkDrawable* drawable, GdkRectangle* rect,
if (theme_honors_transparency) {
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
} else {
+#ifndef GTK_API_VERSION_2
+ cairo_t* cr = gdk_cairo_create(drawable);
+ gdk_cairo_set_source_color(cr, (const GdkColor*)&style->base[bg_state]);
+ cairo_pattern_set_extend (cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
+ gdk_cairo_rectangle(cr, cliprect);
+ cairo_fill(cr);
+ cairo_destroy(cr);
+#else
gdk_draw_rectangle(drawable, style->base_gc[bg_state], TRUE,
cliprect->x, cliprect->y, cliprect->width, cliprect->height);
+#endif
g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(FALSE));
}
diff --git a/WebCore/plugins/gtk/gtk2xtbin.c b/WebCore/plugins/gtk/gtk2xtbin.c
index b7fd3f0..a0808d9 100644
--- a/WebCore/plugins/gtk/gtk2xtbin.c
+++ b/WebCore/plugins/gtk/gtk2xtbin.c
@@ -326,6 +326,8 @@ gtk_xtbin_new (GdkWindow *parent_window, String * f)
{
GtkXtBin *xtbin;
gpointer user_data;
+ GdkVisual* visual;
+ GdkColormap* colormap;
assert(parent_window != NULL);
xtbin = g_object_new (GTK_TYPE_XTBIN, NULL);
@@ -339,10 +341,13 @@ gtk_xtbin_new (GdkWindow *parent_window, String * f)
/* Initialize the Xt toolkit */
xtbin->parent_window = parent_window;
+ visual = gtk_widget_get_default_visual();
+ colormap = gtk_widget_get_default_colormap();
+
xt_client_init(&(xtbin->xtclient),
- GDK_VISUAL_XVISUAL(gdk_rgb_get_visual()),
- GDK_COLORMAP_XCOLORMAP(gdk_rgb_get_colormap()),
- gdk_visual_get_depth(gdk_rgb_get_visual()));
+ GDK_VISUAL_XVISUAL(visual),
+ GDK_COLORMAP_XCOLORMAP(colormap),
+ gdk_visual_get_depth(visual));
if (!xtbin->xtclient.xtdisplay) {
/* If XtOpenDisplay failed, we can't go any further.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list