/src/mozilla-central/dom/svg/SVGFEMergeElement.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #include "mozilla/dom/SVGFEMergeElement.h" |
8 | | #include "mozilla/dom/SVGFEMergeElementBinding.h" |
9 | | #include "mozilla/dom/SVGFEMergeNodeElement.h" |
10 | | |
11 | | NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEMerge) |
12 | | |
13 | | using namespace mozilla::gfx; |
14 | | |
15 | | namespace mozilla { |
16 | | namespace dom { |
17 | | |
18 | | JSObject* |
19 | | SVGFEMergeElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) |
20 | 0 | { |
21 | 0 | return SVGFEMergeElement_Binding::Wrap(aCx, this, aGivenProto); |
22 | 0 | } |
23 | | |
24 | | nsSVGElement::StringInfo SVGFEMergeElement::sStringInfo[1] = |
25 | | { |
26 | | { &nsGkAtoms::result, kNameSpaceID_None, true } |
27 | | }; |
28 | | |
29 | | NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEMergeElement) |
30 | | |
31 | | FilterPrimitiveDescription |
32 | | SVGFEMergeElement::GetPrimitiveDescription(nsSVGFilterInstance* aInstance, |
33 | | const IntRect& aFilterSubregion, |
34 | | const nsTArray<bool>& aInputsAreTainted, |
35 | | nsTArray<RefPtr<SourceSurface>>& aInputImages) |
36 | 0 | { |
37 | 0 | return FilterPrimitiveDescription(AsVariant(MergeAttributes())); |
38 | 0 | } |
39 | | |
40 | | void |
41 | | SVGFEMergeElement::GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources) |
42 | 0 | { |
43 | 0 | for (nsIContent* child = nsINode::GetFirstChild(); |
44 | 0 | child; |
45 | 0 | child = child->GetNextSibling()) { |
46 | 0 | if (child->IsSVGElement(nsGkAtoms::feMergeNode)) { |
47 | 0 | SVGFEMergeNodeElement* node = static_cast<SVGFEMergeNodeElement*>(child); |
48 | 0 | aSources.AppendElement(nsSVGStringInfo(node->GetIn1(), node)); |
49 | 0 | } |
50 | 0 | } |
51 | 0 | } |
52 | | |
53 | | //---------------------------------------------------------------------- |
54 | | // nsSVGElement methods |
55 | | |
56 | | nsSVGElement::StringAttributesInfo |
57 | | SVGFEMergeElement::GetStringInfo() |
58 | 0 | { |
59 | 0 | return StringAttributesInfo(mStringAttributes, sStringInfo, |
60 | 0 | ArrayLength(sStringInfo)); |
61 | 0 | } |
62 | | |
63 | | } // namespace dom |
64 | | } // namespace mozilla |