[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:22:32 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 003765f7431fc33a0b8277e2321d9ea3f1363602
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 7 11:58:21 2010 +0000

    2010-10-07  Carlos Garcia Campos  <cgarcia at igalia.com>
    
            Reviewed by Xan Lopez.
    
            [GTK] Use gtk_widget_draw() instead of gtk_widget_get_snapshot() in PixelDumpSupportGtk when building with gtk3
            https://bugs.webkit.org/show_bug.cgi?id=47332
    
            * DumpRenderTree/gtk/PixelDumpSupportGtk.cpp:
            (createBitmapContextFromWebView):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69294 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ebcdf48..db0cba0 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-07  Carlos Garcia Campos  <cgarcia at igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] Use gtk_widget_draw() instead of gtk_widget_get_snapshot() in PixelDumpSupportGtk when building with gtk3
+        https://bugs.webkit.org/show_bug.cgi?id=47332
+
+        * DumpRenderTree/gtk/PixelDumpSupportGtk.cpp:
+        (createBitmapContextFromWebView):
+
 2010-10-06  Chris Guillory  <chris.guillory at google.com>
 
         Reviewed by Chris Fleizach.
diff --git a/WebKitTools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp b/WebKitTools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp
index f0f461c..4073403 100644
--- a/WebKitTools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp
@@ -36,15 +36,24 @@
 PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool, bool, bool, bool)
 {
     WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
-    GdkPixmap* pixmap = gtk_widget_get_snapshot(GTK_WIDGET(view), 0);
     gint width, height;
+#ifdef GTK_API_VERSION_2
+    GdkPixmap* pixmap = gtk_widget_get_snapshot(GTK_WIDGET(view), 0);
     gdk_drawable_get_size(GDK_DRAWABLE(pixmap), &width, &height);
+#else
+    width = gtk_widget_get_allocated_width(GTK_WIDGET(view));
+    height = gtk_widget_get_allocated_height(GTK_WIDGET(view));
+#endif
 
     cairo_surface_t* imageSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
     cairo_t* context = cairo_create(imageSurface);
+#ifdef GTK_API_VERSION_2
     gdk_cairo_set_source_pixmap(context, pixmap, 0, 0);
     cairo_paint(context);
     g_object_unref(pixmap);
+#else
+    gtk_widget_draw(GTK_WIDGET(view), context);
+#endif
 
     return BitmapContext::createByAdoptingBitmapAndContext(0, context);
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list