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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 5 10:54:18 PST 2011


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


Adam Barth <abarth at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #117856|review?                     |review-
               Flag|                            |




--- Comment #8 from Adam Barth <abarth at webkit.org>  2011-12-05 10:54:17 PST ---
(From update of attachment 117856)
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.

> Source/WebCore/page/Navigator.cpp:290
> +    String declined = String("declined");

You don't need to call the string constructor explicitly.

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

This can never occur.

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

Why the base URL?

> Source/WebCore/page/Navigator.cpp:309
> +    Page* page = m_frame->page();
> +    if (!page)
> +        return declined;

Why not check for this at 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