summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGForeignObjectElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/svg/SVGForeignObjectElement.cpp')
-rw-r--r--WebCore/svg/SVGForeignObjectElement.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/WebCore/svg/SVGForeignObjectElement.cpp b/WebCore/svg/SVGForeignObjectElement.cpp
index e3e8fab..d6bf1cf 100644
--- a/WebCore/svg/SVGForeignObjectElement.cpp
+++ b/WebCore/svg/SVGForeignObjectElement.cpp
@@ -76,6 +76,14 @@ void SVGForeignObjectElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGStyledTransformableElement::svgAttributeChanged(attrName);
+ bool isLengthAttribute = attrName == SVGNames::xAttr
+ || attrName == SVGNames::yAttr
+ || attrName == SVGNames::widthAttr
+ || attrName == SVGNames::heightAttr;
+
+ if (isLengthAttribute)
+ updateRelativeLengthsInformation();
+
RenderObject* renderer = this->renderer();
if (!renderer)
return;
@@ -86,10 +94,7 @@ void SVGForeignObjectElement::svgAttributeChanged(const QualifiedName& attrName)
return;
}
- if (attrName == SVGNames::xAttr
- || attrName == SVGNames::yAttr
- || attrName == SVGNames::widthAttr
- || attrName == SVGNames::heightAttr
+ if (isLengthAttribute
|| SVGTests::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
|| SVGExternalResourcesRequired::isKnownAttribute(attrName))
@@ -139,6 +144,14 @@ bool SVGForeignObjectElement::childShouldCreateRenderer(Node* child) const
return StyledElement::childShouldCreateRenderer(child);
}
+bool SVGForeignObjectElement::selfHasRelativeLengths() const
+{
+ return x().isRelative()
+ || y().isRelative()
+ || width().isRelative()
+ || height().isRelative();
+}
+
}
#endif