void DocumentLoader::setupForReplaceByMIMEType(const String& newMIMEType) { if (!m_gotFirstByte) return; String oldMIMEType = m_response.mimeType(); if (!doesProgressiveLoad(oldMIMEType)) { frameLoader()->client()->revertToProvisionalState(this); setupForReplace(); RefPtr<SharedBuffer> resourceData = mainResourceData(); commitLoad(resourceData->data(), resourceData->size()); } frameLoader()->finishedLoadingDocument(this); m_writer.end(); frameLoader()->setReplacing(); m_gotFirstByte = false; if (doesProgressiveLoad(newMIMEType)) { frameLoader()->client()->revertToProvisionalState(this); setupForReplace(); } stopLoadingSubresources(); stopLoadingPlugIns(); #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML) clearArchiveResources(); #endif }
void DocumentLoader::setupForReplaceByMIMEType(const String& newMIMEType) { if (!m_gotFirstByte) return; String oldMIMEType = m_response.mimeType(); if (!doesProgressiveLoad(oldMIMEType)) { frameLoader()->revertToProvisional(this); setupForReplace(); RefPtr<SharedBuffer> resourceData = mainResourceData(); commitLoad(resourceData->data(), resourceData->size()); } frameLoader()->finishedLoadingDocument(this); m_frame->loader()->end(); frameLoader()->setReplacing(); m_gotFirstByte = false; if (doesProgressiveLoad(newMIMEType)) { frameLoader()->revertToProvisional(this); setupForReplace(); } stopLoadingSubresources(); stopLoadingPlugIns(); #if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size clearArchiveResources(); #endif }
void DocumentLoader::maybeFinishLoadingMultipartContent() { if (!doesProgressiveLoad(m_response.mimeType())) { frameLoader()->client()->revertToProvisionalState(this); setupForReplace(); RefPtr<SharedBuffer> resourceData = mainResourceData(); commitLoad(resourceData->data(), resourceData->size()); } }
void DocumentLoader::maybeFinishLoadingMultipartContent() { if (!frameLoader()->isReplacing()) return; frameLoader()->setupForReplace(); m_committed = false; RefPtr<ResourceBuffer> resourceData = mainResourceData(); commitLoad(resourceData->data(), resourceData->size()); }
void DocumentLoader::dataReceived(CachedResource* resource, const char* data, int length) { ASSERT(data); ASSERT(length); ASSERT_UNUSED(resource, resource == m_mainResource); ASSERT(!m_response.isNull()); ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading()); if (m_identifierForLoadWithoutResourceLoader) frameLoader()->notifier()->dispatchDidReceiveData(this, m_identifierForLoadWithoutResourceLoader, data, length, -1); m_applicationCacheHost->mainResourceDataReceived(data, length); m_timeOfLastDataReceived = monotonicallyIncreasingTime(); commitLoad(data, length); }
void DocumentLoader::receivedData(const char* data, int length) { m_gotFirstByte = true; if (doesProgressiveLoad(m_response.mimeType())) commitLoad(data, length); }
void DocumentLoader::receivedData(const char* data, int length) { if (!isMultipartReplacingLoad()) commitLoad(data, length); }