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

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

Issue 896773002: [svg2] Make 'x' and 'y' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 10 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/SVGAnimationElement.h ('k') | Source/core/svg/SVGElement.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 d5d17e363bd2cdd24a2bc4c2d233ce6f14ce21e9..ea34b38e5da966ad1a6df438e3e5584d111a0697 100644
--- a/Source/core/svg/SVGAnimationElement.cpp
+++ b/Source/core/svg/SVGAnimationElement.cpp
@@ -368,7 +368,7 @@ bool SVGAnimationElement::isTargetAttributeCSSProperty(SVGElement* targetElement
{
ASSERT(targetElement);
- return SVGElement::isAnimatableCSSProperty(attributeName);
+ return SVGElement::isAnimatableCSSProperty(attributeName) || targetElement->isPresentationAttribute(attributeName);
}
SVGAnimationElement::ShouldApplyAnimation SVGAnimationElement::shouldApplyAnimation(SVGElement* targetElement, const QualifiedName& attributeName)
@@ -377,9 +377,12 @@ SVGAnimationElement::ShouldApplyAnimation SVGAnimationElement::shouldApplyAnimat
return DontApplyAnimation;
// Always animate CSS properties, using the ApplyCSSAnimation code path, regardless of the attributeType value.
- if (isTargetAttributeCSSProperty(targetElement, attributeName))
- return ApplyCSSAnimation;
+ if (isTargetAttributeCSSProperty(targetElement, attributeName)) {
+ if (targetElement->isPresentationAttributeWithSVGDOM(attributeName))
+ return ApplyXMLandCSSAnimation;
+ return ApplyCSSAnimation;
+ }
// If attributeType="CSS" and attributeName doesn't point to a CSS property, ignore the animation.
if (attributeType() == AttributeTypeCSS)
return DontApplyAnimation;
« no previous file with comments | « Source/core/svg/SVGAnimationElement.h ('k') | Source/core/svg/SVGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698