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

Unified Diff: Source/WebCore/svg/SVGAnimationElement.cpp

Issue 11186052: Revert 131767 - Merge 130777 - Prevent animation when CSS attributeType is invalid. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 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
« no previous file with comments | « Source/WebCore/svg/SVGAnimationElement.h ('k') | Source/WebCore/svg/animation/SVGSMILElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/svg/SVGAnimationElement.cpp
===================================================================
--- Source/WebCore/svg/SVGAnimationElement.cpp (revision 131773)
+++ Source/WebCore/svg/SVGAnimationElement.cpp (working copy)
@@ -55,8 +55,6 @@
, m_fromPropertyValueType(RegularPropertyValue)
, m_toPropertyValueType(RegularPropertyValue)
, m_animationValid(false)
- , m_attributeType(AttributeTypeAuto)
- , m_hasInvalidCSSAttributeType(false)
{
registerAnimatedPropertiesForSVGAnimationElement();
}
@@ -147,7 +145,6 @@
supportedAttributes.add(SVGNames::keyTimesAttr);
supportedAttributes.add(SVGNames::keyPointsAttr);
supportedAttributes.add(SVGNames::keySplinesAttr);
- supportedAttributes.add(SVGNames::attributeTypeAttr);
}
return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslator>(attrName);
}
@@ -188,11 +185,6 @@
return;
}
- if (attribute.name() == SVGNames::attributeTypeAttr) {
- setAttributeType(attribute.value());
- return;
- }
-
if (SVGTests::parseAttribute(attribute))
return;
if (SVGExternalResourcesRequired::parseAttribute(attribute))
@@ -289,17 +281,16 @@
return hasTagName(SVGNames::animateMotionTag) ? CalcModePaced : CalcModeLinear;
}
-void SVGAnimationElement::setAttributeType(const AtomicString& attributeType)
-{
+SVGAnimationElement::AttributeType SVGAnimationElement::attributeType() const
+{
DEFINE_STATIC_LOCAL(const AtomicString, css, ("CSS"));
DEFINE_STATIC_LOCAL(const AtomicString, xml, ("XML"));
- if (attributeType == css)
- m_attributeType = AttributeTypeCSS;
- else if (attributeType == xml)
- m_attributeType = AttributeTypeXML;
- else
- m_attributeType = AttributeTypeAuto;
- checkInvalidCSSAttributeType(targetElement(DoNotResolveNewTarget));
+ const AtomicString& value = fastGetAttribute(SVGNames::attributeTypeAttr);
+ if (value == css)
+ return AttributeTypeCSS;
+ if (value == xml)
+ return AttributeTypeXML;
+ return AttributeTypeAuto;
}
String SVGAnimationElement::toValue() const
@@ -657,25 +648,6 @@
m_toPropertyValueType = InheritValue;
}
-void SVGAnimationElement::targetElementWillChange(SVGElement* currentTarget, SVGElement* newTarget)
-{
- SVGSMILElement::targetElementWillChange(currentTarget, newTarget);
-
- checkInvalidCSSAttributeType(newTarget);
}
-void SVGAnimationElement::setAttributeName(const QualifiedName& attributeName)
-{
- SVGSMILElement::setAttributeName(attributeName);
-
- checkInvalidCSSAttributeType(targetElement(DoNotResolveNewTarget));
-}
-
-void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target)
-{
- m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attributeType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(target, attributeName());
-}
-
-}
-
#endif // ENABLE(SVG)
« no previous file with comments | « Source/WebCore/svg/SVGAnimationElement.h ('k') | Source/WebCore/svg/animation/SVGSMILElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698