[webkit-reviews] review denied: [Bug 76816] Implement the URL decomposition IDL attributes : [Attachment 123534] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 23 12:03:12 PST 2012


Adam Barth <abarth at webkit.org> has denied Kaustubh Atrawalkar
<kaustubh at motorola.com>'s request for review:
Bug 76816: Implement the URL decomposition IDL attributes
https://bugs.webkit.org/show_bug.cgi?id=76816

Attachment 123534: Patch
https://bugs.webkit.org/attachment.cgi?id=123534&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=123534&action=review


> Source/WebCore/html/DOMURL.cpp:180
> +    m_href = KURL(KURL(), url);
> +    // Resolve the URL relative to baseURL if is provide.
> +    if (!baseURL.isEmpty())
> +	   m_href = KURL(m_href, baseURL);

Why do we parse the URL twice?	That doesn't seem right.

> Source/WebCore/html/DOMURL.cpp:193
> +    if (m_href.hostEnd() == m_href.pathStart())
> +	   return m_href.host();
> +    if (isDefaultPortForProtocol(m_href.port(), m_href.protocol()))
> +	   return m_href.host();
> +    return m_href.host() + ":" + String::number(m_href.port());

Should this code be shared with Location and HTMLAnchorElement?


More information about the webkit-reviews mailing list