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

Unified Diff: Source/core/svg/SVGGraphicsElement.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/SVGGraphicsElement.cpp
diff --git a/Source/core/svg/SVGGraphicsElement.cpp b/Source/core/svg/SVGGraphicsElement.cpp
index 08e178a6969d1cfb0b55bb502638960209e31e5e..f07625ff3d72bc6f8fd07cf82dccff471d2c4b41 100644
--- a/Source/core/svg/SVGGraphicsElement.cpp
+++ b/Source/core/svg/SVGGraphicsElement.cpp
@@ -43,6 +43,21 @@ SVGGraphicsElement::~SVGGraphicsElement()
{
}
+bool SVGGraphicsElement::isPresentationAttribute(const QualifiedName& name) const
+{
+ if (name == SVGNames::transformAttr)
+ return true;
+ return SVGElement::isPresentationAttribute(name);
+}
+
+void SVGGraphicsElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
+{
+ if (name == SVGNames::transformAttr)
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyTransform, value);
+ else
+ SVGElement::collectStyleForPresentationAttribute(name, value, style);
+}
+
PassRefPtr<SVGMatrixTearOff> SVGGraphicsElement::getTransformToElement(SVGElement* target, ExceptionState& exceptionState)
{
AffineTransform ctm = getCTM(AllowStyleUpdate);
@@ -202,6 +217,8 @@ void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName)
return;
if (attrName == SVGNames::transformAttr) {
+ invalidateSVGPresentationAttributeStyle();
pdr. 2014/08/01 22:43:10 We don't make these calls for many other other pre
Erik Dahlström (inactive) 2014/08/04 13:57:57 We do call invalidateSVGPresentationAttributeStyle
+ setNeedsStyleRecalc(SubtreeStyleChange);
object->setNeedsTransformUpdate();
RenderSVGResource::markForLayoutAndParentResourceInvalidation(object);
return;

Powered by Google App Engine
This is Rietveld 408576698