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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.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, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 buildPathFromString(value, m_path); 93 buildPathFromString(value, m_path);
94 updateAnimationPath(); 94 updateAnimationPath();
95 return; 95 return;
96 } 96 }
97 97
98 SVGAnimationElement::parseAttribute(name, oldValue, value); 98 SVGAnimationElement::parseAttribute(name, oldValue, value);
99 } 99 }
100 100
101 SVGAnimateMotionElement::RotateMode SVGAnimateMotionElement::getRotateMode() con st 101 SVGAnimateMotionElement::RotateMode SVGAnimateMotionElement::getRotateMode() con st
102 { 102 {
103 DEFINE_STATIC_LOCAL(const AtomicString, autoVal, ("auto", AtomicString::Cons tructFromLiteral)); 103 DEFINE_STATIC_LOCAL(const AtomicString, autoVal, ("auto"));
104 DEFINE_STATIC_LOCAL(const AtomicString, autoReverse, ("auto-reverse", Atomic String::ConstructFromLiteral)); 104 DEFINE_STATIC_LOCAL(const AtomicString, autoReverse, ("auto-reverse"));
105 const AtomicString& rotate = getAttribute(SVGNames::rotateAttr); 105 const AtomicString& rotate = getAttribute(SVGNames::rotateAttr);
106 if (rotate == autoVal) 106 if (rotate == autoVal)
107 return RotateAuto; 107 return RotateAuto;
108 if (rotate == autoReverse) 108 if (rotate == autoReverse)
109 return RotateAutoReverse; 109 return RotateAutoReverse;
110 return RotateAngle; 110 return RotateAngle;
111 } 111 }
112 112
113 void SVGAnimateMotionElement::updateAnimationPath() 113 void SVGAnimateMotionElement::updateAnimationPath()
114 { 114 {
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 void SVGAnimateMotionElement::updateAnimationMode() 313 void SVGAnimateMotionElement::updateAnimationMode()
314 { 314 {
315 if (!m_animationPath.isEmpty()) 315 if (!m_animationPath.isEmpty())
316 setAnimationMode(PathAnimation); 316 setAnimationMode(PathAnimation);
317 else 317 else
318 SVGAnimationElement::updateAnimationMode(); 318 SVGAnimationElement::updateAnimationMode();
319 } 319 }
320 320
321 } // namespace blink 321 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698