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)
: SVGGraphicsElement(tagName, document)
, 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 AtomString& value)
{
SVGGraphicsElement::parseAttribute(name, value);
SVGFitToViewBox::parseAttribute(name, value);
}
bool SVGSymbolElement::selfHasRelativeLengths() const
{
return hasAttribute(SVGNames::viewBoxAttr);
}
RenderPtr<RenderElement> SVGSymbolElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&)
{
return createRenderer<RenderSVGHiddenContainer>(*this, WTFMove(style));
}
}