Bumping manifests a=b2g-bump
[gecko.git] / dom / svg / SVGFEBlendElement.h
blob39e50fb15f8ab7c19063ad8e0f7019337d84fbcb
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_SVGFEBlendElement_h
7 #define mozilla_dom_SVGFEBlendElement_h
9 #include "nsSVGFilters.h"
10 #include "nsSVGEnum.h"
12 nsresult NS_NewSVGFEBlendElement(nsIContent **aResult,
13 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
14 namespace mozilla {
15 namespace dom {
17 typedef nsSVGFE SVGFEBlendElementBase;
19 class SVGFEBlendElement : public SVGFEBlendElementBase
21 friend nsresult (::NS_NewSVGFEBlendElement(nsIContent **aResult,
22 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
23 protected:
24 explicit SVGFEBlendElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
25 : SVGFEBlendElementBase(aNodeInfo)
28 virtual JSObject* WrapNode(JSContext *cx) MOZ_OVERRIDE;
30 public:
31 virtual FilterPrimitiveDescription
32 GetPrimitiveDescription(nsSVGFilterInstance* aInstance,
33 const IntRect& aFilterSubregion,
34 const nsTArray<bool>& aInputsAreTainted,
35 nsTArray<mozilla::RefPtr<SourceSurface>>& aInputImages) MOZ_OVERRIDE;
36 virtual bool AttributeAffectsRendering(
37 int32_t aNameSpaceID, nsIAtom* aAttribute) const MOZ_OVERRIDE;
38 virtual nsSVGString& GetResultImageName() MOZ_OVERRIDE { return mStringAttributes[RESULT]; }
39 virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources) MOZ_OVERRIDE;
41 virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
43 // WebIDL
44 already_AddRefed<SVGAnimatedString> In1();
45 already_AddRefed<SVGAnimatedString> In2();
46 already_AddRefed<SVGAnimatedEnumeration> Mode();
48 protected:
50 virtual EnumAttributesInfo GetEnumInfo() MOZ_OVERRIDE;
51 virtual StringAttributesInfo GetStringInfo() MOZ_OVERRIDE;
53 enum { MODE };
54 nsSVGEnum mEnumAttributes[1];
55 static nsSVGEnumMapping sModeMap[];
56 static EnumInfo sEnumInfo[1];
58 enum { RESULT, IN1, IN2 };
59 nsSVGString mStringAttributes[3];
60 static StringInfo sStringInfo[3];
63 } // namespace dom
64 } // namespace mozilla
66 #endif // mozilla_dom_SVGFEBlendElement_h