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

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

Issue 21042009: [SVG2] Merge SVGStyledElement into SVGElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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/core/svg/SVGAnimatedType.cpp ('k') | Source/core/svg/SVGDescElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimationElement.cpp
diff --git a/Source/core/svg/SVGAnimationElement.cpp b/Source/core/svg/SVGAnimationElement.cpp
index eb570ffa08533ec97b4a059fc2525b5cd6441df8..6e7f664525d22ddec5bb96db72dcb7e91c99fb30 100644
--- a/Source/core/svg/SVGAnimationElement.cpp
+++ b/Source/core/svg/SVGAnimationElement.cpp
@@ -33,8 +33,8 @@
#include "core/page/UseCounter.h"
#include "core/platform/FloatConversion.h"
#include "core/svg/SVGAnimateElement.h"
+#include "core/svg/SVGElement.h"
#include "core/svg/SVGParserUtilities.h"
-#include "core/svg/SVGStyledElement.h"
#include "wtf/MathExtras.h"
namespace WebCore {
@@ -362,10 +362,8 @@ bool SVGAnimationElement::isAccumulated() const
bool SVGAnimationElement::isTargetAttributeCSSProperty(SVGElement* targetElement, const QualifiedName& attributeName)
{
ASSERT(targetElement);
- if (!targetElement->isSVGStyledElement())
- return false;
- return SVGStyledElement::isAnimatableCSSProperty(attributeName);
+ return SVGElement::isAnimatableCSSProperty(attributeName);
}
SVGAnimationElement::ShouldApplyAnimation SVGAnimationElement::shouldApplyAnimation(SVGElement* targetElement, const QualifiedName& attributeName)
@@ -643,7 +641,6 @@ void SVGAnimationElement::updateAnimation(float percent, unsigned repeatCount, S
void SVGAnimationElement::computeCSSPropertyValue(SVGElement* element, CSSPropertyID id, String& value)
{
ASSERT(element);
- ASSERT(element->isSVGStyledElement());
// Don't include any properties resulting from CSS Transitions/Animations or SMIL animations, as we want to retrieve the "base value".
element->setUseOverrideComputedStyle(true);
@@ -662,8 +659,6 @@ void SVGAnimationElement::adjustForInheritance(SVGElement* targetElement, const
return;
SVGElement* svgParent = toSVGElement(parent);
- if (!svgParent->isSVGStyledElement())
- return;
computeCSSPropertyValue(svgParent, cssPropertyID(attributeName.localName()), value);
}
@@ -672,9 +667,9 @@ static bool inheritsFromProperty(SVGElement* targetElement, const QualifiedName&
ASSERT(targetElement);
DEFINE_STATIC_LOCAL(const AtomicString, inherit, ("inherit", AtomicString::ConstructFromLiteral));
- if (value.isEmpty() || value != inherit || !targetElement->isSVGStyledElement())
+ if (value.isEmpty() || value != inherit)
return false;
- return SVGStyledElement::isAnimatableCSSProperty(attributeName);
+ return SVGElement::isAnimatableCSSProperty(attributeName);
}
void SVGAnimationElement::determinePropertyValueTypes(const String& from, const String& to)
« no previous file with comments | « Source/core/svg/SVGAnimatedType.cpp ('k') | Source/core/svg/SVGDescElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698