diff options
Diffstat (limited to 'WebCore/loader/DocumentLoader.cpp')
-rw-r--r-- | WebCore/loader/DocumentLoader.cpp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/WebCore/loader/DocumentLoader.cpp b/WebCore/loader/DocumentLoader.cpp index 12be864..d0443e8 100644 --- a/WebCore/loader/DocumentLoader.cpp +++ b/WebCore/loader/DocumentLoader.cpp @@ -118,8 +118,7 @@ static inline String canonicalizedTitle(const String& title, Frame* frame) buffer.shrink(builderIndex + 1); // Replace the backslashes with currency symbols if the encoding requires it. - if (frame->document()) - frame->document()->displayBufferModifiedByEncoding(buffer.characters(), buffer.length()); + frame->document()->displayBufferModifiedByEncoding(buffer.characters(), buffer.length()); return String::adopt(buffer); } @@ -156,7 +155,7 @@ DocumentLoader::DocumentLoader(const ResourceRequest& req, const SubstituteData& , m_loadingFromCachedPage(false) , m_stopRecordingResponses(false) , m_substituteResourceDeliveryTimer(this, &DocumentLoader::substituteResourceDeliveryTimerFired) - , m_urlForHistoryReflectsClientRedirect(false) + , m_didCreateGlobalHistoryEntry(false) #if ENABLE(OFFLINE_WEB_APPLICATIONS) , m_candidateApplicationCacheGroup(0) #endif @@ -284,7 +283,7 @@ void DocumentLoader::mainReceivedError(const ResourceError& error, bool isComple // one document at a time, but one document may have many related resources. // stopLoading will stop all loads initiated by the data source, // but not loads initiated by child frames' data sources -- that's the WebFrame's job. -void DocumentLoader::stopLoading() +void DocumentLoader::stopLoading(DatabasePolicy databasePolicy) { // In some rare cases, calling FrameLoader::stopLoading could set m_loading to false. // (This can happen when there's a single XMLHttpRequest currently loading and stopLoading causes it @@ -296,8 +295,8 @@ void DocumentLoader::stopLoading() // still parsing. Failure to do so can cause a world leak. Document* doc = m_frame->document(); - if (loading || (doc && doc->parsing())) - m_frame->loader()->stopLoading(false); + if (loading || doc->parsing()) + m_frame->loader()->stopLoading(false, databasePolicy); } // Always cancel multipart loaders @@ -474,13 +473,12 @@ bool DocumentLoader::isLoadingInAPISense() const return true; if (!m_subresourceLoaders.isEmpty()) return true; - if (Document* doc = m_frame->document()) { - if (doc->docLoader()->requestCount()) + Document* doc = m_frame->document(); + if (doc->docLoader()->requestCount()) + return true; + if (Tokenizer* tok = doc->tokenizer()) + if (tok->processingData()) return true; - if (Tokenizer* tok = doc->tokenizer()) - if (tok->processingData()) - return true; - } } return frameLoader()->subframeIsLoading(); } @@ -559,8 +557,6 @@ PassRefPtr<ArchiveResource> DocumentLoader::subresource(const KURL& url) const return 0; Document* doc = m_frame->document(); - if (!doc) - return archiveResourceForURL(url); CachedResource* resource = doc->docLoader()->cachedResource(url); if (!resource || resource->preloadResult() == CachedResource::PreloadReferenced) @@ -575,8 +571,6 @@ void DocumentLoader::getSubresources(Vector<PassRefPtr<ArchiveResource> >& subre return; Document* document = m_frame->document(); - if (!document) - return; const DocLoader::DocumentResourceMap& allResources = document->docLoader()->allCachedResources(); DocLoader::DocumentResourceMap::const_iterator end = allResources.end(); |