diff options
Diffstat (limited to 'WebCore/loader/DocumentLoader.cpp')
-rw-r--r-- | WebCore/loader/DocumentLoader.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/WebCore/loader/DocumentLoader.cpp b/WebCore/loader/DocumentLoader.cpp index 12be864..bdf83a8 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 @@ -296,7 +295,7 @@ void DocumentLoader::stopLoading() // still parsing. Failure to do so can cause a world leak. Document* doc = m_frame->document(); - if (loading || (doc && doc->parsing())) + if (loading || doc->parsing()) m_frame->loader()->stopLoading(false); } @@ -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(); |