Title: [207046] trunk/Source/WebCore
- Revision
- 207046
- Author
- [email protected]
- Date
- 2016-10-10 23:10:47 -0700 (Mon, 10 Oct 2016)
Log Message
Change HTTPHeaderValues from a struct to a namespace
https://bugs.webkit.org/show_bug.cgi?id=163203
Patch by Youenn Fablet <[email protected]> on 2016-10-10
Reviewed by Alex Christensen.
No change of behavior.
* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::extract):
* platform/network/HTTPHeaderValues.cpp:
(WebCore::HTTPHeaderValues::textPlainContentType):
(WebCore::HTTPHeaderValues::formURLEncodedContentType):
(WebCore::HTTPHeaderValues::TextPlainContentType): Deleted.
(WebCore::HTTPHeaderValues::FormURLEncodedContentType): Deleted.
* platform/network/HTTPHeaderValues.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (207045 => 207046)
--- trunk/Source/WebCore/ChangeLog 2016-10-11 06:08:52 UTC (rev 207045)
+++ trunk/Source/WebCore/ChangeLog 2016-10-11 06:10:47 UTC (rev 207046)
@@ -1,3 +1,23 @@
+2016-10-10 Youenn Fablet <[email protected]>
+
+ Change HTTPHeaderValues from a struct to a namespace
+ https://bugs.webkit.org/show_bug.cgi?id=163203
+
+ Reviewed by Alex Christensen.
+
+ No change of behavior.
+
+ * Modules/fetch/FetchBody.cpp:
+ (WebCore::FetchBody::extract):
+ * platform/network/HTTPHeaderValues.cpp:
+ (WebCore::HTTPHeaderValues::textPlainContentType):
+ (WebCore::HTTPHeaderValues::formURLEncodedContentType):
+ (WebCore::HTTPHeaderValues::TextPlainContentType): Deleted.
+ (WebCore::HTTPHeaderValues::FormURLEncodedContentType): Deleted.
+ * platform/network/HTTPHeaderValues.h:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::send):
+
2016-10-10 Chris Dumez <[email protected]>
Update WheelEvent / MouseEvent to stop using legacy [ConstructorTemplate=Event]
Modified: trunk/Source/WebCore/Modules/fetch/FetchBody.cpp (207045 => 207046)
--- trunk/Source/WebCore/Modules/fetch/FetchBody.cpp 2016-10-11 06:08:52 UTC (rev 207045)
+++ trunk/Source/WebCore/Modules/fetch/FetchBody.cpp 2016-10-11 06:10:47 UTC (rev 207046)
@@ -63,11 +63,11 @@
return FetchBody(WTFMove(formData));
}
if (value.isString()) {
- contentType = HTTPHeaderValues::TextPlainContentType();
+ contentType = HTTPHeaderValues::textPlainContentType();
return FetchBody(value.toWTFString(&state));
}
if (value.inherits(JSURLSearchParams::info())) {
- contentType = HTTPHeaderValues::FormURLEncodedContentType();
+ contentType = HTTPHeaderValues::formURLEncodedContentType();
return FetchBody(*JSURLSearchParams::toWrapped(value));
}
if (value.inherits(JSReadableStream::info()))
Modified: trunk/Source/WebCore/platform/network/HTTPHeaderValues.cpp (207045 => 207046)
--- trunk/Source/WebCore/platform/network/HTTPHeaderValues.cpp 2016-10-11 06:08:52 UTC (rev 207045)
+++ trunk/Source/WebCore/platform/network/HTTPHeaderValues.cpp 2016-10-11 06:10:47 UTC (rev 207046)
@@ -30,13 +30,15 @@
namespace WebCore {
-const String& HTTPHeaderValues::TextPlainContentType()
+namespace HTTPHeaderValues {
+
+const String& textPlainContentType()
{
static NeverDestroyed<const String> contentType(ASCIILiteral("text/plain;charset=UTF-8"));
return contentType;
}
-const String& HTTPHeaderValues::FormURLEncodedContentType()
+const String& formURLEncodedContentType()
{
static NeverDestroyed<const String> contentType(ASCIILiteral("application/x-www-form-urlencoded;charset=UTF-8"));
return contentType;
@@ -43,3 +45,5 @@
}
}
+
+}
Modified: trunk/Source/WebCore/platform/network/HTTPHeaderValues.h (207045 => 207046)
--- trunk/Source/WebCore/platform/network/HTTPHeaderValues.h 2016-10-11 06:08:52 UTC (rev 207045)
+++ trunk/Source/WebCore/platform/network/HTTPHeaderValues.h 2016-10-11 06:10:47 UTC (rev 207046)
@@ -28,9 +28,11 @@
namespace WebCore {
-struct HTTPHeaderValues {
- static const String& TextPlainContentType();
- static const String& FormURLEncodedContentType();
-};
+namespace HTTPHeaderValues {
+const String& textPlainContentType();
+const String& formURLEncodedContentType();
+
}
+
+}
Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (207045 => 207046)
--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2016-10-11 06:08:52 UTC (rev 207045)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2016-10-11 06:10:47 UTC (rev 207046)
@@ -546,7 +546,7 @@
m_requestHeaders.set(HTTPHeaderName::ContentType, ASCIILiteral("application/x-www-form-urlencoded"));
else
#endif
- m_requestHeaders.set(HTTPHeaderName::ContentType, HTTPHeaderValues::TextPlainContentType());
+ m_requestHeaders.set(HTTPHeaderName::ContentType, HTTPHeaderValues::textPlainContentType());
} else {
replaceCharsetInMediaType(contentType, "UTF-8");
m_requestHeaders.set(HTTPHeaderName::ContentType, contentType);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes