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

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

Issue 456283002: Revert of [SVG2] Make transform, gradientTransform and patternTransform presentation attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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/SVGPatternElement.h ('k') | Source/core/svg/SVGRadialGradientElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPatternElement.cpp
diff --git a/Source/core/svg/SVGPatternElement.cpp b/Source/core/svg/SVGPatternElement.cpp
index cce1bad7ac5d2c317f9d91171fc0a9b9ee3fdd1b..f8cb010227b0fdbc4c012a0a1567ca7d7941c935 100644
--- a/Source/core/svg/SVGPatternElement.cpp
+++ b/Source/core/svg/SVGPatternElement.cpp
@@ -56,21 +56,6 @@
}
DEFINE_NODE_FACTORY(SVGPatternElement)
-
-bool SVGPatternElement::isPresentationAttribute(const QualifiedName& name) const
-{
- if (name == SVGNames::patternTransformAttr)
- return true;
- return SVGElement::isPresentationAttribute(name);
-}
-
-void SVGPatternElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
-{
- if (name == SVGNames::patternTransformAttr)
- addPropertyToPresentationAttributeStyle(style, CSSPropertyTransform, value);
- else
- SVGElement::collectStyleForPresentationAttribute(name, value, style);
-}
bool SVGPatternElement::isSupportedAttribute(const QualifiedName& attrName)
{
@@ -127,11 +112,6 @@
return;
}
- if (attrName == SVGNames::patternTransformAttr) {
- invalidateSVGPresentationAttributeStyle();
- setNeedsStyleRecalc(LocalStyleChange);
- }
-
SVGElement::InvalidationGuard invalidationGuard(this);
if (attrName == SVGNames::xAttr
@@ -187,18 +167,10 @@
if (!attributes.hasPatternContentUnits() && element->patternContentUnits()->isSpecified())
attributes.setPatternContentUnits(element->patternContentUnits()->currentValue()->enumValue());
- if (!attributes.hasPatternTransform()) {
+ if (!attributes.hasPatternTransform() && element->patternTransform()->isSpecified()) {
AffineTransform transform;
- bool hasTransform = element->getStyleTransform(transform);
-
- // If CSS property was set, use that, otherwise fallback to attribute (if set).
- if (!hasTransform && element->patternTransform()->isSpecified()) {
- element->patternTransform()->currentValue()->concatenate(transform);
- hasTransform = true;
- }
-
- if (hasTransform)
- attributes.setPatternTransform(transform);
+ element->patternTransform()->currentValue()->concatenate(transform);
+ attributes.setPatternTransform(transform);
}
if (!attributes.hasPatternContentElement() && ElementTraversal::firstWithin(*element))
« no previous file with comments | « Source/core/svg/SVGPatternElement.h ('k') | Source/core/svg/SVGRadialGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698