Title: [154899] trunk/Source/WebKit2
Revision
154899
Author
[email protected]
Date
2013-08-30 11:00:36 -0700 (Fri, 30 Aug 2013)

Log Message

[GTK] [WK2] TestWebKitWebView snapshot fails
https://bugs.webkit.org/show_bug.cgi?id=120404

Patch by Brian Holt <[email protected]> on 2013-08-30
Reviewed by Darin Adler.

Fixed the snapshot test failure caused by GTK no longer allowing
widgets to resize.  Instead, resize the WebView by resizing the
window and waiting for the event to complete asynchronously.

* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::resizeView):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (154898 => 154899)


--- trunk/Source/WebKit2/ChangeLog	2013-08-30 17:58:36 UTC (rev 154898)
+++ trunk/Source/WebKit2/ChangeLog	2013-08-30 18:00:36 UTC (rev 154899)
@@ -1,3 +1,17 @@
+2013-08-30  Brian Holt  <[email protected]>
+
+        [GTK] [WK2] TestWebKitWebView snapshot fails
+        https://bugs.webkit.org/show_bug.cgi?id=120404
+
+        Reviewed by Darin Adler.
+
+        Fixed the snapshot test failure caused by GTK no longer allowing
+        widgets to resize.  Instead, resize the WebView by resizing the
+        window and waiting for the event to complete asynchronously.
+
+        * UIProcess/API/gtk/tests/WebViewTest.cpp:
+        (WebViewTest::resizeView):
+
 2013-08-30  Csaba Osztrogonác  <[email protected]>
 
         Add USE(PROTECTION_SPACE_AUTH_CALLBACK) guards to canAuthenticateAgainstProtectionSpace()

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp (154898 => 154899)


--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp	2013-08-30 17:58:36 UTC (rev 154898)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp	2013-08-30 18:00:36 UTC (rev 154899)
@@ -201,13 +201,10 @@
 
 void WebViewTest::resizeView(int width, int height)
 {
-    GtkAllocation allocation;
-    gtk_widget_get_allocation(GTK_WIDGET(m_webView), &allocation);
-    if (width != -1)
-        allocation.width = width;
-    if (height != -1)
-        allocation.height = height;
-    gtk_widget_size_allocate(GTK_WIDGET(m_webView), &allocation);
+    gtk_window_resize(GTK_WINDOW(m_parentWindow), width, height);
+
+    while (gtk_events_pending())
+        gtk_main_iteration();
 }
 
 void WebViewTest::selectAll()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to