diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
commit | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch) | |
tree | 4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/svg/SVGFEMergeElement.cpp | |
parent | 9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff) | |
download | external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/svg/SVGFEMergeElement.cpp')
-rw-r--r-- | WebCore/svg/SVGFEMergeElement.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/WebCore/svg/SVGFEMergeElement.cpp b/WebCore/svg/SVGFEMergeElement.cpp index 7c7fd75..5ccf403 100644 --- a/WebCore/svg/SVGFEMergeElement.cpp +++ b/WebCore/svg/SVGFEMergeElement.cpp @@ -38,23 +38,30 @@ SVGFEMergeElement::SVGFEMergeElement(const QualifiedName& tagName, Document* doc SVGFEMergeElement::~SVGFEMergeElement() { - delete m_filterEffect; } -SVGFEMerge* SVGFEMergeElement::filterEffect(SVGResourceFilter* filter) const +SVGFilterEffect* SVGFEMergeElement::filterEffect(SVGResourceFilter* filter) const { - if (!m_filterEffect) - m_filterEffect = new SVGFEMerge(filter); - setStandardAttributes(m_filterEffect); + ASSERT_NOT_REACHED(); + return 0; +} - Vector<String> mergeInputs; +bool SVGFEMergeElement::build(FilterBuilder* builder) +{ + Vector<FilterEffect*> mergeInputs; for (Node* n = firstChild(); n != 0; n = n->nextSibling()) { - if (n->hasTagName(SVGNames::feMergeNodeTag)) - mergeInputs.append(static_cast<SVGFEMergeNodeElement*>(n)->in1()); + if (n->hasTagName(SVGNames::feMergeNodeTag)) { + FilterEffect* mergeEffect = builder->getEffectById(static_cast<SVGFEMergeNodeElement*>(n)->in1()); + mergeInputs.append(mergeEffect); + } } - m_filterEffect->setMergeInputs(mergeInputs); - return m_filterEffect; + if(mergeInputs.isEmpty()) + return false; + + builder->add(result(), FEMerge::create(mergeInputs)); + + return true; } } |