#include "config.h"
#if ENABLE(SVG)
#include "SVGGElement.h"
#include "RenderSVGTransformableContainer.h"
namespace WebCore {
SVGGElement::SVGGElement(const QualifiedName& tagName, Document* doc)
: SVGStyledTransformableElement(tagName, doc)
, SVGTests()
, SVGLangSpace()
, SVGExternalResourcesRequired()
{
}
SVGGElement::~SVGGElement()
{
}
void SVGGElement::parseMappedAttribute(MappedAttribute* attr)
{
if (SVGTests::parseMappedAttribute(attr))
return;
if (SVGLangSpace::parseMappedAttribute(attr))
return;
if (SVGExternalResourcesRequired::parseMappedAttribute(attr))
return;
SVGStyledTransformableElement::parseMappedAttribute(attr);
}
void SVGGElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGStyledTransformableElement::svgAttributeChanged(attrName);
if (!renderer())
return;
if (attrName == SVGNames::clipPathUnitsAttr ||
SVGTests::isKnownAttribute(attrName) ||
SVGLangSpace::isKnownAttribute(attrName) ||
SVGExternalResourcesRequired::isKnownAttribute(attrName) ||
SVGStyledTransformableElement::isKnownAttribute(attrName))
renderer()->setNeedsLayout(true);
}
void SVGGElement::childrenChanged(bool changedByParser)
{
SVGStyledTransformableElement::childrenChanged(changedByParser);
if (renderer())
renderer()->setNeedsLayout(true);
}
RenderObject* SVGGElement::createRenderer(RenderArena* arena, RenderStyle* style)
{
return new (arena) RenderSVGTransformableContainer(this);
}
}
#endif // ENABLE(SVG)