void FrameFetchContext::sendRemainingDelegateMessages(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& response, int dataLength) { if (!response.isNull()) dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); if (dataLength > 0) dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength, 0); dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); }
void HTMLImportChild::wasAlreadyLoaded() { ASSERT(!m_loader); ASSERT(m_client); ensureLoader(); stateWillChange(); }
void FrameFetchContext::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r, ResourceLoader* resourceLoader) { m_frame->loader().progress().incrementProgress(identifier, r); m_frame->loader().client()->dispatchDidReceiveResponse(loader, identifier, r); TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ResourceReceiveResponse", "data", InspectorReceiveResponseEvent::data(identifier, m_frame, r)); // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeline migrates to tracing. InspectorInstrumentation::didReceiveResourceResponse(m_frame, identifier, ensureLoader(loader), r, resourceLoader); }
void FrameFetchContext::dispatchDidFinishLoading(DocumentLoader* loader, unsigned long identifier, double finishTime, int64_t encodedDataLength) { m_frame->loader().progress().completeProgress(identifier); m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier); TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ResourceFinish", "data", InspectorResourceFinishEvent::data(identifier, finishTime, false)); // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeline migrates to tracing. InspectorInstrumentation::didFinishLoading(m_frame, identifier, ensureLoader(loader), finishTime, encodedDataLength); }
void FrameFetchContext::dispatchWillSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse, const FetchInitiatorInfo& initiatorInfo) { m_frame->loader().applyUserAgent(request); m_frame->loader().client()->dispatchWillSendRequest(loader, identifier, request, redirectResponse); TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ResourceSendRequest", "data", InspectorSendRequestEvent::data(identifier, m_frame, request)); TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "CallStack", "stack", InspectorCallStackEvent::currentCallStack()); // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeline migrates to tracing. InspectorInstrumentation::willSendRequest(m_frame, identifier, ensureLoader(loader), request, redirectResponse, initiatorInfo); }
void HTMLImportChild::startLoading(const ResourcePtr<RawResource>& resource) { ASSERT(!this->resource()); ASSERT(!m_loader); setResource(resource); ensureLoader(); }
void HTMLImportChild::stateDidChange() { HTMLImport::stateDidChange(); // Once all preceding imports are loaded, // HTMLImportChild can decide whether it should load the import by itself // or it can share existing one. if (!state().shouldBlockDocumentCreation()) ensureLoader(); if (state().isReady()) didFinish(); }
void HTMLImportChild::startLoading(const ResourcePtr<RawResource>& resource) { ASSERT(!this->resource()); ASSERT(!m_loader); if (isCreatedByParser()) { ASSERT(!m_customElementMicrotaskStep); m_customElementMicrotaskStep = CustomElement::didCreateImport(this); } setResource(resource); // If the node is "document blocked", it cannot create HTMLImportLoader // even if there is no sharable one found, as there is possibility that // preceding imports load the sharable imports. // In that case preceding one should win because it comes first in the tree order. // See also didUnblockFromCreatingDocument(). if (state().shouldBlockDocumentCreation()) return; ensureLoader(); }
void HTMLImportChild::stateWillChange() { toHTMLImportsController(root())->scheduleRecalcState(); ensureLoader(); }