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

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

Issue 1006493002: [svg2] Exclude <pattern> from having x and y presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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') | no next file » | 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 d6111487d1f246c2f9189238e354fe93cc412705..279e76796dc356938d46871bc3685f31ab699cdb 100644
--- a/Source/core/svg/SVGPatternElement.cpp
+++ b/Source/core/svg/SVGPatternElement.cpp
@@ -88,31 +88,6 @@ bool SVGPatternElement::isSupportedAttribute(const QualifiedName& attrName)
return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
}
-bool SVGPatternElement::isPresentationAttribute(const QualifiedName& attrName) const
-{
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr)
- return true;
- return SVGElement::isPresentationAttribute(attrName);
-}
-
-bool SVGPatternElement::isPresentationAttributeWithSVGDOM(const QualifiedName& attrName) const
-{
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr)
- return true;
- return SVGElement::isPresentationAttributeWithSVGDOM(attrName);
-}
-
-void SVGPatternElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
-{
- RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute(name);
- if (property == m_x)
- addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyX, *m_x->currentValue());
- else if (property == m_y)
- addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyY, *m_y->currentValue());
- else
- SVGElement::collectStyleForPresentationAttribute(name, value, style);
-}
-
void SVGPatternElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
parseAttributeNew(name, value);
@@ -128,10 +103,10 @@ void SVGPatternElement::svgAttributeChanged(const QualifiedName& attrName)
SVGElement::InvalidationGuard invalidationGuard(this);
if (attrName == SVGNames::xAttr
- || attrName == SVGNames::yAttr) {
- invalidateSVGPresentationAttributeStyle();
- setNeedsStyleRecalc(LocalStyleChange,
- StyleChangeReasonForTracing::fromAttribute(attrName));
+ || attrName == SVGNames::yAttr
+ || attrName == SVGNames::widthAttr
+ || attrName == SVGNames::heightAttr) {
+ updateRelativeLengthsInformation();
fs 2015/03/12 16:31:39 Nit: This block is now duplicated. One should be e
Erik Dahlström (inactive) 2015/03/13 09:04:33 Ehrm, not sure how I missed that :)
}
if (attrName == SVGNames::xAttr
« no previous file with comments | « Source/core/svg/SVGPatternElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698