Line data Source code
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 : #ifndef mozilla_dom_SVGFEComponentTransferElement_h
8 : #define mozilla_dom_SVGFEComponentTransferElement_h
9 :
10 : #include "nsSVGFilters.h"
11 :
12 : typedef nsSVGFE SVGFEComponentTransferElementBase;
13 :
14 : nsresult NS_NewSVGFEComponentTransferElement(nsIContent **aResult,
15 : already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
16 :
17 : namespace mozilla {
18 : namespace dom {
19 :
20 0 : class SVGFEComponentTransferElement : public SVGFEComponentTransferElementBase
21 : {
22 : friend nsresult (::NS_NewSVGFEComponentTransferElement(nsIContent **aResult,
23 : already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
24 : protected:
25 0 : explicit SVGFEComponentTransferElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
26 0 : : SVGFEComponentTransferElementBase(aNodeInfo)
27 : {
28 0 : }
29 : virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
30 :
31 : public:
32 : virtual FilterPrimitiveDescription
33 : GetPrimitiveDescription(nsSVGFilterInstance* aInstance,
34 : const IntRect& aFilterSubregion,
35 : const nsTArray<bool>& aInputsAreTainted,
36 : nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
37 : virtual bool AttributeAffectsRendering(
38 : int32_t aNameSpaceID, nsIAtom* aAttribute) const override;
39 0 : virtual nsSVGString& GetResultImageName() override { return mStringAttributes[RESULT]; }
40 : virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources) override;
41 :
42 : // nsIContent
43 : virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
44 : bool aPreallocateChildren) const override;
45 :
46 : // WebIDL
47 : already_AddRefed<SVGAnimatedString> In1();
48 :
49 : protected:
50 : virtual StringAttributesInfo GetStringInfo() override;
51 :
52 : enum { RESULT, IN1 };
53 : nsSVGString mStringAttributes[2];
54 : static StringInfo sStringInfo[2];
55 : };
56 :
57 : } // namespace dom
58 : } // namespace mozilla
59 :
60 : #endif // mozilla_dom_SVGFEComponentTransferElement_h
|