Generalize moving URLComponent's begin position
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Oct 2012 22:31:45 +0000 (22:31 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Oct 2012 22:31:45 +0000 (22:31 +0000)
commit33425852fcca99bb57771f34e52754f396146f6c
tree04716bd6d838d88f8640c0a0080da31713b7b9a0
parentfdacb30e6583d7c9583e0f018c13c171d9f4846d
Generalize moving URLComponent's begin position
https://bugs.webkit.org/show_bug.cgi?id=98626

Reviewed by Adam Barth.

The patch r130609 introduced moving URLComponents's position.
It turns out this concept is really useful in the parser so
this patch generalize the idea.

* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::removePort):
* wtf/url/src/URLCanonEtc.cpp:
* wtf/url/src/URLComponent.h:
(WTF::URLComponent::moveBy):
Rename URLComponent::move() to URLComponent::moveBy() for consistency
with some of WebCore types.

* wtf/url/src/URLParse.cpp:
* wtf/url/src/URLParseFile.cpp:

* wtf/url/src/URLSegments.cpp:
(WTF::URLSegments::moveFromComponentBy):
Change the semantic to everything from a certain component. This is
useful to move everything, including the scheme.

* wtf/url/src/URLSegments.h:
(URLSegments):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/url/api/ParsedURL.cpp
Source/WTF/wtf/url/src/URLCanonEtc.cpp
Source/WTF/wtf/url/src/URLComponent.h
Source/WTF/wtf/url/src/URLParse.cpp
Source/WTF/wtf/url/src/URLParseFile.cpp
Source/WTF/wtf/url/src/URLSegments.cpp
Source/WTF/wtf/url/src/URLSegments.h