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 c73ee3ebb789475d9796ff6488b3a8592eccd07d..a5ff4db548f8c0bc99e83c36aea380a88adb7e26 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 0ec5af2db40aa716b466ec7f2eb990ff52749c5b..78a21a66a2387b20192c7340aaec4d06af43b5e6 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 14a70e700e0388d9cb5e645c3378c6d66744356c..908c920c1392d11a136e2021a6499ba991baf096 100644 (file)
@@ -1,3 +1,2 @@
-main frame - has 1 onunload handler(s)
 ALERT: unload
 You should have seen an unload alert appear.
index 3bb3dd9a5acf677df0ca1f37d90c474efd62dd34..f124c4fa2cf8530d558ff83cc389761f1b15db62 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 7ead448f67f8749cae0875d916fae43b3a71de56..db76e6f728f0ad599a2c88826f0fea4dd459a4fe 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 7f19412eef3fc201877e51490354fd6551ddad08..5fe7ea4e46043fc26dfc73ef327d3f9e28dac655 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 146e7dcb7b80205147c19d716d7f27b732c20415..479091f8838b82fe5d89aa67a2585035e3fdffed 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 17509db0447848ce72c0d4e5cb9faca76a32f13e..d6c82d1251d9aa20d9444ced15c20cda35ca317b 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 9e45e19e6c9a07ee5438a5b2439230e33760cea2..eb5a6b2fce5f5d0784d80651e2b5760bbed74446 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 ea35776e796ffb5679957bc84fde4de0380e160e..5d713cca120deeb7a296c658b801569d416a78d9 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 d4c499ae307d22332513fcc4e518f0261edbf7a9..a4fde47ac26b5aef7cbff1ec1d02be673d5e4d29 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 c1620ebd7575bce31369d7e7a23f74bb32a20c0f..e22e253c936bae121cfc653f140664541c7f5938 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 643c2021ed87417dde05dd2f3b87eae676bf7b0f..41a977940f431ae16589bbc3eb664e89316475e0 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 8018d93663b70688d6dabe4d45644db595681644..8bf15c57273149a24ac19b7ea0a209925e6ddbb2 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();
 }