[Webkit-unassigned] [Bug 76816] Implement the URL decomposition IDL attributes

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


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


Adam Barth <abarth at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #123534|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #2 from Adam Barth <abarth at webkit.org>  2012-01-23 12:03:13 PST ---
(From update of attachment 123534)
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?

-- 
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