Changeset 154899 in webkit


Ignore:
Timestamp:
Aug 30, 2013 11:00:36 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Brian Holt <brian.holt@samsung.com> 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):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r154895 r154899  
     12013-08-30  Brian Holt  <brian.holt@samsung.com>
     2
     3        [GTK] [WK2] TestWebKitWebView snapshot fails
     4        https://bugs.webkit.org/show_bug.cgi?id=120404
     5
     6        Reviewed by Darin Adler.
     7
     8        Fixed the snapshot test failure caused by GTK no longer allowing
     9        widgets to resize.  Instead, resize the WebView by resizing the
     10        window and waiting for the event to complete asynchronously.
     11
     12        * UIProcess/API/gtk/tests/WebViewTest.cpp:
     13        (WebViewTest::resizeView):
     14
    1152013-08-30  Csaba Osztrogonác  <ossy@webkit.org>
    216
  • trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp

    r148788 r154899  
    202202void WebViewTest::resizeView(int width, int height)
    203203{
    204     GtkAllocation allocation;
    205     gtk_widget_get_allocation(GTK_WIDGET(m_webView), &allocation);
    206     if (width != -1)
    207         allocation.width = width;
    208     if (height != -1)
    209         allocation.height = height;
    210     gtk_widget_size_allocate(GTK_WIDGET(m_webView), &allocation);
     204    gtk_window_resize(GTK_WINDOW(m_parentWindow), width, height);
     205
     206    while (gtk_events_pending())
     207        gtk_main_iteration();
    211208}
    212209
Note: See TracChangeset for help on using the changeset viewer.