Changeset 49828 in webkit
- Timestamp:
- Oct 19, 2009 6:28:44 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r49827 r49828 1 2009-10-19 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Move sendRemainingDelegateMessages to ResourceLoadNotifier 6 https://bugs.webkit.org/show_bug.cgi?id=30531 7 8 This method is about notifying folks and doesn't interact with the rest 9 of FrameLoader. 10 11 * loader/FrameLoader.cpp: 12 (WebCore::FrameLoader::willLoadMediaElementURL): 13 (WebCore::FrameLoader::commitProvisionalLoad): 14 (WebCore::FrameLoader::loadResourceSynchronously): 15 (WebCore::FrameLoader::loadedResourceFromMemoryCache): 16 * loader/FrameLoader.h: 17 * loader/ResourceLoadNotifier.cpp: 18 (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages): 19 * loader/ResourceLoadNotifier.h: 20 1 21 2009-10-19 Adam Barth <abarth@webkit.org> 2 22 -
trunk/WebCore/loader/FrameLoader.cpp
r49809 r49828 2044 2044 ResourceError error; 2045 2045 requestFromDelegate(request, identifier, error); 2046 sendRemainingDelegateMessages(identifier, ResourceResponse(url, String(), -1, String(), String()), -1, error);2046 notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, ResourceResponse(url, String(), -1, String(), String()), -1, error); 2047 2047 2048 2048 url = request.url(); … … 2412 2412 // However, with today's computers and networking speeds, this won't happen in practice. 2413 2413 // Could be an issue with a giant local file. 2414 sendRemainingDelegateMessages(identifier, response, static_cast<int>(response.expectedContentLength()), error);2414 notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, response, static_cast<int>(response.expectedContentLength()), error); 2415 2415 } 2416 2416 … … 3264 3264 #endif 3265 3265 } 3266 3267 sendRemainingDelegateMessages(identifier, response, data.size(), error);3266 3267 notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, response, data.size(), error); 3268 3268 return identifier; 3269 3269 } … … 3479 3479 } 3480 3480 3481 void FrameLoader::sendRemainingDelegateMessages(unsigned long identifier, const ResourceResponse& response, int length, const ResourceError& error)3482 {3483 if (!response.isNull())3484 notifier()->dispatchDidReceiveResponse(m_documentLoader.get(), identifier, response);3485 3486 if (length > 0)3487 notifier()->dispatchDidReceiveContentLength(m_documentLoader.get(), identifier, length);3488 3489 if (error.isNull())3490 notifier()->dispatchDidFinishLoading(m_documentLoader.get(), identifier);3491 else3492 m_client->dispatchDidFailLoading(m_documentLoader.get(), identifier, error);3493 }3494 3495 3481 void FrameLoader::requestFromDelegate(ResourceRequest& request, unsigned long& identifier, ResourceError& error) 3496 3482 { … … 3542 3528 ResourceError error; 3543 3529 requestFromDelegate(request, identifier, error); 3544 sendRemainingDelegateMessages(identifier, resource->response(), resource->encodedSize(), error);3530 notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, resource->response(), resource->encodedSize(), error); 3545 3531 } 3546 3532 -
trunk/WebCore/loader/FrameLoader.h
r49809 r49828 404 404 bool shouldReload(const KURL& currentURL, const KURL& destinationURL); 405 405 406 void sendRemainingDelegateMessages(unsigned long identifier, const ResourceResponse&, int length, const ResourceError&);407 406 void requestFromDelegate(ResourceRequest&, unsigned long& identifier, ResourceError&); 408 407 -
trunk/WebCore/loader/ResourceLoadNotifier.cpp
r49671 r49828 166 166 } 167 167 168 void ResourceLoadNotifier::sendRemainingDelegateMessages(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& response, int length, const ResourceError& error) 169 { 170 if (!response.isNull()) 171 dispatchDidReceiveResponse(loader, identifier, response); 172 173 if (length > 0) 174 dispatchDidReceiveContentLength(loader, identifier, length); 175 176 if (error.isNull()) 177 dispatchDidFinishLoading(loader, identifier); 178 else 179 m_frame->loader()->client()->dispatchDidFailLoading(loader, identifier, error); 180 } 181 168 182 DocumentLoader* ResourceLoadNotifier::activeDocumentLoader() const 169 183 { -
trunk/WebCore/loader/ResourceLoadNotifier.h
r49706 r49828 65 65 void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier); 66 66 67 void sendRemainingDelegateMessages(DocumentLoader*, unsigned long identifier, const ResourceResponse&, int length, const ResourceError&); 68 67 69 private: 68 70 inline DocumentLoader* activeDocumentLoader() const;
Note: See TracChangeset
for help on using the changeset viewer.