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

Unified Diff: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.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/modules/screen_orientation/ScreenOrientation.cpp
diff --git a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.cpp b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.cpp
index 616b95146e21cf070d1567b17f400d3cc3a06947..359ff659dba1cf327e107b68a124cf61704df8da 100644
--- a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.cpp
+++ b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.cpp
@@ -33,14 +33,14 @@ struct ScreenOrientationInfo {
static ScreenOrientationInfo* orientationsMap(unsigned& length)
{
- DEFINE_STATIC_LOCAL(const AtomicString, portraitPrimary, ("portrait-primary", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, portraitSecondary, ("portrait-secondary", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, landscapePrimary, ("landscape-primary", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, landscapeSecondary, ("landscape-secondary", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, any, ("any", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, portrait, ("portrait", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, landscape, ("landscape", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, natural, ("natural", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, portraitPrimary, ("portrait-primary"));
+ DEFINE_STATIC_LOCAL(const AtomicString, portraitSecondary, ("portrait-secondary"));
+ DEFINE_STATIC_LOCAL(const AtomicString, landscapePrimary, ("landscape-primary"));
+ DEFINE_STATIC_LOCAL(const AtomicString, landscapeSecondary, ("landscape-secondary"));
+ DEFINE_STATIC_LOCAL(const AtomicString, any, ("any"));
+ DEFINE_STATIC_LOCAL(const AtomicString, portrait, ("portrait"));
+ DEFINE_STATIC_LOCAL(const AtomicString, landscape, ("landscape"));
+ DEFINE_STATIC_LOCAL(const AtomicString, natural, ("natural"));
static ScreenOrientationInfo orientationMap[] = {
{ portraitPrimary, WebScreenOrientationLockPortraitPrimary },

Powered by Google App Engine
This is Rietveld 408576698