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

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

Issue 423093014: [SVG2] Make transform, gradientTransform and patternTransform presentation attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: transform attr syntax should match property, with minor quirks Created 6 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
Index: Source/core/svg/SVGGradientElement.cpp
diff --git a/Source/core/svg/SVGGradientElement.cpp b/Source/core/svg/SVGGradientElement.cpp
index 05e3e30dc6d37f25d78e5b1921418766f7977212..94b60d01414414dc9cd8df5f55bc45cff90e710f 100644
--- a/Source/core/svg/SVGGradientElement.cpp
+++ b/Source/core/svg/SVGGradientElement.cpp
@@ -57,6 +57,21 @@ SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d
addToPropertyMap(m_gradientUnits);
}
+bool SVGGradientElement::isPresentationAttribute(const QualifiedName& name) const
+{
+ if (name == SVGNames::gradientTransformAttr)
+ return true;
+ return SVGElement::isPresentationAttribute(name);
+}
+
+void SVGGradientElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
+{
+ if (name == SVGNames::gradientTransformAttr)
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyTransform, value);
+ else
+ SVGElement::collectStyleForPresentationAttribute(name, value, style);
+}
+
bool SVGGradientElement::isSupportedAttribute(const QualifiedName& attrName)
{
DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());

Powered by Google App Engine
This is Rietveld 408576698