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_SVGFESpecularLightingElement_h
8 : #define mozilla_dom_SVGFESpecularLightingElement_h
9 :
10 : #include "nsSVGFilters.h"
11 :
12 : nsresult NS_NewSVGFESpecularLightingElement(nsIContent **aResult,
13 : already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
14 :
15 : namespace mozilla {
16 : namespace dom {
17 :
18 : //---------------------SpecularLighting------------------------
19 :
20 : typedef nsSVGFELightingElement SVGFESpecularLightingElementBase;
21 :
22 0 : class SVGFESpecularLightingElement : public SVGFESpecularLightingElementBase
23 : {
24 : friend nsresult (::NS_NewSVGFESpecularLightingElement(nsIContent **aResult,
25 : already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
26 : protected:
27 0 : explicit SVGFESpecularLightingElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
28 0 : : SVGFESpecularLightingElementBase(aNodeInfo)
29 : {
30 0 : }
31 : virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
32 :
33 : public:
34 : virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
35 : bool aPreallocateChildren) const override;
36 :
37 : virtual FilterPrimitiveDescription
38 : GetPrimitiveDescription(nsSVGFilterInstance* aInstance,
39 : const IntRect& aFilterSubregion,
40 : const nsTArray<bool>& aInputsAreTainted,
41 : nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
42 : virtual bool AttributeAffectsRendering(
43 : int32_t aNameSpaceID, nsIAtom* aAttribute) const override;
44 :
45 : // WebIDL
46 : already_AddRefed<SVGAnimatedString> In1();
47 : already_AddRefed<SVGAnimatedNumber> SurfaceScale();
48 : already_AddRefed<SVGAnimatedNumber> SpecularConstant();
49 : already_AddRefed<SVGAnimatedNumber> SpecularExponent();
50 : already_AddRefed<SVGAnimatedNumber> KernelUnitLengthX();
51 : already_AddRefed<SVGAnimatedNumber> KernelUnitLengthY();
52 : };
53 :
54 : } // namespace dom
55 : } // namespace mozilla
56 :
57 : #endif // mozilla_dom_SVGFESpecularLightingElement_h
|