Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Unified Diff: third_party/WebKit/Source/core/loader/FormSubmission.cpp

Issue 1844223002: Literal AtomicString construction can rely on strlen optimization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/FormSubmission.cpp
diff --git a/third_party/WebKit/Source/core/loader/FormSubmission.cpp b/third_party/WebKit/Source/core/loader/FormSubmission.cpp
index 2e994d7c55992b46f8ae1ec2b3390c94f84c4268..79c4e3d403ea2740c72a4d8a1ca073a0c9956b68 100644
--- a/third_party/WebKit/Source/core/loader/FormSubmission.cpp
+++ b/third_party/WebKit/Source/core/loader/FormSubmission.cpp
@@ -91,10 +91,10 @@ void FormSubmission::Attributes::parseAction(const String& action)
AtomicString FormSubmission::Attributes::parseEncodingType(const String& type)
{
if (equalIgnoringCase(type, "multipart/form-data"))
- return AtomicString("multipart/form-data", AtomicString::ConstructFromLiteral);
+ return AtomicString("multipart/form-data");
if (equalIgnoringCase(type, "text/plain"))
- return AtomicString("text/plain", AtomicString::ConstructFromLiteral);
- return AtomicString("application/x-www-form-urlencoded", AtomicString::ConstructFromLiteral);
+ return AtomicString("text/plain");
+ return AtomicString("application/x-www-form-urlencoded");
}
void FormSubmission::Attributes::updateEncodingType(const String& type)
@@ -203,7 +203,7 @@ PassRefPtrWillBeRawPtr<FormSubmission> FormSubmission::create(HTMLFormElement* f
if (copiedAttributes.method() == PostMethod) {
isMultiPartForm = copiedAttributes.isMultiPartForm();
if (isMultiPartForm && isMailtoForm) {
- encodingType = AtomicString("application/x-www-form-urlencoded", AtomicString::ConstructFromLiteral);
+ encodingType = AtomicString("application/x-www-form-urlencoded");
isMultiPartForm = false;
}
}

Powered by Google App Engine
This is Rietveld 408576698