SVGSymbolElement.cpp [plain text]
#include "config.h"
#include "SVGSymbolElement.h"
#include "RenderSVGHiddenContainer.h"
#include "SVGFitToViewBox.h"
#include "SVGNames.h"
#include <wtf/IsoMallocInlines.h>
namespace WebCore {
WTF_MAKE_ISO_ALLOCATED_IMPL(SVGSymbolElement);
inline SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document& document)
: SVGElement(tagName, document)
, SVGExternalResourcesRequired(this)
, SVGFitToViewBox(this)
{
ASSERT(hasTagName(SVGNames::symbolTag));
}
Ref<SVGSymbolElement> SVGSymbolElement::create(const QualifiedName& tagName, Document& document)
{
return adoptRef(*new SVGSymbolElement(tagName, document));
}
void SVGSymbolElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
SVGElement::parseAttribute(name, value);
SVGExternalResourcesRequired::parseAttribute(name, value);
SVGFitToViewBox::parseAttribute(name, value);
}
void SVGSymbolElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGElement::svgAttributeChanged(attrName);
SVGExternalResourcesRequired::svgAttributeChanged(attrName);
}
bool SVGSymbolElement::selfHasRelativeLengths() const
{
return hasAttribute(SVGNames::viewBoxAttr);
}
RenderPtr<RenderElement> SVGSymbolElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&)
{
return createRenderer<RenderSVGHiddenContainer>(*this, WTFMove(style));
}
}