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

Unified Diff: third_party/WebKit/Source/core/svg/SVGAnimationElement.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/SVGAnimationElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp b/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
index ed35d2520934a588146f573a0b15b66e1ab09a01..6338700393e6541928ca09cafd684b1ba32b0cf1 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
@@ -301,10 +301,10 @@ void SVGAnimationElement::updateAnimationMode()
void SVGAnimationElement::setCalcMode(const AtomicString& calcMode)
{
- DEFINE_STATIC_LOCAL(const AtomicString, discrete, ("discrete", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, linear, ("linear", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, paced, ("paced", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, spline, ("spline", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, discrete, ("discrete"));
+ DEFINE_STATIC_LOCAL(const AtomicString, linear, ("linear"));
+ DEFINE_STATIC_LOCAL(const AtomicString, paced, ("paced"));
+ DEFINE_STATIC_LOCAL(const AtomicString, spline, ("spline"));
if (calcMode == discrete)
setCalcMode(CalcModeDiscrete);
else if (calcMode == linear)
@@ -319,8 +319,8 @@ void SVGAnimationElement::setCalcMode(const AtomicString& calcMode)
void SVGAnimationElement::setAttributeType(const AtomicString& attributeType)
{
- DEFINE_STATIC_LOCAL(const AtomicString, css, ("CSS", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, xml, ("XML", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, css, ("CSS"));
+ DEFINE_STATIC_LOCAL(const AtomicString, xml, ("XML"));
if (attributeType == css)
m_attributeType = AttributeTypeCSS;
else if (attributeType == xml)
@@ -347,14 +347,14 @@ String SVGAnimationElement::fromValue() const
bool SVGAnimationElement::isAdditive()
{
- DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum"));
const AtomicString& value = fastGetAttribute(SVGNames::additiveAttr);
return value == sum || getAnimationMode() == ByAnimation;
}
bool SVGAnimationElement::isAccumulated() const
{
- DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum"));
const AtomicString& value = fastGetAttribute(SVGNames::accumulateAttr);
return value == sum && getAnimationMode() != ToAnimation;
}
@@ -680,7 +680,7 @@ void SVGAnimationElement::adjustForInheritance(SVGElement* targetElement, const
static bool inheritsFromProperty(SVGElement* targetElement, const QualifiedName& attributeName, const String& value)
{
ASSERT(targetElement);
- DEFINE_STATIC_LOCAL(const AtomicString, inherit, ("inherit", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, inherit, ("inherit"));
if (value.isEmpty() || value != inherit)
return false;

Powered by Google App Engine
This is Rietveld 408576698