Bug 49764

Summary: [chromium] Add a mechanism for creating a WebURLLoader that is associated with a particular WebFrame
Product: WebKit Reporter: Darin Fisher (:fishd, Google) <fishd>
Component: WebKit APIAssignee: Darin Fisher (:fishd, Google) <fishd>
Status: RESOLVED FIXED    
Severity: Normal CC: ajwong, michaeln, scherkus
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
v1 patch
none
v2 patch dglazkov: review+

Description Darin Fisher (:fishd, Google) 2010-11-18 15:15:50 PST
[chromium] Add a mechanism for creating a WebURLLoader that is associated
with a particular WebFrame

This will be used by code that calls webKitClient()->createURLLoader()
from within the Chromium source tree.

An associated WebURLLoader should be treated like a subresource of the
WebFrame's document.

In a follow-up version, I will build AssociatedURLLoader on top of
WebCore::SubresourceLoader, but for now, I'm just moving code from
Chromium's repository into WebKit.
Comment 1 Darin Fisher (:fishd, Google) 2010-11-18 15:17:02 PST
Created attachment 74300 [details]
v1 patch
Comment 2 Michael Nordman 2010-11-18 16:12:10 PST
Comment on attachment 74300 [details]
v1 patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74300&action=review

This looks ok to me.

> WebKit/chromium/public/WebFrame.h:335
> +    // will, for example, be cancelled when WebFrame::stopLoading is called.

Until this is implemented in terms of SubresourceLoader, they'll run beyond stopLoading (i think). If that right maybe add a FIXME here to clarify the current behavior.

> WebKit/chromium/src/AssociatedURLLoader.h:50
> +    virtual void loadSynchronously(const WebURLRequest&, WebURLResponse&, WebURLError&, WebData& data);

No need for 'data' param name.
Comment 3 Darin Fisher (:fishd, Google) 2010-11-18 17:02:39 PST
Created attachment 74322 [details]
v2 patch

Thanks for the feedback Michael!
Comment 4 Dimitri Glazkov (Google) 2010-11-23 09:16:46 PST
Comment on attachment 74322 [details]
v2 patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74322&action=review

nit-nit

> WebKit/chromium/src/AssociatedURLLoader.cpp:79
> +void AssociatedURLLoader::PrepareRequest(WebURLRequest& request)

prepareRequest? :)
Comment 5 Darin Fisher (:fishd, Google) 2010-11-23 10:59:47 PST
Landed as http://trac.webkit.org/changeset/72616