Changeset 108928 in webkit


Ignore:
Timestamp:
Feb 25, 2012 10:51:12 PM (12 years ago)
Author:
benjamin@webkit.org
Message:

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

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r108927 r108928  
     12012-02-25  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Get rid of copyParsedQueryTo()
     4        https://bugs.webkit.org/show_bug.cgi?id=79590
     5
     6        Reviewed by Andreas Kling.
     7
     8        The function KURL::copyParsedQueryTo() is unused. Remove it from WebCore.
     9
     10        The function was used by HTMLAnchorElement::getParameter() but that feature
     11        was removed in r100164.
     12
     13        * WebCore.order:
     14        * platform/KURL.cpp:
     15        (WebCore):
     16        * platform/KURL.h:
     17        (WebCore):
     18        (KURL):
     19        * platform/KURLGoogle.cpp:
     20        (WebCore):
     21        * platform/KURLWTFURL.cpp:
     22        (WebCore):
     23
    1242012-02-25  Sheriff Bot  <webkit.review.bot@gmail.com>
    225
  • trunk/Source/WebCore/WebCore.order

    r108746 r108928  
    1968519685__ZN7WebCore48jsHTMLAnchorElementPrototypeFunctionGetParameterEPN3JSC9ExecStateE
    1968619686__ZNK7WebCore17HTMLAnchorElement12getParameterERKN3WTF6StringE
    19687 __ZNK7WebCore4KURL17copyParsedQueryToERN3WTF7HashMapINS1_6StringES3_NS1_10StringHashENS1_10HashTraitsIS3_EES6_EE
    1968819687__ZN7WebCore25jsHTMLAnchorElementOriginEPN3JSC9ExecStateENS0_7JSValueERKNS0_10IdentifierE
    1968919688__ZNK7WebCore17HTMLAnchorElement6originEv
  • trunk/Source/WebCore/platform/KURL.cpp

    r108907 r108928  
    637637}
    638638
    639 void KURL::copyParsedQueryTo(ParsedURLParameters& parameters) const
    640 {
    641     const UChar* pos = m_string.characters() + m_pathEnd + 1;
    642     const UChar* end = m_string.characters() + m_queryEnd;
    643     while (pos < end) {
    644         const UChar* parameterStart = pos;
    645         while (pos < end && *pos != '&')
    646             ++pos;
    647         const UChar* parameterEnd = pos;
    648         if (pos < end) {
    649             ASSERT(*pos == '&');
    650             ++pos;
    651         }
    652         if (parameterStart == parameterEnd)
    653             continue;
    654         const UChar* nameStart = parameterStart;
    655         const UChar* equalSign = parameterStart;
    656         while (equalSign < parameterEnd && *equalSign != '=')
    657             ++equalSign;
    658         if (equalSign == nameStart)
    659             continue;
    660         String name(nameStart, equalSign - nameStart);
    661         String value = equalSign == parameterEnd ? String() : String(equalSign + 1, parameterEnd - equalSign - 1);
    662         parameters.set(name, value);
    663     }
    664 }
    665 
    666639String KURL::baseAsString() const
    667640{
  • trunk/Source/WebCore/platform/KURL.h

    r108907 r108928  
    5858struct KURLHash;
    5959
    60 typedef HashMap<String, String> ParsedURLParameters;
    61 
    6260enum ParsedURLStringTag { ParsedURLString };
    6361
     
    148146    bool hasFragmentIdentifier() const;
    149147
    150     void copyParsedQueryTo(ParsedURLParameters&) const;
    151 
    152148    String baseAsString() const;
    153149
  • trunk/Source/WebCore/platform/KURLGoogle.cpp

    r105930 r108928  
    579579}
    580580
    581 void KURL::copyParsedQueryTo(ParsedURLParameters& parameters) const
    582 {
    583     String query = m_url.componentString(m_url.m_parsed.query);
    584     const UChar* pos = query.characters();
    585     const UChar* end = query.characters() + query.length();
    586     while (pos < end) {
    587         const UChar* parameterStart = pos;
    588         while (pos < end && *pos != '&')
    589             ++pos;
    590         const UChar* parameterEnd = pos;
    591         if (pos < end) {
    592             ASSERT(*pos == '&');
    593             ++pos;
    594         }
    595         if (parameterStart == parameterEnd)
    596             continue;
    597         const UChar* nameStart = parameterStart;
    598         const UChar* equalSign = parameterStart;
    599         while (equalSign < parameterEnd && *equalSign != '=')
    600             ++equalSign;
    601         if (equalSign == nameStart)
    602             continue;
    603         String name(nameStart, equalSign - nameStart);
    604         String value = equalSign == parameterEnd ? String() : String(equalSign + 1, parameterEnd - equalSign - 1);
    605         parameters.set(name, value);
    606     }
    607 }
    608 
    609581String KURL::baseAsString() const
    610582{
  • trunk/Source/WebCore/platform/KURLWTFURL.cpp

    r108907 r108928  
    148148}
    149149
    150 void KURL::copyParsedQueryTo(ParsedURLParameters&) const
    151 {
    152     // FIXME: Add WTFURL Implementation.
    153 }
    154 
    155150String KURL::baseAsString() const
    156151{
Note: See TracChangeset for help on using the changeset viewer.