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

Unified Diff: Source/core/svg/animation/SVGSMILElement.cpp

Issue 1074813002: Remove isSupportedAttribute in svg (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixups Created 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/svg/animation/SVGSMILElement.cpp
diff --git a/Source/core/svg/animation/SVGSMILElement.cpp b/Source/core/svg/animation/SVGSMILElement.cpp
index aa2d3ead55f203a0ca7e15b8e5be34d52aa9379e..7173d3185e48fed0d2d51cfbbcb2225a78573504 100644
--- a/Source/core/svg/animation/SVGSMILElement.cpp
+++ b/Source/core/svg/animation/SVGSMILElement.cpp
@@ -507,24 +507,6 @@ void SVGSMILElement::parseBeginOrEnd(const String& parseString, BeginOrEnd begin
sortTimeList(timeList);
}
-bool SVGSMILElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- SVGTests::addSupportedAttributes(supportedAttributes);
- supportedAttributes.add(SVGNames::beginAttr);
- supportedAttributes.add(SVGNames::endAttr);
- supportedAttributes.add(SVGNames::durAttr);
- supportedAttributes.add(SVGNames::repeatDurAttr);
- supportedAttributes.add(SVGNames::repeatCountAttr);
- supportedAttributes.add(SVGNames::minAttr);
- supportedAttributes.add(SVGNames::maxAttr);
- supportedAttributes.add(SVGNames::attributeNameAttr);
- supportedAttributes.add(XLinkNames::hrefAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
void SVGSMILElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == SVGNames::beginAttr) {
@@ -556,11 +538,6 @@ void SVGSMILElement::parseAttribute(const QualifiedName& name, const AtomicStrin
void SVGSMILElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGElement::svgAttributeChanged(attrName);
- return;
- }
-
if (attrName == SVGNames::durAttr)
m_cachedDur = invalidCachedTime;
else if (attrName == SVGNames::repeatDurAttr)
@@ -578,11 +555,16 @@ void SVGSMILElement::svgAttributeChanged(const QualifiedName& attrName)
buildPendingResource();
if (m_targetElement)
clearAnimatedType();
- } else if (inDocument()) {
- if (attrName == SVGNames::beginAttr)
- beginListChanged(elapsed());
- else if (attrName == SVGNames::endAttr)
- endListChanged(elapsed());
+ } else if (attrName == SVGNames::beginAttr || attrName == SVGNames::beginAttr) {
fs 2015/04/10 14:25:24 One of these should be endAttr.
Erik Dahlström (inactive) 2015/04/10 15:33:44 %) Done.
+ if (inDocument()) {
+ if (attrName == SVGNames::beginAttr)
+ beginListChanged(elapsed());
+ else if (attrName == SVGNames::endAttr)
+ endListChanged(elapsed());
+ }
+ } else {
+ SVGElement::svgAttributeChanged(attrName);
+ return;
}
animationAttributeChanged();
« Source/core/svg/SVGTextPositioningElement.cpp ('K') | « Source/core/svg/animation/SVGSMILElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698