Changeset 55316 in webkit


Ignore:
Timestamp:
Feb 26, 2010 2:39:51 PM (14 years ago)
Author:
kov@webkit.org
Message:

WebKit/gtk

2009-12-04 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

Reviewed by Xan Lopez.

[GTK] Needs proper reporting of frame loader callbacks, in DRT
https://bugs.webkit.org/show_bug.cgi?id=32170

Add new signal to report when the document load is finished for a
frame.

  • WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::dispatchDidFinishDocumentLoad):
  • webkit/webkitwebview.cpp: (webkit_web_view_class_init):

WebKitTools

2010-02-26 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

Reviewed by Xan Lopez.

[GTK] Needs proper reporting of frame loader callbacks, in DRT
https://bugs.webkit.org/show_bug.cgi?id=32170

Fix reporting of unload handlers, so that it is emitted where
needed, not after it.

  • DumpRenderTree/gtk/DumpRenderTree.cpp: (webViewLoadFinished): (webViewDocumentLoadFinished): (createWebView):

LayoutTests

2010-02-26 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

Reviewed by Xan Lopez.

[GTK] Needs proper reporting of frame loader callbacks, in DRT
https://bugs.webkit.org/show_bug.cgi?id=32170

Unskip tests that now pass.

  • LayoutTests/platform/gtk/http/tests/loading/redirect-with-no-location-crash-expected.txt: rebaselined.
  • platform/gtk/Skipped:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r55315 r55316  
    4949        * platform/mac/mathml/presentation/underover-expected.png: Added.
    5050        * platform/mac/mathml/presentation/underover-expected.txt: Added.
     51
     522010-02-26  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
     53
     54        Reviewed by Xan Lopez.
     55
     56        [GTK] Needs proper reporting of frame loader callbacks, in DRT
     57        https://bugs.webkit.org/show_bug.cgi?id=32170
     58
     59        Unskip tests that now pass.
     60
     61        * LayoutTests/platform/gtk/http/tests/loading/redirect-with-no-location-crash-expected.txt: rebaselined.
     62        * platform/gtk/Skipped:
    5163
    52642010-02-26  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
  • trunk/LayoutTests/platform/gtk/Skipped

    r55309 r55316  
    14001400fast/html/tab-order.html
    14011401fast/html/text-field-input-types.html
    1402 fast/loader/frames-with-unload-handlers-in-page-cache.html
    14031402fast/loader/main-document-url-for-non-http-loads.html
    1404 fast/loader/onunload-form-submit-crash-2.html
    1405 fast/loader/onunload-form-submit-crash.html
    14061403fast/loader/onload-policy-ignore-for-frame.html
    14071404fast/loader/policy-delegate-action-hit-test-zoomed.html
     
    56435640# Need proper frame loader callbacks reporting
    56445641# See https://bugs.webkit.org/show_bug.cgi?id=32170
    5645 fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html
    5646 fast/loader/stateobjects/document-destroyed-navigate-back.html
    56475642http/tests/loading/state-object-security-exception.html
    56485643http/tests/security/mixedContent/empty-url-plugin-in-frame.html
  • trunk/LayoutTests/platform/gtk/http/tests/loading/redirect-with-no-location-crash-expected.txt

    r48417 r55316  
    1 
     1main frame - didFinishDocumentLoadForFrameframe "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
  • trunk/WebKit/gtk/ChangeLog

    r55305 r55316  
     12009-12-04  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] Needs proper reporting of frame loader callbacks, in DRT
     6        https://bugs.webkit.org/show_bug.cgi?id=32170
     7
     8        Add new signal to report when the document load is finished for a
     9        frame.
     10
     11        * WebCoreSupport/FrameLoaderClientGtk.cpp:
     12        (WebKit::FrameLoaderClient::dispatchDidFinishDocumentLoad):
     13        * webkit/webkitwebview.cpp:
     14        (webkit_web_view_class_init):
     15
    1162010-02-26  Antonio Gomes  <tonikitoo@webkit.org>
    217
  • trunk/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

    r55086 r55316  
    789789void FrameLoaderClient::dispatchDidFinishDocumentLoad()
    790790{
    791     notImplemented();
     791    WebKitWebView* webView = getViewFromFrame(m_frame);
     792    g_signal_emit_by_name(webView, "document-load-finished", m_frame);
    792793}
    793794
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r55300 r55316  
    159159    DATABASE_QUOTA_EXCEEDED,
    160160    RESOURCE_REQUEST_STARTING,
     161    DOCUMENT_LOAD_FINISHED,
    161162    LAST_SIGNAL
    162163};
     
    21642165            WEBKIT_TYPE_NETWORK_REQUEST,
    21652166            WEBKIT_TYPE_NETWORK_RESPONSE);
     2167
     2168    /*
     2169     * DOM-related signals. These signals are experimental, for now,
     2170     * and may change API and ABI. Their comments lack one * on
     2171     * purpose, to make them not be catched by gtk-doc.
     2172     */
     2173
     2174    /*
     2175     * WebKitWebView::document-load-finished
     2176     * @web_view: the object which received the signal
     2177     * @web_frame: the #WebKitWebFrame whose load dispatched this request
     2178     *
     2179     * Emitted when the DOM document object load is finished for the
     2180     * given frame.
     2181     */
     2182    webkit_web_view_signals[DOCUMENT_LOAD_FINISHED] = g_signal_new("document-load-finished",
     2183            G_TYPE_FROM_CLASS(webViewClass),
     2184            (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
     2185            0,
     2186            NULL, NULL,
     2187            g_cclosure_marshal_VOID__OBJECT,
     2188            G_TYPE_NONE, 1,
     2189            WEBKIT_TYPE_WEB_FRAME);
     2190
    21662191
    21672192    /*
  • trunk/WebKitTools/ChangeLog

    r55309 r55316  
     12010-02-26  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] Needs proper reporting of frame loader callbacks, in DRT
     6        https://bugs.webkit.org/show_bug.cgi?id=32170
     7
     8        Fix reporting of unload handlers, so that it is emitted where
     9        needed, not after it.
     10
     11        * DumpRenderTree/gtk/DumpRenderTree.cpp:
     12        (webViewLoadFinished):
     13        (webViewDocumentLoadFinished):
     14        (createWebView):
     15
    1162010-02-26  Antonio Gomes  <tonikitoo@webkit.org>
    217
  • trunk/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp

    r54942 r55316  
    551551        if (frameName && (frameName[0] != '\0')) {
    552552            char* tmp = g_strdup_printf("main frame \"%s\"", frameName);
    553             g_free (frameName);
     553            g_free(frameName);
    554554            frameName = tmp;
    555555        } else {
     
    560560        g_free(frameName);
    561561        frameName = g_strdup("frame (anonymous)");
     562    } else {
     563        char* tmp = g_strdup_printf("frame \"%s\"", frameName);
     564        g_free(frameName);
     565        frameName = tmp;
    562566    }
    563567
     
    567571static void webViewLoadFinished(WebKitWebView* view, WebKitWebFrame* frame, void*)
    568572{
    569     if (!done && !gLayoutTestController->dumpFrameLoadCallbacks()) {
     573    if (frame != topLoadingFrame)
     574        return;
     575
     576    topLoadingFrame = 0;
     577    WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue for the rest of this test
     578    if (gLayoutTestController->waitToDump())
     579        return;
     580
     581    if (WorkQueue::shared()->count())
     582        g_timeout_add(0, processWork, 0);
     583    else
     584        dump();
     585}
     586
     587static void webViewDocumentLoadFinished(WebKitWebView* view, WebKitWebFrame* frame, void*)
     588{
     589    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
     590        char* frameName = getFrameNameSuitableForTestResult(view, frame);
     591        printf("%s - didFinishDocumentLoadForFrame", frameName);
     592        g_free(frameName);
     593    } else if (!done) {
    570594        guint pendingFrameUnloadEvents = webkit_web_frame_get_pending_unload_event_count(frame);
    571595        if (pendingFrameUnloadEvents) {
     
    575599        }
    576600    }
    577 
    578     if (frame != topLoadingFrame)
    579         return;
    580 
    581     topLoadingFrame = 0;
    582     WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue for the rest of this test
    583     if (gLayoutTestController->waitToDump())
    584         return;
    585 
    586     if (WorkQueue::shared()->count())
    587         g_timeout_add(0, processWork, 0);
    588     else
    589         dump();
    590601}
    591602
     
    776787                     "signal::close-web-view", webViewClose, 0,
    777788                     "signal::database-quota-exceeded", databaseQuotaExceeded, 0,
     789                     "signal::document-load-finished", webViewDocumentLoadFinished, 0,
    778790                     NULL);
    779791
Note: See TracChangeset for help on using the changeset viewer.