Unreviewed, rolling out r130838.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Oct 2012 06:10:09 +0000 (06:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Oct 2012 06:10:09 +0000 (06:10 +0000)
http://trac.webkit.org/changeset/130838
https://bugs.webkit.org/show_bug.cgi?id=98860

The patch is causing X errors (=> crashes) on GTK 64-bit
Release builder (Requested by zdobersek on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-09

* webkit/webkitwebview.cpp:
(resizeWebViewFromAllocation):
(webkit_web_view_size_allocate):
(webkitWebViewMap):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130853 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/webkit/webkitwebview.cpp

index 7967f6e..3d994b6 100644 (file)
@@ -1,3 +1,17 @@
+2012-10-09  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r130838.
+        http://trac.webkit.org/changeset/130838
+        https://bugs.webkit.org/show_bug.cgi?id=98860
+
+        The patch is causing X errors (=> crashes) on GTK 64-bit
+        Release builder (Requested by zdobersek on #webkit).
+
+        * webkit/webkitwebview.cpp:
+        (resizeWebViewFromAllocation):
+        (webkit_web_view_size_allocate):
+        (webkitWebViewMap):
+
 2012-10-09  Daniel Drake  <dsd@laptop.org>
 
         [GTK] Plugins don't display
index 5ac0484..555171a 100644 (file)
@@ -849,21 +849,17 @@ static void updateChildAllocationFromPendingAllocation(GtkWidget* child, void*)
     *allocation = IntRect();
 }
 
-static void resizeWebViewFromAllocation(WebKitWebView* webView, GtkAllocation* allocation, bool sizeChanged)
+static void resizeWebViewFromAllocation(WebKitWebView* webView, GtkAllocation* allocation)
 {
     Page* page = core(webView);
     IntSize oldSize;
-    FrameView* frameView = page->mainFrame()->view();
-    if (sizeChanged && frameView) {
+    if (FrameView* frameView = page->mainFrame()->view()) {
         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();
@@ -873,16 +869,17 @@ static void webkit_web_view_size_allocate(GtkWidget* widget, GtkAllocation* allo
 {
     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 (sizeChanged && !gtk_widget_get_mapped(widget)) {
+    if (!gtk_widget_get_mapped(widget)) {
         webView->priv->needsResizeOnMap = true;
         return;
     }
-    resizeWebViewFromAllocation(webView, allocation, sizeChanged);
+    resizeWebViewFromAllocation(webView, allocation);
 }
 
 static void webkitWebViewMap(GtkWidget* widget)
@@ -895,7 +892,7 @@ static void webkitWebViewMap(GtkWidget* widget)
 
     GtkAllocation allocation;
     gtk_widget_get_allocation(widget, &allocation);
-    resizeWebViewFromAllocation(webView, &allocation, true);
+    resizeWebViewFromAllocation(webView, &allocation);
     webView->priv->needsResizeOnMap = false;
 }