Title: [224984] trunk/Source/WebCore
- Revision
- 224984
- Author
- [email protected]
- Date
- 2017-11-17 13:38:11 -0800 (Fri, 17 Nov 2017)
Log Message
Clean up URL.h
https://bugs.webkit.org/show_bug.cgi?id=179710
Reviewed by Brady Eidson.
No change in behavior.
* Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::urlString const):
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::url const):
* platform/URL.cpp:
(WebCore::URL::serialize const): Deleted.
* platform/URL.h:
* platform/mac/URLMac.mm:
(WebCore::URL::createCFURL const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (224983 => 224984)
--- trunk/Source/WebCore/ChangeLog 2017-11-17 21:35:30 UTC (rev 224983)
+++ trunk/Source/WebCore/ChangeLog 2017-11-17 21:38:11 UTC (rev 224984)
@@ -1,5 +1,24 @@
2017-11-17 Alex Christensen <[email protected]>
+ Clean up URL.h
+ https://bugs.webkit.org/show_bug.cgi?id=179710
+
+ Reviewed by Brady Eidson.
+
+ No change in behavior.
+
+ * Modules/fetch/FetchRequest.cpp:
+ (WebCore::FetchRequest::urlString const):
+ * Modules/fetch/FetchResponse.cpp:
+ (WebCore::FetchResponse::url const):
+ * platform/URL.cpp:
+ (WebCore::URL::serialize const): Deleted.
+ * platform/URL.h:
+ * platform/mac/URLMac.mm:
+ (WebCore::URL::createCFURL const):
+
+2017-11-17 Alex Christensen <[email protected]>
+
Use RunLoop and Mode from NetworkingContext if they are given
https://bugs.webkit.org/show_bug.cgi?id=179800
<rdar://problem/35519421>
Modified: trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp (224983 => 224984)
--- trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp 2017-11-17 21:35:30 UTC (rev 224983)
+++ trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp 2017-11-17 21:38:11 UTC (rev 224984)
@@ -263,7 +263,7 @@
const String& FetchRequest::urlString() const
{
if (m_requestURL.isNull())
- m_requestURL = m_request.url().serialize();
+ m_requestURL = m_request.url();
return m_requestURL;
}
Modified: trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp (224983 => 224984)
--- trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp 2017-11-17 21:35:30 UTC (rev 224983)
+++ trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp 2017-11-17 21:38:11 UTC (rev 224984)
@@ -186,8 +186,11 @@
const String& FetchResponse::url() const
{
- if (m_responseURL.isNull())
- m_responseURL = m_response.url().serialize(true);
+ if (m_responseURL.isNull()) {
+ URL url = ""
+ url.removeFragmentIdentifier();
+ m_responseURL = url.string();
+ }
return m_responseURL;
}
Modified: trunk/Source/WebCore/platform/URL.cpp (224983 => 224984)
--- trunk/Source/WebCore/platform/URL.cpp 2017-11-17 21:35:30 UTC (rev 224983)
+++ trunk/Source/WebCore/platform/URL.cpp 2017-11-17 21:38:11 UTC (rev 224984)
@@ -686,13 +686,6 @@
return decodeEscapeSequences<URLEscapeSequence>(string, encoding);
}
-String URL::serialize(bool omitFragment) const
-{
- if (omitFragment)
- return m_string.left(m_queryEnd);
- return m_string;
-}
-
#if PLATFORM(IOS)
static bool shouldCanonicalizeScheme = true;
Modified: trunk/Source/WebCore/platform/URL.h (224983 => 224984)
--- trunk/Source/WebCore/platform/URL.h 2017-11-17 21:35:30 UTC (rev 224983)
+++ trunk/Source/WebCore/platform/URL.h 2017-11-17 21:38:11 UTC (rev 224984)
@@ -207,8 +207,6 @@
template <class Decoder> static bool decode(Decoder&, URL&);
template <class Decoder> static std::optional<URL> decode(Decoder&);
- String serialize(bool omitFragment = false) const;
-
private:
friend class URLParser;
WEBCORE_EXPORT void invalidate();
@@ -216,12 +214,6 @@
void init(const URL&, const String&, const TextEncoding&);
void copyToBuffer(Vector<char, 512>& buffer) const;
- // Parses the given URL. The originalString parameter allows for an
- // optimization: When the source is the same as the fixed-up string,
- // it will use the passed-in string instead of allocating a new one.
- void parse(const String&);
- void parse(const char* url, const String* originalString = 0);
-
bool hasPath() const;
String m_string;
@@ -464,10 +456,10 @@
namespace WTF {
- // URLHash is the default hash for String
- template<typename T> struct DefaultHash;
- template<> struct DefaultHash<WebCore::URL> {
- typedef WebCore::URLHash Hash;
- };
+// URLHash is the default hash for String
+template<typename T> struct DefaultHash;
+template<> struct DefaultHash<WebCore::URL> {
+ typedef WebCore::URLHash Hash;
+};
} // namespace WTF
Modified: trunk/Source/WebCore/platform/mac/URLMac.mm (224983 => 224984)
--- trunk/Source/WebCore/platform/mac/URLMac.mm 2017-11-17 21:35:30 UTC (rev 224983)
+++ trunk/Source/WebCore/platform/mac/URLMac.mm 2017-11-17 21:38:11 UTC (rev 224984)
@@ -57,7 +57,7 @@
RetainPtr<CFURLRef> URL::createCFURL() const
{
if (isNull())
- return 0;
+ return nullptr;
if (isEmpty()) {
// We use the toll-free bridge between NSURL and CFURL to create a CFURLRef supporting both empty and null values.
@@ -74,6 +74,4 @@
return createCFURLFromBuffer(buffer.data(), buffer.size());
}
-
-
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes