Bug 72805

Summary: [GTK] gtk_widget_size_allocate for plugin widgets should happen in the WebView size-allocate method
Product: WebKit Reporter: Martin Robinson <mrobinson>
Component: WebKitGTKAssignee: Martin Robinson <mrobinson>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, webkit.review.bot, zuh
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 68757    
Attachments:
Description Flags
Patch none

Description Martin Robinson 2011-11-19 11:49:36 PST
Currently gtk_widget_size_allocate is called while rendering the WebView. Ideally this would happen in the size-allocate method of the WebView. This will help illiminate artifacts around plugins will scrolling.
Comment 1 Martin Robinson 2011-11-19 20:23:56 PST
Created attachment 115974 [details]
Patch
Comment 2 Carlos Garcia Campos 2011-11-30 06:20:54 PST
Comment on attachment 115974 [details]
Patch

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

> Source/WebCore/plugins/gtk/PluginViewGtk.cpp:595
> +    g_object_set_data(G_OBJECT(widget), "delayed-allocation", &m_delayedAllocation);

We might use a HashMap instead of a HashSet and store the allocation as the value instead of using g_object_set_data(), see the new windowed plugins patch

> Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:571
> +        if (static_cast<GtkAllocation*>(g_object_get_data(G_OBJECT(*current), "delayed-allocation"))) {

using a hash map here you simply would do: if (!current->second.isEmpty())
Comment 3 Martin Robinson 2011-11-30 13:48:24 PST
(In reply to comment #2)

> We might use a HashMap instead of a HashSet and store the allocation as the value instead of using g_object_set_data(), see the new windowed plugins patch

I think we have to use g_object_set_data here because the WebKit layer cannot expose any interface to WebCore.
Comment 4 Gustavo Noronha (kov) 2011-12-12 10:14:57 PST
Comment on attachment 115974 [details]
Patch

Good idea =)
Comment 5 WebKit Review Bot 2011-12-12 10:44:25 PST
Comment on attachment 115974 [details]
Patch

Clearing flags on attachment: 115974

Committed r102604: <http://trac.webkit.org/changeset/102604>
Comment 6 WebKit Review Bot 2011-12-12 10:44:33 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Martin Robinson 2012-02-03 15:46:10 PST
*** Bug 26040 has been marked as a duplicate of this bug. ***