| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All r
ights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 // The query may begin with a question mark, or, if not, one will be added | 159 // The query may begin with a question mark, or, if not, one will be added |
| 160 // for you. Setting the query to the empty string will leave a "?" in the | 160 // for you. Setting the query to the empty string will leave a "?" in the |
| 161 // URL (with nothing after it). To clear the query, pass a null string. | 161 // URL (with nothing after it). To clear the query, pass a null string. |
| 162 void setQuery(const String&); | 162 void setQuery(const String&); |
| 163 | 163 |
| 164 void setFragmentIdentifier(const String&); | 164 void setFragmentIdentifier(const String&); |
| 165 void removeFragmentIdentifier(); | 165 void removeFragmentIdentifier(); |
| 166 | 166 |
| 167 PLATFORM_EXPORT friend bool equalIgnoringFragmentIdentifier(const KURL&, con
st KURL&); | 167 PLATFORM_EXPORT friend bool equalIgnoringFragmentIdentifier(const KURL&, con
st KURL&); |
| 168 PLATFORM_EXPORT friend bool equalIgnoringPathQueryAndFragment(const KURL&, c
onst KURL&); |
| 168 | 169 |
| 169 unsigned hostStart() const; | 170 unsigned hostStart() const; |
| 170 unsigned hostEnd() const; | 171 unsigned hostEnd() const; |
| 171 | 172 |
| 172 unsigned pathStart() const; | 173 unsigned pathStart() const; |
| 173 unsigned pathEnd() const; | 174 unsigned pathEnd() const; |
| 174 unsigned pathAfterLastSlash() const; | 175 unsigned pathAfterLastSlash() const; |
| 175 | 176 |
| 176 operator const String&() const { return string(); } | 177 operator const String&() const { return string(); } |
| 177 | 178 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 203 }; | 204 }; |
| 204 | 205 |
| 205 PLATFORM_EXPORT bool operator==(const KURL&, const KURL&); | 206 PLATFORM_EXPORT bool operator==(const KURL&, const KURL&); |
| 206 PLATFORM_EXPORT bool operator==(const KURL&, const String&); | 207 PLATFORM_EXPORT bool operator==(const KURL&, const String&); |
| 207 PLATFORM_EXPORT bool operator==(const String&, const KURL&); | 208 PLATFORM_EXPORT bool operator==(const String&, const KURL&); |
| 208 PLATFORM_EXPORT bool operator!=(const KURL&, const KURL&); | 209 PLATFORM_EXPORT bool operator!=(const KURL&, const KURL&); |
| 209 PLATFORM_EXPORT bool operator!=(const KURL&, const String&); | 210 PLATFORM_EXPORT bool operator!=(const KURL&, const String&); |
| 210 PLATFORM_EXPORT bool operator!=(const String&, const KURL&); | 211 PLATFORM_EXPORT bool operator!=(const String&, const KURL&); |
| 211 | 212 |
| 212 PLATFORM_EXPORT bool equalIgnoringFragmentIdentifier(const KURL&, const KURL&); | 213 PLATFORM_EXPORT bool equalIgnoringFragmentIdentifier(const KURL&, const KURL&); |
| 214 PLATFORM_EXPORT bool equalIgnoringPathQueryAndFragment(const KURL&, const KURL&)
; |
| 213 | 215 |
| 214 PLATFORM_EXPORT const KURL& blankURL(); | 216 PLATFORM_EXPORT const KURL& blankURL(); |
| 215 | 217 |
| 216 // Functions to do URL operations on strings. | 218 // Functions to do URL operations on strings. |
| 217 // These are operations that aren't faster on a parsed URL. | 219 // These are operations that aren't faster on a parsed URL. |
| 218 // These are also different from the KURL functions in that they don't require t
he string to be a valid and parsable URL. | 220 // These are also different from the KURL functions in that they don't require t
he string to be a valid and parsable URL. |
| 219 // This is especially important because valid javascript URLs are not necessaril
y considered valid by KURL. | 221 // This is especially important because valid javascript URLs are not necessaril
y considered valid by KURL. |
| 220 | 222 |
| 221 PLATFORM_EXPORT bool protocolIs(const String& url, const char* protocol); | 223 PLATFORM_EXPORT bool protocolIs(const String& url, const char* protocol); |
| 222 PLATFORM_EXPORT bool protocolIsJavaScript(const String& url); | 224 PLATFORM_EXPORT bool protocolIsJavaScript(const String& url); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 namespace WTF { | 270 namespace WTF { |
| 269 | 271 |
| 270 // KURLHash is the default hash for String | 272 // KURLHash is the default hash for String |
| 271 template<> struct DefaultHash<blink::KURL> { | 273 template<> struct DefaultHash<blink::KURL> { |
| 272 typedef blink::KURLHash Hash; | 274 typedef blink::KURLHash Hash; |
| 273 }; | 275 }; |
| 274 | 276 |
| 275 } // namespace WTF | 277 } // namespace WTF |
| 276 | 278 |
| 277 #endif // KURL_h | 279 #endif // KURL_h |
| OLD | NEW |