Changeset 224984 in webkit
- Timestamp:
- Nov 17, 2017 1:38:11 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r224982 r224984 1 2017-11-17 Alex Christensen <achristensen@webkit.org> 2 3 Clean up URL.h 4 https://bugs.webkit.org/show_bug.cgi?id=179710 5 6 Reviewed by Brady Eidson. 7 8 No change in behavior. 9 10 * Modules/fetch/FetchRequest.cpp: 11 (WebCore::FetchRequest::urlString const): 12 * Modules/fetch/FetchResponse.cpp: 13 (WebCore::FetchResponse::url const): 14 * platform/URL.cpp: 15 (WebCore::URL::serialize const): Deleted. 16 * platform/URL.h: 17 * platform/mac/URLMac.mm: 18 (WebCore::URL::createCFURL const): 19 1 20 2017-11-17 Alex Christensen <achristensen@webkit.org> 2 21 -
trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp
r222819 r224984 264 264 { 265 265 if (m_requestURL.isNull()) 266 m_requestURL = m_request.url() .serialize();266 m_requestURL = m_request.url(); 267 267 return m_requestURL; 268 268 } -
trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp
r224645 r224984 187 187 const String& FetchResponse::url() const 188 188 { 189 if (m_responseURL.isNull()) 190 m_responseURL = m_response.url().serialize(true); 189 if (m_responseURL.isNull()) { 190 URL url = m_response.url(); 191 url.removeFragmentIdentifier(); 192 m_responseURL = url.string(); 193 } 191 194 return m_responseURL; 192 195 } -
trunk/Source/WebCore/platform/URL.cpp
r224973 r224984 685 685 return string; 686 686 return decodeEscapeSequences<URLEscapeSequence>(string, encoding); 687 }688 689 String URL::serialize(bool omitFragment) const690 {691 if (omitFragment)692 return m_string.left(m_queryEnd);693 return m_string;694 687 } 695 688 -
trunk/Source/WebCore/platform/URL.h
r224387 r224984 208 208 template <class Decoder> static std::optional<URL> decode(Decoder&); 209 209 210 String serialize(bool omitFragment = false) const;211 212 210 private: 213 211 friend class URLParser; … … 216 214 void init(const URL&, const String&, const TextEncoding&); 217 215 void copyToBuffer(Vector<char, 512>& buffer) const; 218 219 // Parses the given URL. The originalString parameter allows for an220 // optimization: When the source is the same as the fixed-up string,221 // it will use the passed-in string instead of allocating a new one.222 void parse(const String&);223 void parse(const char* url, const String* originalString = 0);224 216 225 217 bool hasPath() const; … … 465 457 namespace WTF { 466 458 467 468 469 470 471 459 // URLHash is the default hash for String 460 template<typename T> struct DefaultHash; 461 template<> struct DefaultHash<WebCore::URL> { 462 typedef WebCore::URLHash Hash; 463 }; 472 464 473 465 } // namespace WTF -
trunk/Source/WebCore/platform/mac/URLMac.mm
r212508 r224984 58 58 { 59 59 if (isNull()) 60 return 0;60 return nullptr; 61 61 62 62 if (isEmpty()) { … … 75 75 } 76 76 77 78 79 77 }
Note: See TracChangeset
for help on using the changeset viewer.