WTFURL: Implement KURL::setPort()
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Oct 2012 21:09:45 +0000 (21:09 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Oct 2012 21:09:45 +0000 (21:09 +0000)
commit182a258c634a86fac3c0bf2b67ffe37ec3c58899
tree4b636980aefcf16dabfb052f47190f25b6d0bb12
parent5ccae206845358dc31abee4171b794d63801a31d
WTFURL: Implement KURL::setPort()
https://bugs.webkit.org/show_bug.cgi?id=99898

Reviewed by Adam Barth.

Source/WebCore:

* platform/KURLWTFURL.cpp:
(WebCore::KURL::setPort):

Source/WTF:

Add an efficient implementation for remplacing the port component
in an URL. This will be the base for replacing other components
efficiently.

The testing is covered by fast/dom/HTMLAnchorElement/set-href-attribute-port.html

* wtf/url/api/ParsedURL.cpp:
(WTF::generateNewSpecWithPort):
(WTF::replacePortWithString):
(WTF::ParsedURL::replacePort):
* wtf/url/api/ParsedURL.h:
(ParsedURL):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/url/api/ParsedURL.cpp
Source/WTF/wtf/url/api/ParsedURL.h
Source/WebCore/ChangeLog
Source/WebCore/platform/KURLWTFURL.cpp