Commit 3ce973c3 authored by mrobinson@webkit.org's avatar mrobinson@webkit.org
Browse files

2011-01-26 Martin Robinson <mrobinson@igalia.com>

        Reviewed by Xan Lopez.

        [GTK] Pixel dumps do not include scrollbars in output images
        https://bugs.webkit.org/show_bug.cgi?id=53216

        Update expected results which should show scrollbars.

        * platform/gtk/css2.1/t0803-c5502-mrgn-r-02-c-expected.checksum:
        * platform/gtk/css2.1/t0803-c5502-mrgn-r-02-c-expected.png:
        * platform/gtk/css2.1/t0803-c5505-mrgn-02-c-expected.checksum:
        * platform/gtk/css2.1/t0803-c5505-mrgn-02-c-expected.png:
        * platform/gtk/css2.1/t080301-c411-vt-mrgn-00-b-expected.checksum:
        * platform/gtk/css2.1/t080301-c411-vt-mrgn-00-b-expected.png:
        * platform/gtk/css2.1/t0905-c5525-fltclr-00-c-ag-expected.checksum:
        * platform/gtk/css2.1/t0905-c5525-fltclr-00-c-ag-expected.png:
        * platform/gtk/css2.1/t0905-c5525-fltmrgn-00-c-ag-expected.checksum:
        * platform/gtk/css2.1/t0905-c5525-fltmrgn-00-c-ag-expected.png:
        * platform/gtk/css2.1/t0905-c5525-fltwidth-00-c-g-expected.checksum:
        * platform/gtk/css2.1/t0905-c5525-fltwidth-00-c-g-expected.png:
        * platform/gtk/css2.1/t0905-c5526-fltclr-00-c-ag-expected.checksum:
        * platform/gtk/css2.1/t0905-c5526-fltclr-00-c-ag-expected.png:
        * platform/gtk/css2.1/t1002-c5523-width-02-b-g-expected.checksum:
        * platform/gtk/css2.1/t1002-c5523-width-02-b-g-expected.png:
        * platform/gtk/css2.1/t1202-counters-08-b-expected.checksum:
        * platform/gtk/css2.1/t1202-counters-08-b-expected.png:
        * platform/gtk/css2.1/t1202-counters-09-b-expected.checksum:
        * platform/gtk/css2.1/t1202-counters-09-b-expected.png:
        * platform/gtk/css2.1/t140201-c535-bg-fixd-00-b-g-expected.checksum:
        * platform/gtk/css2.1/t140201-c535-bg-fixd-00-b-g-expected.png:
        * platform/gtk/css2.1/t140201-c537-bgfxps-00-c-ag-expected.checksum:
        * platform/gtk/css2.1/t140201-c537-bgfxps-00-c-ag-expected.png:
        * platform/gtk/css2.1/t1508-c527-font-07-b-expected.checksum:
        * platform/gtk/css2.1/t1508-c527-font-07-b-expected.png:
2011-01-26  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Xan Lopez.

        [GTK] Pixel dumps do not include scrollbars in output images
        https://bugs.webkit.org/show_bug.cgi?id=53216

        Show scrollbars in pixel dumps. This will fix pixel dumps for tests
        that have scrollbars.

        * DumpRenderTree/gtk/PixelDumpSupportGtk.cpp:
        (createBitmapContextFromWebView): Take the snapshot of the containing GtkScrolledWindow
        instead of the web view itself.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 132c61da
0437b4e721c382a1ee4f6fc2f045d17d
\ No newline at end of file
abff0719a55abf1b6f82d51f3b41df3a
\ No newline at end of file
67e0400371612bcff494d4a84b0ebe5d
\ No newline at end of file
66729075eddffb14860a4af6fa1f3a84
\ No newline at end of file
7dc2412f7632b0d769e461bea805557c
\ No newline at end of file
6014c0ceda6097265b3b711f41a1ed12
\ No newline at end of file
2011-01-26 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] Pixel dumps do not include scrollbars in output images
https://bugs.webkit.org/show_bug.cgi?id=53216
Show scrollbars in pixel dumps. This will fix pixel dumps for tests
that have scrollbars.
* DumpRenderTree/gtk/PixelDumpSupportGtk.cpp:
(createBitmapContextFromWebView): Take the snapshot of the containing GtkScrolledWindow
instead of the web view itself.
2011-01-26 Dirk Pranke <dpranke@chromium.org>
 
Reviewed by Mihai Parparita.
......@@ -37,13 +37,14 @@
PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool, bool, bool, bool)
{
WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
GtkWidget* viewContainer = gtk_widget_get_parent(GTK_WIDGET(view));
gint width, height;
#ifdef GTK_API_VERSION_2
GdkPixmap* pixmap = gtk_widget_get_snapshot(GTK_WIDGET(view), 0);
GdkPixmap* pixmap = gtk_widget_get_snapshot(viewContainer, 0);
gdk_pixmap_get_size(pixmap, &width, &height);
#else
width = gtk_widget_get_allocated_width(GTK_WIDGET(view));
height = gtk_widget_get_allocated_height(GTK_WIDGET(view));
width = gtk_widget_get_allocated_width(viewContainer);
height = gtk_widget_get_allocated_height(viewContainer);
#endif
cairo_surface_t* imageSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
......@@ -53,7 +54,7 @@ PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool, bool, bool, bool)
cairo_paint(context);
g_object_unref(pixmap);
#else
gtk_widget_draw(GTK_WIDGET(view), context);
gtk_widget_draw(viewContainer, context);
#endif
return BitmapContext::createByAdoptingBitmapAndContext(0, context);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment