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

Unified Diff: third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp

Issue 2391993006: Move handling of 'attributeType' to SVGAnimateElement (Closed)
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/svg/SVGAnimationElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b080c1423156364ce9c49136e32adb8a44bf4248..eb9ba5a4ef4bac4baa996f0383a337bb2a8668e3 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
@@ -37,8 +37,6 @@ SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName,
Document& document)
: SVGSMILElement(tagName, document),
m_animationValid(false),
- m_attributeType(AttributeTypeAuto),
- m_hasInvalidCSSAttributeType(false),
m_calcMode(CalcModeLinear),
m_animationMode(NoAnimation) {
ASSERT(RuntimeEnabledFeatures::smilEnabled());
@@ -188,11 +186,6 @@ void SVGAnimationElement::parseAttribute(const QualifiedName& name,
return;
}
- if (name == SVGNames::attributeTypeAttr) {
- setAttributeType(value);
- return;
- }
-
if (name == SVGNames::calcModeAttr) {
setCalcMode(value);
return;
@@ -211,7 +204,6 @@ void SVGAnimationElement::svgAttributeChanged(const QualifiedName& attrName) {
if (attrName == SVGNames::valuesAttr || attrName == SVGNames::byAttr ||
attrName == SVGNames::fromAttr || attrName == SVGNames::toAttr ||
attrName == SVGNames::calcModeAttr ||
- attrName == SVGNames::attributeTypeAttr ||
attrName == SVGNames::keySplinesAttr ||
attrName == SVGNames::keyPointsAttr ||
attrName == SVGNames::keyTimesAttr) {
@@ -312,18 +304,6 @@ void SVGAnimationElement::setCalcMode(const AtomicString& calcMode) {
: CalcModeLinear);
}
-void SVGAnimationElement::setAttributeType(const AtomicString& attributeType) {
- 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();
-}
-
String SVGAnimationElement::toValue() const {
return fastGetAttribute(SVGNames::toAttr);
}
@@ -657,35 +637,4 @@ void SVGAnimationElement::updateAnimation(float percent,
calculateAnimatedValue(effectivePercent, repeatCount, resultElement);
}
-void SVGAnimationElement::setTargetElement(SVGElement* target) {
- SVGSMILElement::setTargetElement(target);
- checkInvalidCSSAttributeType();
-}
-
-void SVGAnimationElement::setAttributeName(const QualifiedName& attributeName) {
- SVGSMILElement::setAttributeName(attributeName);
- checkInvalidCSSAttributeType();
-}
-
-void SVGAnimationElement::checkInvalidCSSAttributeType() {
- bool hasInvalidCSSAttributeType =
- targetElement() && hasValidAttributeName() &&
- getAttributeType() == AttributeTypeCSS &&
- !isTargetAttributeCSSProperty(targetElement(), attributeName());
-
- if (hasInvalidCSSAttributeType != m_hasInvalidCSSAttributeType) {
- if (hasInvalidCSSAttributeType)
- unscheduleIfScheduled();
-
- m_hasInvalidCSSAttributeType = hasInvalidCSSAttributeType;
-
- if (!hasInvalidCSSAttributeType)
- schedule();
- }
-
- // Clear values that may depend on the previous target.
- if (targetElement())
- clearAnimatedType();
-}
-
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGAnimationElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698