2011-02-22 Charlie Reis <creis@chromium.org>
Reviewed by Darin Fisher.
Remove DatabasePolicy from FrameLoaderTypes
https://bugs.webkit.org/show_bug.cgi?id=54968
The DatabasePolicy enum is no longer needed now that we avoid stopping
loaders on same-document navigations.
Existing test: storage/hash-change-with-xhr.html
* WebCore.exp.in:
* loader/DocumentLoader.cpp:
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
* loader/FrameLoader.h:
* loader/FrameLoaderTypes.h:
* workers/WorkerThread.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
index c9fca8d..2065675 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
@@ -362,7 +362,7 @@
targetFrame->navigationScheduler()->scheduleFormSubmission(submission);
}
-void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy, DatabasePolicy databasePolicy)
+void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy)
{
if (m_frame->document() && m_frame->document()->parser())
m_frame->document()->parser()->stopParsing();
@@ -429,10 +429,7 @@
cachedResourceLoader->cancelRequests();
#if ENABLE(DATABASE)
- if (databasePolicy == DatabasePolicyStop)
- doc->stopDatabases(0);
-#else
- UNUSED_PARAM(databasePolicy);
+ doc->stopDatabases(0);
#endif
}
@@ -1688,13 +1685,13 @@
return false;
}
-void FrameLoader::stopLoadingSubframes(DatabasePolicy databasePolicy, ClearProvisionalItemPolicy clearProvisionalItemPolicy)
+void FrameLoader::stopLoadingSubframes(ClearProvisionalItemPolicy clearProvisionalItemPolicy)
{
for (RefPtr<Frame> child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
- child->loader()->stopAllLoaders(databasePolicy, clearProvisionalItemPolicy);
+ child->loader()->stopAllLoaders(clearProvisionalItemPolicy);
}
-void FrameLoader::stopAllLoaders(DatabasePolicy databasePolicy, ClearProvisionalItemPolicy clearProvisionalItemPolicy)
+void FrameLoader::stopAllLoaders(ClearProvisionalItemPolicy clearProvisionalItemPolicy)
{
ASSERT(!m_frame->document() || !m_frame->document()->inPageCache());
if (m_pageDismissalEventBeingDispatched)
@@ -1713,11 +1710,11 @@
if (clearProvisionalItemPolicy == ShouldClearProvisionalItem)
history()->setProvisionalItem(0);
- stopLoadingSubframes(databasePolicy, clearProvisionalItemPolicy);
+ stopLoadingSubframes(clearProvisionalItemPolicy);
if (m_provisionalDocumentLoader)
- m_provisionalDocumentLoader->stopLoading(databasePolicy);
+ m_provisionalDocumentLoader->stopLoading();
if (m_documentLoader)
- m_documentLoader->stopLoading(databasePolicy);
+ m_documentLoader->stopLoading();
setProvisionalDocumentLoader(0);
@@ -2379,7 +2376,7 @@
// FIXME: can stopping loading here possibly have any effect, if isLoading is false,
// which it must be to be in this branch of the if? And is it OK to just do a full-on
// stopAllLoaders instead of stopLoadingSubframes?
- stopLoadingSubframes(DatabasePolicyStop, ShouldNotClearProvisionalItem);
+ stopLoadingSubframes(ShouldNotClearProvisionalItem);
pdl->stopLoading();
// If we're in the middle of loading multipart data, we need to restore the document loader.
@@ -2984,7 +2981,7 @@
FrameLoadType type = policyChecker()->loadType();
// A new navigation is in progress, so don't clear the history's provisional item.
- stopAllLoaders(DatabasePolicyStop, ShouldNotClearProvisionalItem);
+ stopAllLoaders(ShouldNotClearProvisionalItem);
// <rdar://problem/6250856> - In certain circumstances on pages with multiple frames, stopAllLoaders()
// might detach the current FrameLoader, in which case we should bail on this newly defunct load.