Title: [130838] trunk/Source/WebKit/gtk
- Revision
- 130838
- Author
- commit-qu...@webkit.org
- Date
- 2012-10-09 19:11:31 -0700 (Tue, 09 Oct 2012)
Log Message
[GTK] Plugins don't display
https://bugs.webkit.org/show_bug.cgi?id=98789
Patch by Daniel Drake <d...@laptop.org> on 2012-10-09
Reviewed by Martin Robinson.
Fix a recent regression where plugin content was not being displayed.
Bringing webkit_web_view_size_allocate in line with the WebKit2
equivalent solves the issue.
* webkit/webkitwebview.cpp:
(resizeWebViewFromAllocation): pass allocation request to children
even when the allocation size does not change.
(webkit_web_view_size_allocate): don't bail too early if the
allocation size does not change.
Modified Paths
Diff
Modified: trunk/Source/WebKit/gtk/ChangeLog (130837 => 130838)
--- trunk/Source/WebKit/gtk/ChangeLog 2012-10-10 02:08:02 UTC (rev 130837)
+++ trunk/Source/WebKit/gtk/ChangeLog 2012-10-10 02:11:31 UTC (rev 130838)
@@ -1,3 +1,20 @@
+2012-10-09 Daniel Drake <d...@laptop.org>
+
+ [GTK] Plugins don't display
+ https://bugs.webkit.org/show_bug.cgi?id=98789
+
+ Reviewed by Martin Robinson.
+
+ Fix a recent regression where plugin content was not being displayed.
+ Bringing webkit_web_view_size_allocate in line with the WebKit2
+ equivalent solves the issue.
+
+ * webkit/webkitwebview.cpp:
+ (resizeWebViewFromAllocation): pass allocation request to children
+ even when the allocation size does not change.
+ (webkit_web_view_size_allocate): don't bail too early if the
+ allocation size does not change.
+
2012-10-07 Caio Marcelo de Oliveira Filho <caio.olive...@openbossa.org>
Rename first/second to key/value in HashMap iterators
Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (130837 => 130838)
--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp 2012-10-10 02:08:02 UTC (rev 130837)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp 2012-10-10 02:11:31 UTC (rev 130838)
@@ -849,17 +849,21 @@
*allocation = IntRect();
}
-static void resizeWebViewFromAllocation(WebKitWebView* webView, GtkAllocation* allocation)
+static void resizeWebViewFromAllocation(WebKitWebView* webView, GtkAllocation* allocation, bool sizeChanged)
{
Page* page = core(webView);
IntSize oldSize;
- if (FrameView* frameView = page->mainFrame()->view()) {
+ FrameView* frameView = page->mainFrame()->view();
+ if (sizeChanged && frameView) {
oldSize = frameView->size();
frameView->resize(allocation->width, allocation->height);
}
gtk_container_forall(GTK_CONTAINER(webView), updateChildAllocationFromPendingAllocation, 0);
+ if (!sizeChanged)
+ return;
+
WebKit::ChromeClient* chromeClient = static_cast<WebKit::ChromeClient*>(page->chrome()->client());
chromeClient->widgetSizeChanged(oldSize, IntSize(allocation->width, allocation->height));
chromeClient->adjustmentWatcher()->updateAdjustmentsFromScrollbars();
@@ -869,17 +873,16 @@
{
GtkAllocation oldAllocation;
gtk_widget_get_allocation(widget, &oldAllocation);
+ bool sizeChanged = allocation->width != oldAllocation.width || allocation->height != oldAllocation.height;
GTK_WIDGET_CLASS(webkit_web_view_parent_class)->size_allocate(widget, allocation);
- if (allocation->width == oldAllocation.width && allocation->height == oldAllocation.height)
- return;
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
- if (!gtk_widget_get_mapped(widget)) {
+ if (sizeChanged && !gtk_widget_get_mapped(widget)) {
webView->priv->needsResizeOnMap = true;
return;
}
- resizeWebViewFromAllocation(webView, allocation);
+ resizeWebViewFromAllocation(webView, allocation, sizeChanged);
}
static void webkitWebViewMap(GtkWidget* widget)
@@ -892,7 +895,7 @@
GtkAllocation allocation;
gtk_widget_get_allocation(widget, &allocation);
- resizeWebViewFromAllocation(webView, &allocation);
+ resizeWebViewFromAllocation(webView, &allocation, true);
webView->priv->needsResizeOnMap = false;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes