Reviewed by Hyatt.
[WebKit-https.git] / WebCore / loader / FrameLoader.cpp
index 68adcc448eea480bbd3668888d35eb71126000c8..ea3fcd3e51d0e85263fe283f13af216863043609 100644 (file)
@@ -1551,16 +1551,9 @@ void FrameLoader::provisionalLoadStarted()
     cancelRedirection(true);
     m_client->provisionalLoadStarted();
 
     cancelRedirection(true);
     m_client->provisionalLoadStarted();
 
-    if (canCachePage()) {
-        if (m_client->canCachePage()) {
-            if (!m_currentHistoryItem->cachedPage()) {
-                cachePageToHistoryItem(m_currentHistoryItem.get());
-                purgePageCache();
-            }
-        } else {
-            // Put the document into a null state, so it can be restored correctly. 
-            clear();
-        }
+    if (canCachePage() && m_client->canCachePage() && !m_currentHistoryItem->cachedPage()) {
+        cachePageToHistoryItem(m_currentHistoryItem.get());
+        purgePageCache();
     }
 }
 
     }
 }