Title: [89598] trunk
Revision
89598
Author
jap...@chromium.org
Date
2011-06-23 12:13:13 -0700 (Thu, 23 Jun 2011)

Log Message

2011-06-23  Nate Chapin  <jap...@chromium.org>

        Unreviewed.

        Revert production code part of r89503, since it's causing
        crashes on WebKit2/mac and failures on qt.

        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::dispatchWindowLoadEvent):
        * dom/Document.h:
        (WebCore::Document::processingLoadEvent):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::isLoadingInAPISense):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (89597 => 89598)


--- trunk/LayoutTests/ChangeLog	2011-06-23 19:11:08 UTC (rev 89597)
+++ trunk/LayoutTests/ChangeLog	2011-06-23 19:13:13 UTC (rev 89598)
@@ -1,3 +1,13 @@
+2011-06-23  Nate Chapin  <jap...@chromium.org>
+
+        Unreviewed.
+
+        Partial revert of test expectations for r89503.
+
+        * http/tests/loading/cross-origin-XHR-willLoadRequest-expected.txt:
+        * http/tests/misc/favicon-loads-with-icon-loading-override-expected.txt:
+        * http/tests/misc/link-rel-icon-beforeload-expected.txt:
+
 2011-06-23  Young Han Lee  <joy...@company100.net>
 
         Reviewed by Simon Fraser.

Modified: trunk/LayoutTests/http/tests/loading/cross-origin-XHR-willLoadRequest-expected.txt (89597 => 89598)


--- trunk/LayoutTests/http/tests/loading/cross-origin-XHR-willLoadRequest-expected.txt	2011-06-23 19:11:08 UTC (rev 89597)
+++ trunk/LayoutTests/http/tests/loading/cross-origin-XHR-willLoadRequest-expected.txt	2011-06-23 19:13:13 UTC (rev 89598)
@@ -2,6 +2,6 @@
 main frame - didCommitLoadForFrame
 main frame - didFinishDocumentLoadForFrame
 main frame - didHandleOnloadEventsForFrame
+CONSOLE MESSAGE: line 1: XMLHttpRequest cannot load http://localhost:8000/loading/resources/foo.txt. Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.
 main frame - didFinishLoadForFrame
-CONSOLE MESSAGE: line 1: XMLHttpRequest cannot load http://localhost:8000/loading/resources/foo.txt. Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.
 The console message above should report failure to load foo.txt due to cross-origin access, not a network error.

Modified: trunk/LayoutTests/http/tests/misc/favicon-loads-with-icon-loading-override-expected.txt (89597 => 89598)


--- trunk/LayoutTests/http/tests/misc/favicon-loads-with-icon-loading-override-expected.txt	2011-06-23 19:11:08 UTC (rev 89597)
+++ trunk/LayoutTests/http/tests/misc/favicon-loads-with-icon-loading-override-expected.txt	2011-06-23 19:13:13 UTC (rev 89598)
@@ -2,6 +2,8 @@
 http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html, main document URL http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html, http method GET> redirectResponse (null)
 http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html, http status code 200>
 http://127.0.0.1:8000/misc/resources/favicon.ico - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/misc/resources/favicon.ico, main document URL http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html, http method GET> redirectResponse (null)
+http://127.0.0.1:8000/misc/favicon-loads-with-icon-loading-override.html - didFinishLoading
+http://127.0.0.1:8000/misc/resources/favicon.ico - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/misc/resources/favicon.ico, http status code 200>
 https://bugs.webkit.org/show_bug.cgi?id=58292 - Provide new setting to allow site icon loading despite disabling automatic image loading in general.
 Resource load callbacks will reveal if the favicon still gets loaded if automatic image loading is disabled, but site icon image loading override is enabled. 
 

Modified: trunk/LayoutTests/http/tests/misc/link-rel-icon-beforeload-expected.txt (89597 => 89598)


--- trunk/LayoutTests/http/tests/misc/link-rel-icon-beforeload-expected.txt	2011-06-23 19:11:08 UTC (rev 89597)
+++ trunk/LayoutTests/http/tests/misc/link-rel-icon-beforeload-expected.txt	2011-06-23 19:13:13 UTC (rev 89598)
@@ -2,4 +2,6 @@
 http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, main document URL http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, http method GET> redirectResponse (null)
 http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, http status code 200>
 http://127.0.0.1:8000/favicon.ico - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/favicon.ico, main document URL http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html, http method GET> redirectResponse (null)
+http://127.0.0.1:8000/misc/link-rel-icon-beforeload.html - didFinishLoading
+http://127.0.0.1:8000/favicon.ico - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/favicon.ico, http status code 200>
 This test should not show a request for the favicon dont-load-this.ico, since the beforeload handler on the favicon link returns false. Therefore, if the resource request list below shows a request for dont-load-this.ico, then this test has failed.

Modified: trunk/Source/WebCore/ChangeLog (89597 => 89598)


--- trunk/Source/WebCore/ChangeLog	2011-06-23 19:11:08 UTC (rev 89597)
+++ trunk/Source/WebCore/ChangeLog	2011-06-23 19:13:13 UTC (rev 89598)
@@ -1,3 +1,18 @@
+2011-06-23  Nate Chapin  <jap...@chromium.org>
+
+        Unreviewed.
+
+        Revert production code part of r89503, since it's causing
+        crashes on WebKit2/mac and failures on qt.
+
+        * dom/Document.cpp:
+        (WebCore::Document::Document):
+        (WebCore::Document::dispatchWindowLoadEvent):
+        * dom/Document.h:
+        (WebCore::Document::processingLoadEvent):
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::isLoadingInAPISense):
+
 2011-06-23  Young Han Lee  <joy...@company100.net>
 
         Reviewed by Simon Fraser.

Modified: trunk/Source/WebCore/dom/Document.cpp (89597 => 89598)


--- trunk/Source/WebCore/dom/Document.cpp	2011-06-23 19:11:08 UTC (rev 89597)
+++ trunk/Source/WebCore/dom/Document.cpp	2011-06-23 19:13:13 UTC (rev 89598)
@@ -387,7 +387,6 @@
     , m_ignoreDestructiveWriteCount(0)
     , m_titleSetExplicitly(false)
     , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFired)
-    , m_loadEventFinished(false)
     , m_startTime(currentTime())
     , m_overMinimumLayoutThreshold(false)
     , m_extraLayoutDelay(0)
@@ -3401,7 +3400,6 @@
     if (!domWindow)
         return;
     domWindow->dispatchLoadEvent();
-    m_loadEventFinished = true;
 }
 
 void Document::enqueueWindowEvent(PassRefPtr<Event> event)

Modified: trunk/Source/WebCore/dom/Document.h (89597 => 89598)


--- trunk/Source/WebCore/dom/Document.h	2011-06-23 19:11:08 UTC (rev 89597)
+++ trunk/Source/WebCore/dom/Document.h	2011-06-23 19:13:13 UTC (rev 89598)
@@ -999,7 +999,6 @@
     void statePopped(SerializedScriptValue*);
 
     bool processingLoadEvent() const { return m_processingLoadEvent; }
-    bool loadEventFinished() const { return m_loadEventFinished; }
 
 #if ENABLE(DATABASE)
     virtual bool allowDatabaseAccess() const;
@@ -1281,12 +1280,8 @@
     Timer<Document> m_updateFocusAppearanceTimer;
 
     Element* m_cssTarget;
-
-    // FIXME: Merge these 2 variables into an enum. Also, FrameLoader::m_didCallImplicitClose
-    // is almost a duplication of this data, so that should probably get merged in too.
+    
     bool m_processingLoadEvent;
-    bool m_loadEventFinished;
-
     RefPtr<SerializedScriptValue> m_pendingStateObject;
     double m_startTime;
     bool m_overMinimumLayoutThreshold;

Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (89597 => 89598)


--- trunk/Source/WebCore/loader/DocumentLoader.cpp	2011-06-23 19:11:08 UTC (rev 89597)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp	2011-06-23 19:13:13 UTC (rev 89598)
@@ -441,9 +441,11 @@
     // Once a frame has loaded, we no longer need to consider subresources,
     // but we still need to consider subframes.
     if (frameLoader()->state() != FrameStateComplete) {
+        if (!m_primaryLoadComplete && isLoading())
+            return true;
+        if (!m_subresourceLoaders.isEmpty())
+            return true;
         Document* doc = m_frame->document();
-        if ((!m_primaryLoadComplete || !m_frame->document()->loadEventFinished()) && isLoading())
-            return true;
         if (doc->cachedResourceLoader()->requestCount())
             return true;
         if (DocumentParser* parser = doc->parser())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to