[Webkit-unassigned] [Bug 73176] Add 'isProtocolHandlerRegistered' and 'unregisterProtocolHandler'.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 7 15:50:03 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=73176





--- Comment #11 from Dongwoo Joshua Im <dw.im at samsung.com>  2011-12-07 15:50:02 PST ---
(In reply to comment #8)
> (From update of attachment 117856 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=117856&action=review
> 
> This patch has a bunch of unrelated changes.
> 
> > Source/WebCore/page/Chrome.cpp:366
> > +String Chrome::isProtocolHandlerRegistered(const String& scheme, const String& baseURL, const String& url)
> > +{
> > +    return m_client->isProtocolHandlerRegistered(scheme, baseURL, url);
> > +}
> > +void Chrome::unregisterProtocolHandler(const String& scheme, const String& baseURL, const String& url)
> > +{
> > +    m_client->unregisterProtocolHandler(scheme, baseURL, url);
> > +}
> 
> Functions should have blank lines between them.
> 

Yes.

> > Source/WebCore/page/Navigator.cpp:290
> > +    String declined = String("declined");
> 
> You don't need to call the string constructor explicitly.
> 

I fixed this.

> > Source/WebCore/page/Navigator.cpp:297
> > +    if (!document)
> > +        return declined;
> 
> This can never occur.
> 

I removed these lines.

> > Source/WebCore/page/Navigator.cpp:299
> > +    String baseURL = document->baseURL().baseAsString();
> 
> Why the base URL?
> 

The baseURL might be needed at browser side.
The "registerProtocolHandler" also pass the baseURL as one of the parameters.

> > Source/WebCore/page/Navigator.cpp:309
> > +    Page* page = m_frame->page();
> > +    if (!page)
> > +        return declined;
> 
> Why not check for this at the top?

I moved this to the top.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list