2008-12-08 Aaron Boodman <aa@chromium.org>
authordarin@chromium.org <darin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Dec 2008 18:13:25 +0000 (18:13 +0000)
committerdarin@chromium.org <darin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Dec 2008 18:13:25 +0000 (18:13 +0000)
        Reviewed by Stephanie Lewis.

        https://bugs.webkit.org/show_bug.cgi?id=22301
        Make dispatchDidFinishLoading() always fire before didFinishLoadForFrame().

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::finishedParsing):

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

14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/get-set-properties-expected.txt
LayoutTests/fast/events/onunload-window-property-expected.txt
LayoutTests/http/tests/loading/basic-expected.txt
LayoutTests/http/tests/loading/empty-subframe-expected.txt
LayoutTests/http/tests/loading/gmail-assert-on-load-expected.txt
LayoutTests/http/tests/loading/location-hash-reload-cycle-expected.txt
LayoutTests/http/tests/loading/onload-vs-immediate-refresh-expected.txt
LayoutTests/http/tests/loading/slow-parsing-subframe-expected.txt
LayoutTests/http/tests/xmlhttprequest/frame-load-cancelled-abort-expected.txt
LayoutTests/platform/mac/http/tests/loading/simple-subframe-expected.txt
LayoutTests/webarchive/loading/test-loading-archive-expected.txt
WebCore/ChangeLog
WebCore/loader/FrameLoader.cpp

index c73ee3e..a5ff4db 100644 (file)
@@ -1,3 +1,22 @@
+2008-12-08  Aaron Boodman  <aa@chromium.org>
+
+        Reviewed by Stephanie Lewis.
+
+        https://bugs.webkit.org/show_bug.cgi?id=22301
+        Make dispatchDidFinishLoading() always fire before didFinishLoadForFrame().
+
+        * fast/dom/Window/get-set-properties-expected.txt:
+        * fast/events/onunload-window-property-expected.txt:
+        * http/tests/loading/basic-expected.txt:
+        * http/tests/loading/empty-subframe-expected.txt:
+        * http/tests/loading/gmail-assert-on-load-expected.txt:
+        * http/tests/loading/location-hash-reload-cycle-expected.txt:
+        * http/tests/loading/onload-vs-immediate-refresh-expected.txt:
+        * http/tests/loading/slow-parsing-subframe-expected.txt:
+        * http/tests/xmlhttprequest/frame-load-cancelled-abort-expected.txt:
+        * platform/mac/http/tests/loading/simple-subframe-expected.txt:
+        * webarchive/loading/test-loading-archive-expected.txt:
+
 2008-12-08  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Alexey Proskuryakov.
index 0ec5af2..78a21a6 100644 (file)
@@ -1,4 +1,3 @@
-main frame "window.marker.toString()" - has 1 onunload handler(s)
 This page tests getting and setting window properties and functions.
 
 
index 3bb3dd9..f124c4f 100644 (file)
@@ -1,6 +1,6 @@
 main frame - didStartProvisionalLoadForFrame
 main frame - didCommitLoadForFrame
-main frame - didHandleOnloadEventsForFrame
 main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
 main frame - didFinishLoadForFrame
 This is a test of load callbacks. It is only useful inside the regression test tool.
index 7ead448..db76e6f 100644 (file)
@@ -2,11 +2,11 @@ main frame - didStartProvisionalLoadForFrame
 main frame - didCommitLoadForFrame
 frame "f1" - didStartProvisionalLoadForFrame
 frame "f1" - didCommitLoadForFrame
-frame "f1" - didHandleOnloadEventsForFrame
 frame "f1" - didFinishDocumentLoadForFrame
+frame "f1" - didHandleOnloadEventsForFrame
 frame "f1" - didFinishLoadForFrame
-main frame - didHandleOnloadEventsForFrame
 main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
 main frame - didFinishLoadForFrame
 This is a test of load callbacks. It is only useful inside the regression test tool.
 
index 7f19412..5fe7ea4 100644 (file)
@@ -3,6 +3,7 @@ main frame - didCommitLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
 main frame - didFinishDocumentLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
 main frame - didHandleOnloadEventsForFrame
 main frame - didFinishLoadForFrame
 This test provokes HTMLTokenizer::timerFired to be called and from within timerFired we want to call WebCore::pageDestroyed.
index 146e7dc..479091f 100644 (file)
@@ -1,6 +1,6 @@
 main frame - didStartProvisionalLoadForFrame
 main frame - didCommitLoadForFrame
-main frame - didHandleOnloadEventsForFrame
 main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
 main frame - didFinishLoadForFrame
 This test checks that no loader actions occur when setting window.location.hash to the empty string or "#". If this test fails when run in a browser, it will reload continuously. If this test fails when run in DumpRenderTree, the FrameLoader callback output will contain willPerformClientRedirectToURL callbacks.
index 17509db..d6c82d1 100644 (file)
@@ -1,6 +1,6 @@
 main frame - didStartProvisionalLoadForFrame
 main frame - didCommitLoadForFrame
-main frame - didHandleOnloadEventsForFrame
 main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
 main frame - didFinishLoadForFrame
 SUCCESS
index 9e45e19..eb5a6b2 100644 (file)
@@ -3,9 +3,9 @@ main frame - didCommitLoadForFrame
 frame "f1" - didStartProvisionalLoadForFrame
 main frame - didFinishDocumentLoadForFrame
 frame "f1" - didCommitLoadForFrame
+frame "f1" - didFinishDocumentLoadForFrame
 frame "f1" - didHandleOnloadEventsForFrame
 main frame - didHandleOnloadEventsForFrame
-frame "f1" - didFinishDocumentLoadForFrame
 frame "f1" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
 This tests that we get frame load callbacks in the proper order when a subframe is parsed and created from within a timer callback.  
index ea35776..5d713cc 100644 (file)
@@ -1,3 +1,4 @@
+frame "<!--framePath //<!--frame0-->-->" - has 1 onunload handler(s)
 Test for bug 11450 REGRESSION: XMLHttpRequest::didFinishLoading() should immediately return if the request has already been aborted
 
 If a frame has an active XMLHttpRequest that is still receiving data, and that frame is destroyed
index d4c499a..a4fde47 100644 (file)
@@ -3,9 +3,9 @@ main frame - didCommitLoadForFrame
 frame "f1" - didStartProvisionalLoadForFrame
 main frame - didFinishDocumentLoadForFrame
 frame "f1" - didCommitLoadForFrame
+frame "f1" - didFinishDocumentLoadForFrame
 frame "f1" - didHandleOnloadEventsForFrame
 main frame - didHandleOnloadEventsForFrame
-frame "f1" - didFinishDocumentLoadForFrame
 frame "f1" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
 layer at (0,0) size 800x600
index c1620eb..e22e253 100644 (file)
@@ -6,9 +6,9 @@ main frame - didFinishDocumentLoadForFrame
 <unknown> - didFinishLoading
 resources/helloworld.webarchive - didReceiveResponse <NSURLResponse resources/helloworld.webarchive>
 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
 main frame - didHandleOnloadEventsForFrame
-frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
  This tests that doing a "normal load" of a webarchive (not using loadArchive) does not cause a cancelled error to be called.
index 643c202..41a9779 100644 (file)
@@ -1,3 +1,13 @@
+2008-12-08  Aaron Boodman  <aa@chromium.org>
+
+        Reviewed by Stephanie Lewis.
+
+        https://bugs.webkit.org/show_bug.cgi?id=22301
+        Make dispatchDidFinishLoading() always fire before didFinishLoadForFrame().
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::finishedParsing):
+
 2008-12-08  Trenton Schulz <trenton.schulz@nokia.com>
 
         Rubber-stamped by Tor Arne Vestbø.
index 8018d93..8bf15c5 100644 (file)
@@ -1244,6 +1244,8 @@ void FrameLoader::finishedParsing()
     // Null-checking the FrameView indicates whether or not we're in the destructor.
     RefPtr<Frame> protector = m_frame->view() ? m_frame : 0;
 
+    m_client->dispatchDidFinishDocumentLoad();
+
     checkCompleted();
 
     if (!m_frame->view())
@@ -1253,8 +1255,6 @@ void FrameLoader::finishedParsing()
     // If not, remove them, relayout, and repaint.
     m_frame->view()->restoreScrollbar();
 
-    m_client->dispatchDidFinishDocumentLoad();
-
     gotoAnchor();
 }