Commit 92e208d6 authored by benjamin@webkit.org's avatar benjamin@webkit.org

Get rid of copyParsedQueryTo()

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

Reviewed by Andreas Kling.

The function KURL::copyParsedQueryTo() is unused. Remove it from WebCore.

The function was used by HTMLAnchorElement::getParameter() but that feature
was removed in r100164.

* WebCore.order:
* platform/KURL.cpp:
(WebCore):
* platform/KURL.h:
(WebCore):
(KURL):
* platform/KURLGoogle.cpp:
(WebCore):
* platform/KURLWTFURL.cpp:
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4e7a0e55
2012-02-25 Benjamin Poulain <benjamin@webkit.org>
Get rid of copyParsedQueryTo()
https://bugs.webkit.org/show_bug.cgi?id=79590
Reviewed by Andreas Kling.
The function KURL::copyParsedQueryTo() is unused. Remove it from WebCore.
The function was used by HTMLAnchorElement::getParameter() but that feature
was removed in r100164.
* WebCore.order:
* platform/KURL.cpp:
(WebCore):
* platform/KURL.h:
(WebCore):
(KURL):
* platform/KURLGoogle.cpp:
(WebCore):
* platform/KURLWTFURL.cpp:
(WebCore):
2012-02-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r108924.
......@@ -19684,7 +19684,6 @@ __ZN7WebCore23jsHTMLAnchorElementHashEPN3JSC9ExecStateENS0_7JSValueERKNS0_10Iden
__ZNK7WebCore17HTMLAnchorElement4hashEv
__ZN7WebCore48jsHTMLAnchorElementPrototypeFunctionGetParameterEPN3JSC9ExecStateE
__ZNK7WebCore17HTMLAnchorElement12getParameterERKN3WTF6StringE
__ZNK7WebCore4KURL17copyParsedQueryToERN3WTF7HashMapINS1_6StringES3_NS1_10StringHashENS1_10HashTraitsIS3_EES6_EE
__ZN7WebCore25jsHTMLAnchorElementOriginEPN3JSC9ExecStateENS0_7JSValueERKNS0_10IdentifierE
__ZNK7WebCore17HTMLAnchorElement6originEv
__ZN7WebCore23jsHTMLAnchorElementTextEPN3JSC9ExecStateENS0_7JSValueERKNS0_10IdentifierE
......@@ -636,33 +636,6 @@ bool KURL::hasFragmentIdentifier() const
return m_fragmentEnd != m_queryEnd;
}
void KURL::copyParsedQueryTo(ParsedURLParameters& parameters) const
{
const UChar* pos = m_string.characters() + m_pathEnd + 1;
const UChar* end = m_string.characters() + m_queryEnd;
while (pos < end) {
const UChar* parameterStart = pos;
while (pos < end && *pos != '&')
++pos;
const UChar* parameterEnd = pos;
if (pos < end) {
ASSERT(*pos == '&');
++pos;
}
if (parameterStart == parameterEnd)
continue;
const UChar* nameStart = parameterStart;
const UChar* equalSign = parameterStart;
while (equalSign < parameterEnd && *equalSign != '=')
++equalSign;
if (equalSign == nameStart)
continue;
String name(nameStart, equalSign - nameStart);
String value = equalSign == parameterEnd ? String() : String(equalSign + 1, parameterEnd - equalSign - 1);
parameters.set(name, value);
}
}
String KURL::baseAsString() const
{
return m_string.left(m_pathAfterLastSlash);
......
......@@ -57,8 +57,6 @@ namespace WebCore {
class TextEncoding;
struct KURLHash;
typedef HashMap<String, String> ParsedURLParameters;
enum ParsedURLStringTag { ParsedURLString };
class KURL {
......@@ -147,8 +145,6 @@ public:
String fragmentIdentifier() const;
bool hasFragmentIdentifier() const;
void copyParsedQueryTo(ParsedURLParameters&) const;
String baseAsString() const;
// This function is only used by location.href. It's likely we shouldn't
......
......@@ -578,34 +578,6 @@ bool KURL::hasFragmentIdentifier() const
return m_url.m_parsed.ref.len >= 0;
}
void KURL::copyParsedQueryTo(ParsedURLParameters& parameters) const
{
String query = m_url.componentString(m_url.m_parsed.query);
const UChar* pos = query.characters();
const UChar* end = query.characters() + query.length();
while (pos < end) {
const UChar* parameterStart = pos;
while (pos < end && *pos != '&')
++pos;
const UChar* parameterEnd = pos;
if (pos < end) {
ASSERT(*pos == '&');
++pos;
}
if (parameterStart == parameterEnd)
continue;
const UChar* nameStart = parameterStart;
const UChar* equalSign = parameterStart;
while (equalSign < parameterEnd && *equalSign != '=')
++equalSign;
if (equalSign == nameStart)
continue;
String name(nameStart, equalSign - nameStart);
String value = equalSign == parameterEnd ? String() : String(equalSign + 1, parameterEnd - equalSign - 1);
parameters.set(name, value);
}
}
String KURL::baseAsString() const
{
// FIXME: There is probably a more efficient way to do this?
......
......@@ -147,11 +147,6 @@ bool KURL::hasFragmentIdentifier() const
return false;
}
void KURL::copyParsedQueryTo(ParsedURLParameters&) const
{
// FIXME: Add WTFURL Implementation.
}
String KURL::baseAsString() const
{
// FIXME: Add WTFURL Implementation.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment