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

Unified Diff: third_party/WebKit/Source/core/svg/animation/SVGSMILElement.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/svg/animation/SVGSMILElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
index 6e061c0cef561fc7654992eb94a01d572ce522e4..decd78eb05a5bb5a68616a6fc9053bae281f6f95 100644
--- a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
+++ b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
@@ -99,7 +99,7 @@ static SMILEventSender& smilRepeatEventSender()
static SMILEventSender& smilRepeatNEventSender()
{
- DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SMILEventSender>, sender, (SMILEventSender::create(AtomicString("repeatn", AtomicString::ConstructFromLiteral))));
+ DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SMILEventSender>, sender, (SMILEventSender::create(AtomicString("repeatn"))));
return *sender;
}
@@ -398,7 +398,7 @@ SMILTime SVGSMILElement::parseClockValue(const String& data)
String parse = data.stripWhiteSpace();
- DEFINE_STATIC_LOCAL(const AtomicString, indefiniteValue, ("indefinite", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, indefiniteValue, ("indefinite"));
if (parse == indefiniteValue)
return SMILTime::indefinite();
@@ -710,8 +710,8 @@ bool SVGSMILElement::isFrozen() const
SVGSMILElement::Restart SVGSMILElement::getRestart() const
{
- DEFINE_STATIC_LOCAL(const AtomicString, never, ("never", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, whenNotActive, ("whenNotActive", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, never, ("never"));
+ DEFINE_STATIC_LOCAL(const AtomicString, whenNotActive, ("whenNotActive"));
const AtomicString& value = fastGetAttribute(SVGNames::restartAttr);
if (value == never)
return RestartNever;
@@ -722,7 +722,7 @@ SVGSMILElement::Restart SVGSMILElement::getRestart() const
SVGSMILElement::FillMode SVGSMILElement::fill() const
{
- DEFINE_STATIC_LOCAL(const AtomicString, freeze, ("freeze", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, freeze, ("freeze"));
const AtomicString& value = fastGetAttribute(SVGNames::fillAttr);
return value == freeze ? FillFreeze : FillRemove;
}
@@ -754,7 +754,7 @@ SMILTime SVGSMILElement::repeatCount() const
SMILTime computedRepeatCount = SMILTime::unresolved();
const AtomicString& value = fastGetAttribute(SVGNames::repeatCountAttr);
if (!value.isNull()) {
- DEFINE_STATIC_LOCAL(const AtomicString, indefiniteValue, ("indefinite", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, indefiniteValue, ("indefinite"));
if (value == indefiniteValue) {
computedRepeatCount = SMILTime::indefinite();
} else {

Powered by Google App Engine
This is Rietveld 408576698