summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGFEOffsetElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/svg/SVGFEOffsetElement.cpp')
-rw-r--r--WebCore/svg/SVGFEOffsetElement.cpp61
1 files changed, 33 insertions, 28 deletions
diff --git a/WebCore/svg/SVGFEOffsetElement.cpp b/WebCore/svg/SVGFEOffsetElement.cpp
index 28955c0..006bb3b 100644
--- a/WebCore/svg/SVGFEOffsetElement.cpp
+++ b/WebCore/svg/SVGFEOffsetElement.cpp
@@ -1,22 +1,22 @@
/*
- Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
- 2004, 2005 Rob Buis <buis@kde.org>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
+ * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
+ * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
#include "config.h"
@@ -24,8 +24,6 @@
#include "SVGFEOffsetElement.h"
#include "Attr.h"
-#include "MappedAttribute.h"
-#include "SVGResourceFilter.h"
namespace WebCore {
@@ -38,7 +36,7 @@ SVGFEOffsetElement::~SVGFEOffsetElement()
{
}
-void SVGFEOffsetElement::parseMappedAttribute(MappedAttribute* attr)
+void SVGFEOffsetElement::parseMappedAttribute(Attribute* attr)
{
const String& value = attr->value();
if (attr->name() == SVGNames::dxAttr)
@@ -51,6 +49,16 @@ void SVGFEOffsetElement::parseMappedAttribute(MappedAttribute* attr)
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
+void SVGFEOffsetElement::svgAttributeChanged(const QualifiedName& attrName)
+{
+ SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
+
+ if (attrName == SVGNames::inAttr
+ || attrName == SVGNames::dxAttr
+ || attrName == SVGNames::dyAttr)
+ SVGFilterElement::invalidateFilter(this);
+}
+
void SVGFEOffsetElement::synchronizeProperty(const QualifiedName& attrName)
{
SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
@@ -70,17 +78,14 @@ void SVGFEOffsetElement::synchronizeProperty(const QualifiedName& attrName)
synchronizeIn1();
}
-bool SVGFEOffsetElement::build(SVGResourceFilter* filterResource)
+PassRefPtr<FilterEffect> SVGFEOffsetElement::build(SVGFilterBuilder* filterBuilder)
{
- FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
+ FilterEffect* input1 = filterBuilder->getEffectById(in1());
if (!input1)
- return false;
-
- RefPtr<FilterEffect> effect = FEOffset::create(input1, dx(), dy());
- filterResource->addFilterEffect(this, effect.release());
+ return 0;
- return true;
+ return FEOffset::create(input1, dx(), dy());
}
}