summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGPatternElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/svg/SVGPatternElement.cpp')
-rw-r--r--WebCore/svg/SVGPatternElement.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/WebCore/svg/SVGPatternElement.cpp b/WebCore/svg/SVGPatternElement.cpp
index fe889e3..e258946 100644
--- a/WebCore/svg/SVGPatternElement.cpp
+++ b/WebCore/svg/SVGPatternElement.cpp
@@ -120,13 +120,19 @@ void SVGPatternElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGStyledElement::svgAttributeChanged(attrName);
- if (attrName == SVGNames::patternUnitsAttr
- || attrName == SVGNames::patternContentUnitsAttr
- || attrName == SVGNames::patternTransformAttr
- || attrName == SVGNames::xAttr
+ bool invalidateClients = false;
+ if (attrName == SVGNames::xAttr
|| attrName == SVGNames::yAttr
|| attrName == SVGNames::widthAttr
- || attrName == SVGNames::heightAttr
+ || attrName == SVGNames::heightAttr) {
+ invalidateClients = true;
+ updateRelativeLengthsInformation();
+ }
+
+ if (invalidateClients
+ || attrName == SVGNames::patternUnitsAttr
+ || attrName == SVGNames::patternContentUnitsAttr
+ || attrName == SVGNames::patternTransformAttr
|| SVGURIReference::isKnownAttribute(attrName)
|| SVGTests::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
@@ -239,6 +245,14 @@ PatternAttributes SVGPatternElement::collectPatternProperties() const
return attributes;
}
+bool SVGPatternElement::selfHasRelativeLengths() const
+{
+ return x().isRelative()
+ || y().isRelative()
+ || width().isRelative()
+ || height().isRelative();
+}
+
}
#endif // ENABLE(SVG)