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

Unified Diff: third_party/WebKit/Source/core/html/HTMLElement.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/html/HTMLElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp
index fe76006cd94cf0ec17f360a09748bd88d9c57a47..a50741c890882ec5d6daf194259c0fcd80faac2d 100644
--- a/third_party/WebKit/Source/core/html/HTMLElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -666,9 +666,9 @@ void HTMLElement::setTranslate(bool enable)
// http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#limited-to-only-known-values
static inline const AtomicString& toValidDirValue(const AtomicString& value)
{
- DEFINE_STATIC_LOCAL(const AtomicString, ltrValue, ("ltr", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, rtlValue, ("rtl", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, autoValue, ("auto", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, ltrValue, ("ltr"));
+ DEFINE_STATIC_LOCAL(const AtomicString, rtlValue, ("rtl"));
+ DEFINE_STATIC_LOCAL(const AtomicString, autoValue, ("auto"));
if (equalIgnoringCase(value, ltrValue))
return ltrValue;
@@ -1030,7 +1030,7 @@ void HTMLElement::handleKeypressEvent(KeyboardEvent* event)
const AtomicString& HTMLElement::eventParameterName()
{
- DEFINE_STATIC_LOCAL(const AtomicString, eventString, ("event", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, eventString, ("event"));
return eventString;
}

Powered by Google App Engine
This is Rietveld 408576698