Changeset 70788 in webkit


Ignore:
Timestamp:
Oct 28, 2010 10:37:16 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-28 Sergio Villar Senin <svillar@igalia.com>

Reviewed by Martin Robinson.

[GTK] WebKitWebFrame's load-status is not properly notified to the tests
https://bugs.webkit.org/show_bug.cgi?id=48048

  • platform/gtk/Skipped: unskipped a couple of tests

2010-10-28 Sergio Villar Senin <svillar@igalia.com>

Reviewed by Martin Robinson.

[GTK] WebKitWebFrame's load-status is not properly notified to the tests
https://bugs.webkit.org/show_bug.cgi?id=48048

"frame-created" signal must be issued before loading any data,
that way clients can correctly capture all the loading related
signals for that frame.

  • WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::createFrame):

2010-10-28 Sergio Villar Senin <svillar@igalia.com>

Reviewed by Martin Robinson.

[GTK] WebKitWebFrame's load-status is not properly notified to the tests
https://bugs.webkit.org/show_bug.cgi?id=48048

DRT now listens to WebKitWebFrame load-status signals for each
created frame instead of the load-status signal of the
WebKitWebView that only notifies about changes in the main frame.

  • DumpRenderTree/gtk/DumpRenderTree.cpp: (webViewLoadFinished): (webFrameLoadStatusNotified): (frameCreatedCallback): (createWebView): (main):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r70786 r70788  
     12010-10-28  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] WebKitWebFrame's load-status is not properly notified to the tests
     6        https://bugs.webkit.org/show_bug.cgi?id=48048
     7
     8        * platform/gtk/Skipped: unskipped a couple of tests
     9
    1102010-10-28  Tony Chang  <tony@chromium.org>
    211
  • trunk/LayoutTests/platform/gtk/Skipped

    r70763 r70788  
    27902790# Needed to cover the fix for <rdar://problem/6727495>
    27912791http/tests/loading/deleted-host-in-resource-load-delegate-callback.html
    2792 http/tests/loading/empty-subframe.html
    27932792http/tests/loading/gmail-assert-on-load.html
    27942793http/tests/loading/preload-img-test.html
    27952794http/tests/loading/redirect-with-no-location-crash.html
    2796 http/tests/loading/slow-parsing-subframe.html
    27972795http/tests/loading/text-content-type-with-binary-extension.html
    27982796http/tests/local/blob/send-data-blob.html
  • trunk/WebKit/gtk/ChangeLog

    r70634 r70788  
     12010-10-28  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] WebKitWebFrame's load-status is not properly notified to the tests
     6        https://bugs.webkit.org/show_bug.cgi?id=48048
     7
     8        "frame-created" signal must be issued before loading any data,
     9        that way clients can correctly capture all the loading related
     10        signals for that frame.
     11
     12        * WebCoreSupport/FrameLoaderClientGtk.cpp:
     13        (WebKit::FrameLoaderClient::createFrame):
     14
    1152010-10-27  Mario Sanchez Prada  <msanchez@igalia.com>
    216
  • trunk/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

    r70574 r70788  
    593593        return 0;
    594594
     595    g_signal_emit_by_name(webView, "frame-created", kitFrame);
     596
    595597    childFrame->loader()->loadURLIntoChildFrame(url, referrer, childFrame.get());
    596598
     
    599601        return 0;
    600602
    601     g_signal_emit_by_name(webView, "frame-created", kitFrame);
    602603    return childFrame.release();
    603604}
  • trunk/WebKitTools/ChangeLog

    r70786 r70788  
     12010-10-28  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] WebKitWebFrame's load-status is not properly notified to the tests
     6        https://bugs.webkit.org/show_bug.cgi?id=48048
     7
     8        DRT now listens to WebKitWebFrame load-status signals for each
     9        created frame instead of the load-status signal of the
     10        WebKitWebView that only notifies about changes in the main frame.
     11
     12        * DumpRenderTree/gtk/DumpRenderTree.cpp:
     13        (webViewLoadFinished):
     14        (webFrameLoadStatusNotified):
     15        (frameCreatedCallback):
     16        (createWebView):
     17        (main):
     18
    1192010-10-28  Tony Chang  <tony@chromium.org>
    220
  • trunk/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp

    r70609 r70788  
    728728}
    729729
    730 static void webViewLoadCommitted(WebKitWebView* view, WebKitWebFrame* frame, void*)
    731 {
    732     if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
    733         char* frameName = getFrameNameSuitableForTestResult(view, frame);
    734         printf("%s - didCommitLoadForFrame\n", frameName);
    735         g_free(frameName);
    736     }
    737 }
    738 
    739 
    740730static void webViewLoadFinished(WebKitWebView* view, WebKitWebFrame* frame, void*)
    741731{
    742     if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
    743         char* frameName = getFrameNameSuitableForTestResult(view, frame);
    744         printf("%s - didFinishLoadForFrame\n", frameName);
    745         g_free(frameName);
    746     }
    747 
    748732    if (frame != topLoadingFrame)
    749733        return;
     
    981965}
    982966
    983 static void webViewLoadStatusNotified(WebKitWebView* view, gpointer user_data)
    984 {
    985     WebKitLoadStatus loadStatus = webkit_web_view_get_load_status(view);
     967static void webFrameLoadStatusNotified(WebKitWebFrame* frame, gpointer user_data)
     968{
     969    WebKitLoadStatus loadStatus = webkit_web_frame_get_load_status(frame);
    986970
    987971    if (gLayoutTestController->dumpFrameLoadCallbacks()) {
    988         if (loadStatus == WEBKIT_LOAD_PROVISIONAL) {
    989             char* frameName = getFrameNameSuitableForTestResult(view, mainFrame);
    990             printf("%s - didStartProvisionalLoadForFrame\n", frameName);
    991             g_free(frameName);
     972        GOwnPtr<char> frameName(getFrameNameSuitableForTestResult(webkit_web_frame_get_web_view(frame), frame));
     973
     974        switch (loadStatus) {
     975        case WEBKIT_LOAD_PROVISIONAL:
     976            if (!done)
     977                printf("%s - didStartProvisionalLoadForFrame\n", frameName.get());
     978            break;
     979        case WEBKIT_LOAD_COMMITTED:
     980            if (!done)
     981                printf("%s - didCommitLoadForFrame\n", frameName.get());
     982            break;
     983        case WEBKIT_LOAD_FINISHED:
     984            if (frame != topLoadingFrame || !done)
     985                printf("%s - didFinishLoadForFrame\n", frameName.get());
     986            break;
     987        default:
     988            break;
    992989        }
    993990    }
     991}
     992
     993static void frameCreatedCallback(WebKitWebView* webView, WebKitWebFrame* webFrame, gpointer user_data)
     994{
     995    g_signal_connect(webFrame, "notify::load-status", G_CALLBACK(webFrameLoadStatusNotified), NULL);
    994996}
    995997
     
    10071009                     "signal::load-started", webViewLoadStarted, 0,
    10081010                     "signal::load-finished", webViewLoadFinished, 0,
    1009                      "signal::load-committed", webViewLoadCommitted, 0,
    10101011                     "signal::window-object-cleared", webViewWindowObjectCleared, 0,
    10111012                     "signal::console-message", webViewConsoleMessage, 0,
     
    10251026                     "signal::drag-end", dragEndCallback, 0,
    10261027                     "signal::drag-failed", dragFailedCallback, 0,
    1027 
    1028                      NULL);
    1029 
    1030     g_signal_connect(view,
    1031                      "notify::load-status", G_CALLBACK(webViewLoadStatusNotified),
     1028                     "signal::frame-created", frameCreatedCallback, 0,
     1029
    10321030                     NULL);
    10331031
     
    10431041        webkit_web_view_set_settings(view, settings);
    10441042    }
     1043
     1044    // frame-created is not issued for main frame. That's why we must do this here
     1045    WebKitWebFrame* frame = webkit_web_view_get_main_frame(view);
     1046    g_signal_connect(frame, "notify::load-status", G_CALLBACK(webFrameLoadStatusNotified), NULL);
    10451047
    10461048    return view;
Note: See TracChangeset for help on using the changeset viewer.