SVGFETileElement.cpp [plain text]
#include "config.h"
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "SVGFETileElement.h"
#include "Attr.h"
#include "MappedAttribute.h"
#include "SVGRenderStyle.h"
namespace WebCore {
SVGFETileElement::SVGFETileElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
{
}
SVGFETileElement::~SVGFETileElement()
{
}
void SVGFETileElement::parseMappedAttribute(MappedAttribute* attr)
{
const String& value = attr->value();
if (attr->name() == SVGNames::inAttr)
setIn1BaseValue(value);
else
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
void SVGFETileElement::synchronizeProperty(const QualifiedName& attrName)
{
SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
if (attrName == anyQName() || attrName == SVGNames::inAttr)
synchronizeIn1();
}
PassRefPtr<FilterEffect> SVGFETileElement::build(SVGFilterBuilder* filterBuilder)
{
FilterEffect* input1 = filterBuilder->getEffectById(in1());
if (!input1)
return 0;
return FETile::create(input1);
}
}
#endif // ENABLE(SVG)