summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGFEFloodElement.cpp
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
committerFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
commit5f1ab04193ad0130ca8204aadaceae083aca9881 (patch)
tree5a92cd389e2cfe7fb67197ce14b38469462379f8 /WebCore/svg/SVGFEFloodElement.cpp
parent194315e5a908cc8ed67d597010544803eef1ac59 (diff)
downloadexternal_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.zip
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.gz
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.bz2
Get WebKit r44544.
Diffstat (limited to 'WebCore/svg/SVGFEFloodElement.cpp')
-rw-r--r--WebCore/svg/SVGFEFloodElement.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/WebCore/svg/SVGFEFloodElement.cpp b/WebCore/svg/SVGFEFloodElement.cpp
index 98e7d6f..e12b4e1 100644
--- a/WebCore/svg/SVGFEFloodElement.cpp
+++ b/WebCore/svg/SVGFEFloodElement.cpp
@@ -22,13 +22,11 @@
#include "config.h"
-#if ENABLE(SVG) && ENABLE(SVG_FILTERS)
+#if ENABLE(SVG) && ENABLE(FILTERS)
#include "SVGFEFloodElement.h"
-#include "Attr.h"
-#include "Document.h"
+#include "MappedAttribute.h"
#include "RenderStyle.h"
-#include "SVGNames.h"
#include "SVGRenderStyle.h"
#include "SVGResourceFilter.h"
@@ -36,7 +34,7 @@ namespace WebCore {
SVGFEFloodElement::SVGFEFloodElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_filterEffect(0)
+ , m_in1(this, SVGNames::inAttr)
{
}
@@ -46,23 +44,27 @@ SVGFEFloodElement::~SVGFEFloodElement()
void SVGFEFloodElement::parseMappedAttribute(MappedAttribute* attr)
{
- SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
+ const String& value = attr->value();
+ if (attr->name() == SVGNames::inAttr)
+ setIn1BaseValue(value);
+ else
+ SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
-SVGFilterEffect* SVGFEFloodElement::filterEffect(SVGResourceFilter* filter) const
+bool SVGFEFloodElement::build(SVGResourceFilter* filterResource)
{
- ASSERT_NOT_REACHED();
- return 0;
-}
+ FilterEffect* input = filterResource->builder()->getEffectById(in1());
+
+ if(!input)
+ return false;
-bool SVGFEFloodElement::build(FilterBuilder* builder)
-{
RefPtr<RenderStyle> filterStyle = styleForRenderer();
Color color = filterStyle->svgStyle()->floodColor();
float opacity = filterStyle->svgStyle()->floodOpacity();
- builder->add(result(), FEFlood::create(color, opacity));
+ RefPtr<FilterEffect> effect = FEFlood::create(input, color, opacity);
+ filterResource->addFilterEffect(this, effect.release());
return true;
}