[prev in list] [next in list] [prev in thread] [next in thread] 

List:       webkit-dev
Subject:    Re: [webkit-dev] Support "registerProtocolHandler" in WebKit2
From:       Gyuyoung Kim <gyuyoung.kim () webkit ! org>
Date:       2015-07-07 1:33:33
Message-ID: CA+94+n6U7iDFgyv+KTo-JwTNy7bbBwEgv9m6hS4OSTYzLZgMaQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


>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@apple.com> wrote:

>
> On Jul 1, 2015, at 7:42 PM, Gyuyoung Kim <gyuyoung.kim@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@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@webkit.org>
> wrote:
>
>> On Mon, Jun 8, 2015 at 9:39 AM, Darin Adler <darin@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@webkit.org>
>> wrote:
>>
>>> On Mon, Jun 8, 2015 at 12:02 PM, Michael Catanzaro <
>>> mcatanzaro@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@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
>
>

[Attachment #5 (text/html)]

<div dir="ltr"><div style="font-size:12.8000001907349px"><br class="">&gt;The custom \
protocol handler feature of the WebKit2 API is for the embedding native application \
to provide raw data to resource loads directly.</div><div \
style="font-size:12.8000001907349px">&gt;While tangentially related to how \
registerProtocolHandler would work for some uses, there's numerous differences.  \
</div><div style="font-size:12.8000001907349px"><br></div><div \
style="font-size:12.8000001907349px">If so, custom protocol handler feature is \
different with role of registerProtocolHandler. Thank you for your explanation about \
it.</div><div style="font-size:12.8000001907349px"><br></div><div \
style="font-size:12.8000001907349px"><br></div><div \
style="font-size:12.8000001907349px">&gt;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.</div><div \
style="font-size:12.8000001907349px">&gt;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:</div><div style="font-size:12.8000001907349px"><br></div><div \
style="font-size:12.8000001907349px">For more detailed scenario in addition to \
Brady&#39;s explanation, I consider below call sequence to use \
registerProtocolHandler.</div><div \
style="font-size:12.8000001907349px"><br></div><div \
style="font-size:12.8000001907349px">  1. Custom scheme is registered by \
&quot;registeredProtocolHandler()&quot; in JS</div><div \
style="font-size:12.8000001907349px">  2. The registered scheme will be filtering in \
WebCore. (If unsupported scheme is requested, security error happens.)</div><div \
style="font-size:12.8000001907349px">  3. Filtered scheme will be passed to \
application side (of course, which is web browser or similar things)</div><div \
style="font-size:12.8000001907349px">  4. The application will register passed custom \
scheme and a callback to call the native embedding application to WK2&#39;s \
network</div><div style="font-size:12.8000001907349px">        using &quot;custom \
protocol handler feature&quot;, which was implemented in WebKit2.&quot;</div><div \
style="font-size:12.8000001907349px"><br></div><div \
style="font-size:12.8000001907349px">Thus, in my humble opinion, \
registerProtocolHandler will use the custom protocol instead of complicating \
it.</div><div style="font-size:12.8000001907349px"><br></div><div \
style="font-size:12.8000001907349px"><br></div><div \
style="font-size:12.8000001907349px">Gyuyoung.</div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 7, 2015 at 1:56 AM, \
Brady Eidson <span dir="ltr">&lt;<a href="mailto:beidson@apple.com" \
target="_blank">beidson@apple.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div style="word-wrap:break-word"><span \
class=""><br><div><blockquote type="cite"><div>On Jul 1, 2015, at 7:42 PM, Gyuyoung \
Kim &lt;<a href="mailto:gyuyoung.kim@webkit.org" \
target="_blank">gyuyoung.kim@webkit.org</a>&gt; wrote:</div><br><div><div \
dir="ltr">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<div>through API layer instead of  JavaScript. The \
registerProtocolHandler() is to support to register the custom scheme by means of \
JavaScript. I don&#39;t know yet why we can&#39;t support to register \
it</div><div>from JavaScript.</div></div></div></blockquote><br></div></span><div>The \
custom protocol handler feature of the WebKit2 API is for the embedding native \
application to provide raw data to resource loads \
directly.</div><div><br></div><div>While tangentially related to how \
registerProtocolHandler would work for some uses, there's numerous differences.  \
</div><div><br></div><div>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.</div><div><br></div><div>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:</div><div><br></div><div><blockquote type="cite"><span \
class=""><div>On Jul 4, 2015, at 10:24 AM, Sam Weinig &lt;<a \
href="mailto:weinig@apple.com" target="_blank">weinig@apple.com</a>&gt; \
wrote:</div></span><div><span class=""><br>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.   <br></span>...<span \
class=""><br>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?     \
<br></span></div></blockquote><br></div><div>I'm not crafting this reply as an \
argument against registerProtocolHandler, but rather to dispel the notion that \
exposing &quot;WK2 custom protocols" to JS is all we need to do to get \
registerProtocolHandler.</div><span class="HOEnZb"><font \
color="#888888"><div><br></div><div>~Brady</div><div><br></div></font></span><div><blockquote \
type="cite"><div><span class=""><div dir="ltr"><div>Gyuyoung.</div><div \
class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 16, 2015 at 10:43 AM, \
Gyuyoung Kim <span dir="ltr">&lt;<a href="mailto:gyuyoung.kim@webkit.org" \
target="_blank">gyuyoung.kim@webkit.org</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div \
dir="ltr"><span>On Mon, Jun 8, 2015 at 9:39 AM, Darin Adler  <span dir="ltr">&lt;<a \
href="mailto:darin@apple.com" target="_blank">darin@apple.com</a>&gt;</span>  \
wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">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.</blockquote><div><br></div></span><div>It seems that some people hope to listen \
why you guys dislike about this API as well as I want.</div><span><font \
color="#888888"><div><br></div><div>Gyuyoung.</div></font></span></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 11, 2015 at 10:06 AM, \
Gyuyoung Kim <span dir="ltr">&lt;<a href="mailto:gyuyoung.kim@webkit.org" \
target="_blank">gyuyoung.kim@webkit.org</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div \
dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Mon, Jun 8, 2015 \
at 12:02 PM, Michael Catanzaro <span dir="ltr">&lt;<a \
href="mailto:mcatanzaro@igalia.com" \
target="_blank">mcatanzaro@igalia.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>On \
Sun, 2015-06-07 at 17:39 -0700, Darin Adler wrote:<br> &gt; As one next step in the \
discussion, is there anyone that wants to<br> &gt; present a use case for a protocol \
other than mailto?<br> <br>
</span>irc:// would be useful for those who don&#39;t like desktop clients.<br>
<div><div><br></div></div></blockquote><div><br></div></span><div>&quot;geo:&quot; \
would be useful for people who want to use map application as well.</div><span><font \
color="#888888"><div><br></div><div>Gyuyoung.</div><div><br></div></font></span></div></div></div>
 </blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></span><span class="">
_______________________________________________<br>webkit-dev mailing list<br><a \
href="mailto:webkit-dev@lists.webkit.org" \
target="_blank">webkit-dev@lists.webkit.org</a><br><a \
href="https://lists.webkit.org/mailman/listinfo/webkit-dev" \
target="_blank">https://lists.webkit.org/mailman/listinfo/webkit-dev</a><br></span></div></blockquote></div><br></div></blockquote></div><br></div>




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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic