On Feb 3, 2013, at 11:58 AM, Adam Barth <aba...@webkit.org> wrote:

> On Sun, Feb 3, 2013 at 11:46 AM, Adam Barth <aba...@webkit.org> wrote:
>> 
>> Yeah, another example is ResourceHandle, which is theoretically a
>> platform-agnostic abstraction but in reality is heavily constrained by
>> the capabilities of CFNetwork.
> 
> To be precise, the following WebKit API on Mac OS X is one of the root
> causes of these restrictions:
> 
> webView:resource:willSendRequest:redirectResponse:fromDataSource
> 
> This API imposes the requirement that WebCore::ResourceRequest can
> round-trip through NSURLRequest.  That means we're unable to improve
> WebCore::ResourceRequest beyond the limitations of NSURLRequest.

We will likely change things to make the WebKit API on Mac allocate the 
NSURLRequest on demand at the API interface, but it seems like that by itself 
wouldn't solve the problem. However, if ResourceRequest needs to carry data 
that NSURLRequest can't, we could save it and reassociate it when the delegate 
returns (assuming that in each case there is a clear answer to whether extra 
parameters should be copied or dropped). Arguably that latter step could be 
done now, depending on what extra fields we'd like to carry as a request.

This is one reason why in the WebKit2 API we use a wrapped representation of a 
resource request instead of exposing the network layer directly. I think this 
avoids the problem, though if it doesn't, it would be good to know while we 
still have some freedom to change things.

Regards,
Maciej






_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to