[webkit-dev] Blob scheme implementation
Maciej Stachowiak
mjs at apple.com
Tue Sep 14 17:52:30 PDT 2010
On Sep 14, 2010, at 5:22 PM, Adam Barth wrote:
>
> In some sense, this is analogous to adding an HTTPResourceHandle and
> implementing the HTTP protocol inside of WebCore. While its true that
> most (all?) users of WebKit will need to wire WebCore up to an HTTP
> library, that doesn't necessarily mean that WebCore should contain an
> implementation of the HTTP protocol. In the same way, even if a large
> number of WebKit users will wish to support the blob URL scheme, that
> doesn't necessarily mean that WebCore should contain an implementation
> of the scheme.
>
> I can certainly see the appeal of sharing the blob URL implementation
> code between different ports of WebKit, but we can achieve that goal
> in a number of ways, including creating an external library or a
> separate BlobCore module.
I'm not sure about this. The reason WebKit defers to a port-specific library for networking originally stemmed from the desire to integrate with existing libraries that might have non-Web clients. While this has some benefits, it also has some costs - many aspects of the HTTP stack have compatibility impact and so WebKit-based browsers vary more in their Web-facing behavior than they would otherwise.
In the case of the blob: scheme, my understanding is that it makes no sense outside the browser context, and has tight interactions with other parts of the platform - for instance, my understanding is that blob: URLs are not permanent but rather may cease to be valid as some point (correct me if I'm wrong).
This makes me think that blob: URLs are maybe more like javascript: URLs, in that trying to make them part of the network library would actually produce layering violations rather than resolving them, and would not in practice benefit non-browser clients of those libraries. Threading javascript: URLs through the network stack only to pop back to WebCore to do the actual processing would be silly. I think maybe blob: is the same way, though to a lesser degree.
Regard,
Maciej
More information about the webkit-dev
mailing list