Bug 72805 - [GTK] gtk_widget_size_allocate for plugin widgets should happen in the WebView size-allocate method
Summary: [GTK] gtk_widget_size_allocate for plugin widgets should happen in the WebVie...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Martin Robinson
URL:
Keywords:
: 26040 (view as bug list)
Depends on:
Blocks: 68757
  Show dependency treegraph
 
Reported: 2011-11-19 11:49 PST by Martin Robinson
Modified: 2012-02-03 15:46 PST (History)
3 users (show)

See Also:


Attachments
Patch (6.57 KB, patch)
2011-11-19 20:23 PST, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***