SVGFEMergeNodeElement.cpp [plain text]
#include "config.h"
#include "SVGFEMergeNodeElement.h"
#include "RenderSVGResource.h"
#include "SVGFilterElement.h"
#include "SVGFilterPrimitiveStandardAttributes.h"
#include "SVGNames.h"
#include <wtf/IsoMallocInlines.h>
namespace WebCore {
WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEMergeNodeElement);
inline SVGFEMergeNodeElement::SVGFEMergeNodeElement(const QualifiedName& tagName, Document& document)
: SVGElement(tagName, document)
{
ASSERT(hasTagName(SVGNames::feMergeNodeTag));
registerAttributes();
}
Ref<SVGFEMergeNodeElement> SVGFEMergeNodeElement::create(const QualifiedName& tagName, Document& document)
{
return adoptRef(*new SVGFEMergeNodeElement(tagName, document));
}
void SVGFEMergeNodeElement::registerAttributes()
{
auto& registry = attributeRegistry();
if (!registry.isEmpty())
return;
registry.registerAttribute<SVGNames::inAttr, &SVGFEMergeNodeElement::m_in1>();
}
void SVGFEMergeNodeElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == SVGNames::inAttr) {
m_in1.setValue(value);
return;
}
SVGElement::parseAttribute(name, value);
}
void SVGFEMergeNodeElement::svgAttributeChanged(const QualifiedName& attrName)
{
if (attrName == SVGNames::inAttr) {
InstanceInvalidationGuard guard(*this);
invalidateFilterPrimitiveParent(this);
return;
}
SVGElement::svgAttributeChanged(attrName);
}
}