[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
xan at webkit.org
xan at webkit.org
Wed Mar 17 17:59:20 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 1a90bc3c32791e7871b90d352da841972d5f7acb
Author: xan at webkit.org <xan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Feb 25 17:04:59 2010 +0000
2010-02-25 Xan Lopez <xlopez at igalia.com>
Reviewed by Gustavo Noronha.
Workaround Java plugins not drawing themselves properly on first
expose by doing a late size-allocate after 'plug-added' has been
emitted on the embedding GtkSocket. It's unclear to me if this is
a bug in our side or theirs, but this should be pretty safe and
fixes the annoyance while we investigate it further.
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::plugAddedCallback):
(WebCore::PluginView::platformStart):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 08ae7eb..a8e8250 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-02-25 Xan Lopez <xlopez at igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Workaround Java plugins not drawing themselves properly on first
+ expose by doing a late size-allocate after 'plug-added' has been
+ emitted on the embedding GtkSocket. It's unclear to me if this is
+ a bug in our side or theirs, but this should be pretty safe and
+ fixes the annoyance while we investigate it further.
+
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::plugAddedCallback):
+ (WebCore::PluginView::platformStart):
+
2010-02-23 Jocelyn Turcotte <jocelyn.turcotte at nokia.com>
Reviewed by Tor Arne Vestbø.
diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp
index 3204d81..542ba7e 100644
--- a/WebCore/plugins/gtk/PluginViewGtk.cpp
+++ b/WebCore/plugins/gtk/PluginViewGtk.cpp
@@ -797,6 +797,22 @@ static void getVisualAndColormap(int depth, Visual** visual, Colormap* colormap)
}
#endif
+void plugAddedCallback(GtkSocket* socket, PluginView* view)
+{
+ if (!socket || !view)
+ return;
+
+ // FIXME: Java Plugins do not seem to draw themselves properly the
+ // first time unless we do a size-allocate after they have done
+ // the plug operation on their side, which in general does not
+ // happen since we do size-allocates before setting the
+ // NPWindow. Apply this workaround until we figure out a better
+ // solution, if any.
+ IntRect rect = view->frameRect();
+ GtkAllocation allocation = { rect.x(), rect.y(), rect.width(), rect.height() };
+ gtk_widget_size_allocate(GTK_WIDGET(socket), &allocation);
+}
+
bool PluginView::platformStart()
{
ASSERT(m_isStarted);
@@ -816,6 +832,7 @@ bool PluginView::platformStart()
if (m_needsXEmbed) {
setPlatformWidget(gtk_socket_new());
gtk_container_add(GTK_CONTAINER(m_parentFrame->view()->hostWindow()->platformPageClient()), platformPluginWidget());
+ g_signal_connect(platformPluginWidget(), "plug-added", G_CALLBACK(plugAddedCallback), this);
g_signal_connect(platformPluginWidget(), "plug_removed", G_CALLBACK(plug_removed_cb), NULL);
} else
setPlatformWidget(gtk_xtbin_new(m_parentFrame->view()->hostWindow()->platformPageClient()->window, 0));
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list