Bug 88060 - [Gtk] Assertions in gtk_widget_draw when acquiring pixel output
Summary: [Gtk] Assertions in gtk_widget_draw when acquiring pixel output
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-01 01:09 PDT by Zan Dobersek
Modified: 2012-06-07 06:21 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.56 KB, patch)
2012-06-01 01:30 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (1.56 KB, patch)
2012-06-07 00:21 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2012-06-01 01:09:17 PDT
Assertions are occurring in createBitmapContextFromWebView in PixelDumpSupportGtk.cpp when calling gtk_widget_draw:

gtk_widget_draw: assertion `!widget->priv->alloc_needed' failed

To avoid this gtk_widget_size_allocate should be called before gtk_widget_draw to allocate appropriate size of the container whose pixel content we're acquiring.
Comment 1 Zan Dobersek 2012-06-01 01:30:22 PDT
Created attachment 145240 [details]
Patch
Comment 2 Martin Robinson 2012-06-01 09:14:50 PDT
Comment on attachment 145240 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=145240&action=review

> Tools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp:64
> +    GtkAllocation allocation;
> +    allocation.x = allocation.y = 0;
> +    allocation.width = width;
> +    allocation.height = height;
> +    gtk_widget_size_allocate(viewContainer, &allocation);
> +

If the allocation is wrong, won't the render tree output be wrong as well?
Comment 3 Zan Dobersek 2012-06-06 12:18:50 PDT
Sigh ... this doesn't occur anymore, and I have no idea why. Resolving as invalid for now.
Comment 4 Zan Dobersek 2012-06-07 00:19:18 PDT
(In reply to comment #3)
> Sigh ... this doesn't occur anymore, and I have no idea why. Resolving as invalid for now.

Spotted it again, got a proper fix as well.
Comment 5 Zan Dobersek 2012-06-07 00:21:17 PDT
Created attachment 146219 [details]
Patch
Comment 6 WebKit Review Bot 2012-06-07 06:21:26 PDT
Comment on attachment 146219 [details]
Patch

Clearing flags on attachment: 146219

Committed r119715: <http://trac.webkit.org/changeset/119715>
Comment 7 WebKit Review Bot 2012-06-07 06:21:31 PDT
All reviewed patches have been landed.  Closing bug.