Changeset 67291 in webkit
- Timestamp:
- Sep 11, 2010 12:54:15 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r67288 r67291 1 2010-09-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 3 Reviewed by Darin Adler. 4 5 Add NetworkingContext to avoid layer violations 6 https://bugs.webkit.org/show_bug.cgi?id=42292 7 8 Activate NetworkingContext: 9 10 Since the ResourceHandle::create, ResourceHandle::start and 11 ResourceHandle::loadResourceSynchronously API's were modified, 12 having their Frame* parameter substituted by a NetworkingContext*, 13 all implementations of them were also modified. 14 This patch also modifies all functions that were calling the above 15 ones. 16 17 * loader/FrameLoader.cpp: 18 (WebCore::FrameLoader::loadResourceSynchronously): 19 * loader/FrameLoader.h: 20 * loader/MainResourceLoader.cpp: 21 (WebCore::MainResourceLoader::loadNow): 22 * loader/PingLoader.cpp: 23 (WebCore::PingLoader::PingLoader): 24 * loader/ResourceLoader.cpp: 25 (WebCore::ResourceLoader::load): 26 * loader/appcache/ApplicationCacheGroup.cpp: 27 (WebCore::ApplicationCacheGroup::createResourceHandle): 28 * loader/icon/IconFetcher.cpp: 29 (WebCore::IconFetcher::loadEntry): 30 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: 31 (webKitWebSrcStart): 32 * platform/network/ResourceHandle.cpp: 33 (WebCore::ResourceHandle::create): 34 * platform/network/ResourceHandle.h: 35 * platform/network/ResourceHandleInternal.h: 36 (WebCore::ResourceHandleInternal::ResourceHandleInternal): 37 * platform/network/cf/ResourceHandleCFNet.cpp: 38 (WebCore::ResourceHandle::start): 39 (WebCore::ResourceHandle::loadResourceSynchronously): 40 * platform/network/curl/ResourceHandleCurl.cpp: 41 (WebCore::ResourceHandle::start): 42 (WebCore::ResourceHandle::loadResourceSynchronously): 43 * platform/network/mac/ResourceHandleMac.mm: 44 (WebCore::ResourceHandle::start): 45 (WebCore::ResourceHandle::loadResourceSynchronously): 46 * platform/network/qt/QNetworkReplyHandler.cpp: 47 (WebCore::QNetworkReplyHandler::QNetworkReplyHandler): 48 (WebCore::QNetworkReplyHandler::sendResponseIfNeeded): 49 (WebCore::QNetworkReplyHandler::start): 50 * platform/network/qt/ResourceHandleQt.cpp: 51 (WebCore::ResourceHandle::start): 52 (WebCore::ResourceHandle::willLoadFromCache): 53 (WebCore::ResourceHandle::loadResourceSynchronously): 54 * platform/network/soup/ResourceHandleSoup.cpp: 55 * platform/network/win/ResourceHandleWin.cpp: 56 (WebCore::ResourceHandle::start): 57 1 58 2010-09-10 Jer Noble <jer.noble@apple.com> 2 59 -
trunk/WebCore/loader/FrameLoader.cpp
r67253 r67291 2766 2766 if (!documentLoader()->applicationCacheHost()->maybeLoadSynchronously(newRequest, error, response, data)) { 2767 2767 #endif 2768 ResourceHandle::loadResourceSynchronously(ne wRequest, storedCredentials, error, response, data, m_frame);2768 ResourceHandle::loadResourceSynchronously(networkingContext(), newRequest, storedCredentials, error, response, data); 2769 2769 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 2770 2770 documentLoader()->applicationCacheHost()->maybeLoadFallbackSynchronously(newRequest, error, response, data); -
trunk/WebCore/loader/FrameLoader.h
r67224 r67291 330 330 bool pageDismissalEventBeingDispatched() const { return m_pageDismissalEventBeingDispatched; } 331 331 332 inlineNetworkingContext* networkingContext() const;332 NetworkingContext* networkingContext() const; 333 333 334 334 private: -
trunk/WebCore/loader/MainResourceLoader.cpp
r67224 r67291 539 539 handleEmptyLoad(url, !shouldLoadEmpty); 540 540 else 541 m_handle = ResourceHandle::create( r, this, m_frame.get(), false, true);541 m_handle = ResourceHandle::create(m_frame->loader()->networkingContext(), r, this, false, true); 542 542 543 543 return false; -
trunk/WebCore/loader/PingLoader.cpp
r66815 r67291 63 63 PingLoader::PingLoader(Frame* frame, const ResourceRequest& request) 64 64 { 65 m_handle = ResourceHandle::create( request, this, frame, false, false);65 m_handle = ResourceHandle::create(frame->loader()->networkingContext(), request, this, false, false); 66 66 } 67 67 -
trunk/WebCore/loader/ResourceLoader.cpp
r66674 r67291 36 36 #include "Frame.h" 37 37 #include "FrameLoader.h" 38 #include "FrameLoaderClient.h" 38 39 #include "InspectorTimelineAgent.h" 39 40 #include "Page.h" … … 144 145 } 145 146 146 m_handle = ResourceHandle::create( clientRequest, this, m_frame.get(), m_defersLoading, m_shouldContentSniff);147 m_handle = ResourceHandle::create(m_frame->loader()->networkingContext(), clientRequest, this, m_defersLoading, m_shouldContentSniff); 147 148 148 149 return true; -
trunk/WebCore/loader/appcache/ApplicationCacheGroup.cpp
r64613 r67291 40 40 #include "Frame.h" 41 41 #include "FrameLoader.h" 42 #include "FrameLoaderClient.h" 42 43 #include "MainResourceLoader.h" 43 44 #include "ManifestParser.h" … … 480 481 } 481 482 482 RefPtr<ResourceHandle> handle = ResourceHandle::create( request, this, m_frame, false, true);483 RefPtr<ResourceHandle> handle = ResourceHandle::create(m_frame->loader()->networkingContext(), request, this, false, true); 483 484 #if ENABLE(INSPECTOR) 484 485 // Because willSendRequest only gets called during redirects, we initialize -
trunk/WebCore/loader/icon/IconFetcher.cpp
r65468 r67291 28 28 29 29 #include "Frame.h" 30 #include "FrameLoaderClient.h" 30 31 #include "HTMLHeadElement.h" 31 32 #include "HTMLLinkElement.h" … … 174 175 ASSERT(!m_handle); 175 176 176 m_handle = ResourceHandle::create(m_ entries[m_currentEntry].url(), this, m_frame, false, false);177 m_handle = ResourceHandle::create(m_frame->loader()->networkingContext(), m_entries[m_currentEntry].url(), this, false, false); 177 178 } 178 179 -
trunk/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
r66887 r67291 24 24 #include "GOwnPtr.h" 25 25 #include "GRefPtr.h" 26 #include "NetworkingContext.h" 26 27 #include "Noncopyable.h" 27 28 #include "NotImplemented.h" … … 392 393 request.setAllowCookies(true); 393 394 395 NetworkingContext* context = 0; 394 396 if (priv->frame) { 395 397 Document* document = priv->frame->document(); … … 398 400 399 401 FrameLoader* loader = priv->frame->loader(); 400 if (loader) 402 if (loader) { 401 403 loader->addExtraFieldsToSubresourceRequest(request); 404 context = loader->networkingContext(); 405 } 402 406 } 403 407 … … 420 424 request.setHTTPHeaderField("transferMode.dlna", "Streaming"); 421 425 422 priv->resourceHandle = ResourceHandle::create( request, priv->client, 0, false, false);426 priv->resourceHandle = ResourceHandle::create(context, request, priv->client, false, false); 423 427 if (!priv->resourceHandle) { 424 428 GST_ERROR_OBJECT(src, "Failed to create ResourceHandle"); -
trunk/WebCore/platform/network/NetworkingContext.h
-
Property
svn:executable
set to
*
r65579 r67291 58 58 virtual String userAgent() const = 0; 59 59 virtual String referrer() const = 0; 60 virtual ResourceError blockedError(const ResourceRequest&) const = 0; 60 61 #endif 61 62 -
Property
svn:executable
set to
-
trunk/WebCore/platform/network/ResourceHandle.cpp
r65827 r67291 53 53 } 54 54 55 PassRefPtr<ResourceHandle> ResourceHandle::create(const ResourceRequest& request, ResourceHandleClient* client, 56 Frame* frame, bool defersLoading, bool shouldContentSniff) 55 PassRefPtr<ResourceHandle> ResourceHandle::create(NetworkingContext* context, const ResourceRequest& request, ResourceHandleClient* client, bool defersLoading, bool shouldContentSniff) 57 56 { 58 57 #if ENABLE(BLOB) … … 69 68 return newHandle.release(); 70 69 71 if (newHandle->start( frame))70 if (newHandle->start(context)) 72 71 return newHandle.release(); 73 72 -
trunk/WebCore/platform/network/ResourceHandle.h
r65827 r67291 30 30 #include "AuthenticationClient.h" 31 31 #include "HTTPHeaderMap.h" 32 #include "NetworkingContext.h" 32 33 #include "ThreadableLoader.h" 33 34 #include <wtf/OwnPtr.h> … … 110 111 111 112 public: 112 // FIXME: should not need the Frame 113 static PassRefPtr<ResourceHandle> create(const ResourceRequest&, ResourceHandleClient*, Frame*, bool defersLoading, bool shouldContentSniff); 114 static void loadResourceSynchronously(const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data, Frame* frame); 113 static PassRefPtr<ResourceHandle> create(NetworkingContext*, const ResourceRequest&, ResourceHandleClient*, bool defersLoading, bool shouldContentSniff); 114 static void loadResourceSynchronously(NetworkingContext*, const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data); 115 115 116 116 static void prepareForURL(const KURL&); … … 213 213 void scheduleFailure(FailureType); 214 214 215 bool start( Frame*);215 bool start(NetworkingContext*); 216 216 217 217 virtual void refAuthenticationClient() { ref(); } -
trunk/WebCore/platform/network/ResourceHandleInternal.h
r65835 r67291 52 52 53 53 #if PLATFORM(QT) 54 class QWebFrame;55 54 class QWebNetworkJob; 56 55 namespace WebCore { … … 122 121 , m_total(0) 123 122 , m_idleHandler(0) 124 , m_frame(0)125 123 #endif 126 124 #if PLATFORM(QT) 127 125 , m_job(0) 128 , m_frame(0)129 126 #endif 130 127 #if PLATFORM(MAC) … … 203 200 gsize m_bufferSize, m_total; 204 201 guint m_idleHandler; 205 Frame* m_frame;202 RefPtr<NetworkingContext> m_context; 206 203 #endif 207 204 #if PLATFORM(QT) 208 205 QNetworkReplyHandler* m_job; 209 QWebFrame* m_frame;206 RefPtr<NetworkingContext> m_context; 210 207 #endif 211 208 -
trunk/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
-
Property
svn:executable
set to
*
r66963 r67291 433 433 } 434 434 435 bool ResourceHandle::start(Frame* frame) 436 { 437 // If we are no longer attached to a Page, this must be an attempted load from an 438 // onUnload handler, so let's just block it. 439 if (!frame->page()) 435 bool ResourceHandle::start(NetworkingContext* context) 436 { 437 if (!context) 438 return false; 439 440 // If NetworkingContext is invalid then we are no longer attached to a Page, 441 // this must be an attempted load from an unload handler, so let's just block it. 442 if (!context->isValid()) 440 443 return false; 441 444 … … 616 619 } 617 620 618 void ResourceHandle::loadResourceSynchronously( const ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& error, ResourceResponse& response, Vector<char>& vector, Frame* frame)621 void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, const ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& error, ResourceResponse& response, Vector<char>& vector) 619 622 { 620 623 LOG(Network, "ResourceHandle::loadResourceSynchronously:%s allowStoredCredentials:%u", request.url().string().utf8().data(), storedCredentials); … … 630 633 RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(request, client.get(), false /*defersLoading*/, true /*shouldContentSniff*/)); 631 634 632 if ( handle->d->m_scheduledFailureType != NoFailure) {633 error = frame->loader()->blockedError(request);635 if (context && handle->d->m_scheduledFailureType != NoFailure) { 636 error = context->blockedError(request); 634 637 return; 635 638 } -
Property
svn:executable
set to
-
trunk/WebCore/platform/network/curl/ResourceHandleCurl.cpp
r66963 r67291 104 104 } 105 105 106 bool ResourceHandle::start( Frame* frame)106 bool ResourceHandle::start(NetworkingContext* context) 107 107 { 108 108 // The frame could be null if the ResourceHandle is not associated to any 109 109 // Frame, e.g. if we are downloading a file. 110 110 // If the frame is not null but the page is null this must be an attempted 111 // load from an onUnload handler, so let's just block it. 112 if (frame && !frame->page()) 111 // load from an unload handler, so let's just block it. 112 // If both the frame and the page are not null the context is valid. 113 if (context && !context->isValid()) 113 114 return false; 114 115 … … 188 189 } 189 190 190 void ResourceHandle::loadResourceSynchronously( const ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& error, ResourceResponse& response, Vector<char>& data, Frame*)191 void ResourceHandle::loadResourceSynchronously(NetworkingContext*, const ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& error, ResourceResponse& response, Vector<char>& data) 191 192 { 192 193 WebCoreSynchronousLoader syncLoader; -
trunk/WebCore/platform/network/mac/ResourceHandleMac.mm
r66963 r67291 261 261 } 262 262 263 bool ResourceHandle::start( Frame* frame)264 { 265 if (! frame)263 bool ResourceHandle::start(NetworkingContext* context) 264 { 265 if (!context) 266 266 return false; 267 267 268 268 BEGIN_BLOCK_OBJC_EXCEPTIONS; 269 269 270 // If we are no longer attached to a Page, this must be an attempted load from an 271 // onUnload handler, so let's just block it. 272 Page* page = frame->page(); 273 if (!page) 270 // If NetworkingContext is invalid then we are no longer attached to a Page, 271 // this must be an attempted load from an unload event handler, so let's just block it. 272 if (!context->isValid()) 274 273 return false; 275 274 … … 294 293 #endif 295 294 296 d->m_needsSiteSpecificQuirks = frame->settings() && frame->settings()->needsSiteSpecificQuirks();295 d->m_needsSiteSpecificQuirks = context->needsSiteSpecificQuirks(); 297 296 298 297 createNSURLConnection( 299 298 d->m_proxy.get(), 300 299 shouldUseCredentialStorage, 301 d->m_shouldContentSniff || frame->settings()->localFileContentSniffingEnabled());300 d->m_shouldContentSniff || context->localFileContentSniffingEnabled()); 302 301 303 302 #ifndef BUILDING_ON_TIGER 304 303 bool scheduled = false; 305 if (SchedulePairHashSet* scheduledPairs = page->scheduledRunLoopPairs()) {304 if (SchedulePairHashSet* scheduledPairs = context->scheduledRunLoopPairs()) { 306 305 SchedulePairHashSet::iterator end = scheduledPairs->end(); 307 306 for (SchedulePairHashSet::iterator it = scheduledPairs->begin(); it != end; ++it) { … … 462 461 } 463 462 464 void ResourceHandle::loadResourceSynchronously( const ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& error, ResourceResponse& response, Vector<char>& data, Frame* frame)463 void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, const ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& error, ResourceResponse& response, Vector<char>& data) 465 464 { 466 465 LOG(Network, "ResourceHandle::loadResourceSynchronously:%@ allowStoredCredentials:%u", request.nsURLRequest(), storedCredentials); … … 484 483 RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(request, client.get(), false /*defersLoading*/, true /*shouldContentSniff*/)); 485 484 486 if ( handle->d->m_scheduledFailureType != NoFailure) {487 error = frame->loader()->blockedError(request);485 if (context && handle->d->m_scheduledFailureType != NoFailure) { 486 error = context->blockedError(request); 488 487 return; 489 488 } … … 492 491 handle->delegate(), // A synchronous request cannot turn into a download, so there is no need to proxy the delegate. 493 492 storedCredentials == AllowStoredCredentials, 494 handle->shouldContentSniff() || frame->settings()->localFileContentSniffingEnabled());493 handle->shouldContentSniff() || (context && context->localFileContentSniffingEnabled())); 495 494 496 495 [handle->connection() scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:WebCoreSynchronousLoaderRunLoopMode]; … … 508 507 #else 509 508 UNUSED_PARAM(storedCredentials); 510 UNUSED_PARAM( frame);509 UNUSED_PARAM(context); 511 510 NSURLRequest *firstRequest = request.nsURLRequest(); 512 511 -
trunk/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
r65021 r67291 172 172 m_method = QNetworkAccessManager::UnknownOperation; 173 173 174 m_request = r.toNetworkRequest(m_resourceHandle->getInternal()->m_frame); 174 QObject* originatingObject = 0; 175 if (m_resourceHandle->getInternal()->m_context) 176 originatingObject = m_resourceHandle->getInternal()->m_context->originatingObject(); 177 178 m_request = r.toNetworkRequest(originatingObject); 175 179 176 180 if (m_loadMode == LoadNormal) … … 375 379 return; 376 380 377 m_request = newRequest.toNetworkRequest(m_resourceHandle->getInternal()->m_frame); 381 QObject* originatingObject = 0; 382 if (m_resourceHandle->getInternal()->m_context) 383 originatingObject = m_resourceHandle->getInternal()->m_context->originatingObject(); 384 385 m_request = newRequest.toNetworkRequest(originatingObject); 378 386 return; 379 387 } … … 427 435 ResourceHandleInternal* d = m_resourceHandle->getInternal(); 428 436 429 QNetworkAccessManager* manager = d->m_frame->page()->networkAccessManager(); 437 QNetworkAccessManager* manager = 0; 438 if (d->m_context) 439 manager = d->m_context->networkAccessManager(); 440 441 if (!manager) 442 return; 430 443 431 444 const QUrl url = m_request.url(); -
trunk/WebCore/platform/network/qt/ResourceHandleQt.cpp
r66963 r67291 34 34 #include "CachedResourceLoader.h" 35 35 #include "Frame.h" 36 #include "FrameNetworkingContext.h" 36 37 #include "FrameLoaderClientQt.h" 37 38 #include "NotImplemented.h" … … 116 117 } 117 118 118 bool ResourceHandle::start(Frame* frame) 119 { 120 if (!frame) 121 return false; 122 123 Page *page = frame->page(); 124 // If we are no longer attached to a Page, this must be an attempted load from an 125 // onUnload handler, so let's just block it. 126 if (!page) 119 bool ResourceHandle::start(NetworkingContext* context) 120 { 121 // If NetworkingContext is invalid then we are no longer attached to a Page, 122 // this must be an attempted load from an unload event handler, so let's just block it. 123 if (context && !context->isValid()) 127 124 return false; 128 125 … … 136 133 } 137 134 138 getInternal()->m_ frame = static_cast<FrameLoaderClientQt*>(frame->loader()->client())->webFrame();135 getInternal()->m_context = context; 139 136 ResourceHandleInternal *d = getInternal(); 140 137 d->m_job = new QNetworkReplyHandler(this, QNetworkReplyHandler::LoadMode(d->m_defersLoading)); … … 160 157 return false; 161 158 162 QNetworkAccessManager* manager = QWebFramePrivate::kit(frame)->page()->networkAccessManager(); 163 QAbstractNetworkCache* cache = manager->cache(); 159 QNetworkAccessManager* manager = 0; 160 QAbstractNetworkCache* cache = 0; 161 if (frame->loader()->networkingContext()) { 162 manager = frame->loader()->networkingContext()->networkAccessManager(); 163 cache = manager->cache(); 164 } 164 165 165 166 if (!cache) … … 186 187 } 187 188 188 void ResourceHandle::loadResourceSynchronously( const ResourceRequest& request, StoredCredentials /*storedCredentials*/, ResourceError& error, ResourceResponse& response, Vector<char>& data, Frame* frame)189 void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, const ResourceRequest& request, StoredCredentials /*storedCredentials*/, ResourceError& error, ResourceResponse& response, Vector<char>& data) 189 190 { 190 191 WebCoreSynchronousLoader syncLoader; … … 200 201 d->m_firstRequest.setURL(urlWithCredentials); 201 202 } 202 d->m_ frame = static_cast<FrameLoaderClientQt*>(frame->loader()->client())->webFrame();203 d->m_context = context; 203 204 d->m_job = new QNetworkReplyHandler(handle.get(), QNetworkReplyHandler::LoadNormal); 204 205 … … 209 210 } 210 211 211 212 212 void ResourceHandle::platformSetDefersLoading(bool defers) 213 213 { -
trunk/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r66963 r67291 579 579 } 580 580 581 bool ResourceHandle::start( Frame* frame)581 bool ResourceHandle::start(NetworkingContext* context) 582 582 { 583 583 ASSERT(!d->m_msg); 584 585 584 586 585 // The frame could be null if the ResourceHandle is not associated to any 587 586 // Frame, e.g. if we are downloading a file. 588 587 // If the frame is not null but the page is null this must be an attempted 589 // load from an onUnload handler, so let's just block it. 590 if (frame && !frame->page()) 588 // load from an unload handler, so let's just block it. 589 // If both the frame and the page are not null the context is valid. 590 if (context && !context->isValid()) 591 591 return false; 592 592 … … 596 596 597 597 // Used to set the authentication dialog toplevel; may be NULL 598 d->m_ frame = frame;598 d->m_context = context; 599 599 600 600 if (equalIgnoringCase(protocol, "data")) … … 656 656 } 657 657 658 void ResourceHandle::loadResourceSynchronously( const ResourceRequest& request, StoredCredentials /*storedCredentials*/, ResourceError& error, ResourceResponse& response, Vector<char>& data, Frame* frame)658 void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, const ResourceRequest& request, StoredCredentials /*storedCredentials*/, ResourceError& error, ResourceResponse& response, Vector<char>& data) 659 659 { 660 660 WebCoreSynchronousLoader syncLoader(error, response, data); … … 663 663 // https://bugs.webkit.org/show_bug.cgi?id=41823 664 664 RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(request, &syncLoader, true, false)); 665 handle->start( frame);665 handle->start(context); 666 666 667 667 syncLoader.run(); -
trunk/WebCore/platform/network/win/ResourceHandleWin.cpp
r66963 r67291 407 407 } 408 408 409 bool ResourceHandle::start( Frame* frame)409 bool ResourceHandle::start(NetworkingContext* context) 410 410 { 411 411 ref(); … … 416 416 static HINTERNET internetHandle = 0; 417 417 if (!internetHandle) { 418 String userAgentStr = frame->loader()->userAgent(request().url()) + String("", 1);418 String userAgentStr = context->userAgent() + String("", 1); 419 419 LPCWSTR userAgent = reinterpret_cast<const WCHAR*>(userAgentStr.characters()); 420 420 // leak the Internet for now … … 439 439 // InternetConnect followed by HttpSendRequest. 440 440 HINTERNET urlHandle; 441 String referrer = frame->loader()->referrer();441 String referrer = context->referrer(); 442 442 if (request().httpMethod() == "POST") { 443 443 d->m_postReferrer = referrer; -
trunk/WebKit/chromium/ChangeLog
r67283 r67291 1 2010-09-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 3 Reviewed by Darin Adler. 4 5 Add NetworkingContext to avoid layer violations 6 https://bugs.webkit.org/show_bug.cgi?id=42292 7 8 * src/ResourceHandle.cpp: 9 (WebCore::ResourceHandle::create): 10 (WebCore::ResourceHandle::start): 11 (WebCore::ResourceHandle::loadResourceSynchronously): 12 1 13 2010-09-10 Sam Weinig <sam@webkit.org> 2 14 -
trunk/WebKit/chromium/src/ResourceHandle.cpp
r63770 r67291 212 212 } 213 213 214 PassRefPtr<ResourceHandle> ResourceHandle::create(const ResourceRequest& request, 214 PassRefPtr<ResourceHandle> ResourceHandle::create(NetworkingContext* context, 215 const ResourceRequest& request, 215 216 ResourceHandleClient* client, 216 Frame* deprecated,217 217 bool defersLoading, 218 218 bool shouldContentSniff) … … 221 221 request, client, defersLoading, shouldContentSniff)); 222 222 223 if (newHandle->start( deprecated))223 if (newHandle->start(context)) 224 224 return newHandle.release(); 225 225 … … 247 247 } 248 248 249 bool ResourceHandle::start( Frame* deprecated)249 bool ResourceHandle::start(NetworkingContext* context) 250 250 { 251 251 d->start(); … … 289 289 290 290 // static 291 void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request, 291 void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, 292 const ResourceRequest& request, 292 293 StoredCredentials storedCredentials, 293 294 ResourceError& error, 294 295 ResourceResponse& response, 295 Vector<char>& data, 296 Frame* deprecated) 296 Vector<char>& data) 297 297 { 298 298 OwnPtr<WebURLLoader> loader(webKitClient()->createURLLoader()); -
trunk/WebKit/gtk/ChangeLog
r67275 r67291 1 2010-09-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 3 Reviewed by Darin Adler. 4 5 Add NetworkingContext to avoid layer violations 6 https://bugs.webkit.org/show_bug.cgi?id=42292 7 8 * webkit/webkitdownload.cpp: 9 (webkit_download_start): 10 * webkit/webkitprivate.cpp: 11 (currentToplevelCallback): 12 1 13 2010-09-10 Sam Weinig <sam@webkit.org> 2 14 -
trunk/WebKit/gtk/webkit/webkitdownload.cpp
r66024 r67291 486 486 g_return_if_fail(priv->timer == NULL); 487 487 488 // For GTK, when downloading a file NetworkingContext is null 488 489 if (!priv->resourceHandle) 489 priv->resourceHandle = ResourceHandle::create( core(priv->networkRequest), priv->downloadClient, 0, false, false);490 priv->resourceHandle = ResourceHandle::create(/* Null NetworkingContext */ NULL, core(priv->networkRequest), priv->downloadClient, false, false); 490 491 else { 491 492 priv->resourceHandle->setClient(priv->downloadClient); -
trunk/WebKit/gtk/webkit/webkitprivate.cpp
r65899 r67291 28 28 #include "FrameLoader.h" 29 29 #include "FrameLoaderClientGtk.h" 30 #include "FrameNetworkingContextGtk.h" 30 31 #include "GtkVersioning.h" 31 32 #include "HTMLMediaElement.h" … … 206 207 return NULL; 207 208 208 WebCore::Frame* frame = d->m_frame; 209 if (!frame) 210 return NULL; 211 212 GtkWidget* toplevel = gtk_widget_get_toplevel(GTK_WIDGET(frame->page()->chrome()->platformPageClient())); 209 WebKit::FrameNetworkingContextGtk* context = static_cast<WebKit::FrameNetworkingContextGtk*>(d->m_context.get()); 210 if (!context) 211 return NULL; 212 213 if (!context->coreFrame()) 214 return NULL; 215 216 GtkWidget* toplevel = gtk_widget_get_toplevel(GTK_WIDGET(context->coreFrame()->page()->chrome()->platformPageClient())); 213 217 if (gtk_widget_is_toplevel(toplevel)) 214 218 return toplevel; -
trunk/WebKit/win/ChangeLog
r67285 r67291 1 2010-09-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 3 Reviewed by Darin Adler. 4 5 Add NetworkingContext to avoid layer violations 6 https://bugs.webkit.org/show_bug.cgi?id=42292 7 8 * WebCoreSupport/WebFrameNetworkingContext.cpp: 9 (WebFrameNetworkingContext::blockedError): 10 * WebCoreSupport/WebFrameNetworkingContext.h: 11 1 12 2010-09-10 Jer Noble <jer.noble@apple.com> 2 13 -
trunk/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.cpp
-
Property
svn:executable
set to
*
r66794 r67291 38 38 return frame()->loader()->referrer(); 39 39 } 40 41 WebCore::ResourceError WebFrameNetworkingContext::blockedError(const WebCore::ResourceRequest& request) const 42 { 43 return frame()->loader()->blockedError(request); 44 } -
Property
svn:executable
set to
-
trunk/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.h
-
Property
svn:executable
set to
*
r65579 r67291 22 22 23 23 #include <WebCore/FrameNetworkingContext.h> 24 #include <WebCore/ResourceError.h> 24 25 25 26 class WebFrameNetworkingContext : public WebCore::FrameNetworkingContext { … … 36 37 virtual WTF::String userAgent() const; 37 38 virtual WTF::String referrer() const; 39 virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const; 38 40 39 41 WTF::String m_userAgent; -
Property
svn:executable
set to
-
trunk/WebKit2/ChangeLog
r67287 r67291 1 2010-09-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 3 Reviewed by Darin Adler. 4 5 Add NetworkingContext to avoid layer violations 6 https://bugs.webkit.org/show_bug.cgi?id=42292 7 8 * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.cpp: 9 * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h: 10 (WebFrameNetworkingContext::create): 11 1 12 2010-09-10 Sam Weinig <sam@webkit.org> 2 13 -
trunk/WebKit2/WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h
-
Property
svn:executable
set to
*
r66794 r67291 22 22 23 23 #include <WebCore/FrameNetworkingContext.h> 24 #include <WebCore/ResourceError.h> 25 #include <WebCore/ResourceRequest.h> 24 26 25 27 class WebFrameNetworkingContext : public WebCore::FrameNetworkingContext { 26 28 public: 27 static PassRefPtr<WebFrameNetworkingContext> create(WebCore::Frame* )29 static PassRefPtr<WebFrameNetworkingContext> create(WebCore::Frame* frame) 28 30 { 29 return 0;31 return adoptRef(new WebFrameNetworkingContext(frame)); 30 32 } 31 33 … … 38 40 virtual WTF::String userAgent() const; 39 41 virtual WTF::String referrer() const; 42 virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const; 40 43 41 44 WTF::String m_userAgent; -
Property
svn:executable
set to
Note: See TracChangeset
for help on using the changeset viewer.