[webkit-dev] Support "registerProtocolHandler" in WebKit2

Gyuyoung Kim gyuyoung.kim at webkit.org
Mon Jul 6 18:33:33 PDT 2015


>The custom protocol handler feature of the WebKit2 API is for the
embedding native application to provide raw data to resource loads directly.
>While tangentially related to how registerProtocolHandler would work for
some uses, there’s numerous differences.

If so, custom protocol handler feature is different with role of
registerProtocolHandler. Thank you for your explanation about it.


>One key example: Since it was implemented for the native embedding
application (which is, of course, trusted) none of the normal web security
concerns have been taken into account.
>Also, since they’re for special-use native apps instead of a general web
browser, none of Sam’s concerns had to be accounted for:

For more detailed scenario in addition to Brady's explanation, I consider
below call sequence to use registerProtocolHandler.

 1. Custom scheme is registered by "registeredProtocolHandler()" in JS
 2. The registered scheme will be filtering in WebCore. (If unsupported
scheme is requested, security error happens.)
 3. Filtered scheme will be passed to application side (of course, which is
web browser or similar things)
 4. The application will register passed custom scheme and a callback to
call the native embedding application to WK2's network
     using "custom protocol handler feature", which was implemented in
WebKit2."

Thus, in my humble opinion, registerProtocolHandler will use the custom
protocol instead of complicating it.


Gyuyoung.

On Tue, Jul 7, 2015 at 1:56 AM, Brady Eidson <beidson at apple.com> wrote:

>
> On Jul 1, 2015, at 7:42 PM, Gyuyoung Kim <gyuyoung.kim at webkit.org> wrote:
>
> WebKit2 already has a similar feature, which is so-called *custom
> protocol* enabled by Mac, Gtk and EFL ports. However the custom protocol
> feature supports to register custom scheme
> through API layer instead of JavaScript. The registerProtocolHandler() is
> to support to register the custom scheme by means of JavaScript. I don't
> know yet why we can't support to register it
> from JavaScript.
>
>
> The custom protocol handler feature of the WebKit2 API is for the
> embedding native application to provide raw data to resource loads directly.
>
> While tangentially related to how registerProtocolHandler would work for
> some uses, there’s numerous differences.
>
> One key example: Since it was implemented for the native embedding
> application (which is, of course, trusted) none of the normal web security
> concerns have been taken into account.
>
> Also, since they’re for special-use native apps instead of a general web
> browser, none of Sam’s concerns had to be accounted for:
>
> On Jul 4, 2015, at 10:24 AM, Sam Weinig <weinig at apple.com> wrote:
>
> My concern with the registerProtocolHandler() API is that it complicates
> an already the very complicated area of custom protocols and a good
> implementation requires configuration UI (to choose which of potentially
> multiple apps/websites you want a specific protocol to go to) that I am not
> sure users are in the position make.
> ...
> From an implementation perspective I also have concerns.  How is this
> should the registration data be managed? Can it fit in the WebSiteData
> model we are using for other data? Does it account for non-persistent
> sessions?  And lastly, can we get the code size of supporting a feature
> like this to be smaller?
>
>
> I’m not crafting this reply as an argument against
> registerProtocolHandler, but rather to dispel the notion that exposing "WK2
> custom protocols” to JS is all we need to do to get registerProtocolHandler.
>
> ~Brady
>
> Gyuyoung.
>
> On Tue, Jun 16, 2015 at 10:43 AM, Gyuyoung Kim <gyuyoung.kim at webkit.org>
> wrote:
>
>> On Mon, Jun 8, 2015 at 9:39 AM, Darin Adler <darin at apple.com> wrote:
>>
>>> Sam, Anders, you haven’t replied to the thread since Maciej made his
>>> remarks two weeks ago. He asked what you dislike about the API.
>>
>>
>> It seems that some people hope to listen why you guys dislike about this
>> API as well as I want.
>>
>> Gyuyoung.
>>
>> On Thu, Jun 11, 2015 at 10:06 AM, Gyuyoung Kim <gyuyoung.kim at webkit.org>
>> wrote:
>>
>>> On Mon, Jun 8, 2015 at 12:02 PM, Michael Catanzaro <
>>> mcatanzaro at igalia.com> wrote:
>>>
>>>> On Sun, 2015-06-07 at 17:39 -0700, Darin Adler wrote:
>>>> > As one next step in the discussion, is there anyone that wants to
>>>> > present a use case for a protocol other than mailto?
>>>>
>>>> irc:// would be useful for those who don't like desktop clients.
>>>>
>>>>
>>> "geo:" would be useful for people who want to use map application as
>>> well.
>>>
>>> Gyuyoung.
>>>
>>>
>>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20150707/a1cf0cc4/attachment.html>


More information about the webkit-dev mailing list