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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.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/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 98b04285fcb22d795e62fbf56591a796e7734f21..e88a321b122720f0c590582e2d6479d71add509a 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2511,8 +2511,8 @@ int WebViewImpl::textInputFlags()
if (!element)
return WebTextInputFlagNone;
- DEFINE_STATIC_LOCAL(AtomicString, autocompleteString, ("autocomplete", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(AtomicString, autocorrectString, ("autocorrect", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(AtomicString, autocompleteString, ("autocomplete"));
+ DEFINE_STATIC_LOCAL(AtomicString, autocorrectString, ("autocorrect"));
int flags = 0;
const AtomicString& autocomplete = element->getAttribute(autocompleteString);
@@ -2536,10 +2536,10 @@ int WebViewImpl::textInputFlags()
if (isHTMLTextFormControlElement(element)) {
HTMLTextFormControlElement* formElement = static_cast<HTMLTextFormControlElement*>(element);
if (formElement->supportsAutocapitalize()) {
- DEFINE_STATIC_LOCAL(const AtomicString, none, ("none", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, characters, ("characters", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, words, ("words", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, sentences, ("sentences", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, none, ("none"));
+ DEFINE_STATIC_LOCAL(const AtomicString, characters, ("characters"));
+ DEFINE_STATIC_LOCAL(const AtomicString, words, ("words"));
+ DEFINE_STATIC_LOCAL(const AtomicString, sentences, ("sentences"));
const AtomicString& autocapitalize = formElement->autocapitalize();
if (autocapitalize == none)

Powered by Google App Engine
This is Rietveld 408576698