[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

beidson at apple.com beidson at apple.com
Wed Dec 22 11:12:18 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 104538fc4fc0e14bb14b82e7d225458b3f8fb7e2
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 15 00:43:50 2010 +0000

    <rdar://problem/8131355> Apps load stale versions of pages when initial load happens via back/forward navigation.
    
    Reviewed by Mark Rowe.
    
    No test case is added because DumpRenderTree is not able to test the scenario where the initial load in a WebView
    occurs via a back/forward navigation.
    
    * loader/FrameLoader.cpp:
    (WebCore::FrameLoader::navigateToDifferentDocument): When the first load in a page is a back/forward navigation, we
      shouldn't try to prefer cached data but should do revalidation by default.
    (WebCore::FrameLoader::addExtraFieldsToRequest): Ditto.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63384 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d1b0dd1..02437d1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-07-14  Brady Eidson  <beidson at apple.com>
+
+        Reviewed by Mark Rowe.
+
+        <rdar://problem/8131355> Apps load stale versions of pages when initial load happens via back/forward navigation.
+
+        No test case is added because DumpRenderTree is not able to test the scenario where the initial load in a WebView
+        occurs via a back/forward navigation.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::navigateToDifferentDocument): When the first load in a page is a back/forward navigation, we
+          shouldn't try to prefer cached data but should do revalidation by default.
+        (WebCore::FrameLoader::addExtraFieldsToRequest): Ditto.
+
 2010-07-14  James Robinson  <jamesr at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index aee8af4..bd4866c 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -2699,7 +2699,7 @@ void FrameLoader::addExtraFieldsToRequest(ResourceRequest& request, FrameLoadTyp
         request.setHTTPHeaderField("Pragma", "no-cache");
     } else if (request.isConditional())
         request.setCachePolicy(ReloadIgnoringCacheData);
-    else if (isBackForwardLoadType(loadType) && !request.url().protocolIs("https"))
+    else if (isBackForwardLoadType(loadType) && m_stateMachine.committedFirstRealDocumentLoad() && !request.url().protocolIs("https"))
         request.setCachePolicy(ReturnCacheDataElseLoad);
     else if (!mainResource && documentLoader()->isLoadingInAPISense())
         request.setCachePolicy(documentLoader()->originalRequest().cachePolicy());
@@ -3247,7 +3247,9 @@ void FrameLoader::navigateToDifferentDocument(HistoryItem* item, FrameLoadType l
             case FrameLoadTypeBackWMLDeckNotAccessible:
             case FrameLoadTypeForward:
             case FrameLoadTypeIndexedBackForward:
-                if (!itemURL.protocolIs("https"))
+                // If the first load within a frame is a navigation within a back/forward list that was attached 
+                // without any of the items being loaded then we should use the default caching policy (<rdar://problem/8131355>).
+                if (m_stateMachine.committedFirstRealDocumentLoad() && !itemURL.protocolIs("https"))
                     request.setCachePolicy(ReturnCacheDataElseLoad);
                 break;
             case FrameLoadTypeStandard:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list