Bug 1919824 - Make `NativeKey::GetFollowingCharMessage` return `false` when removed...
[gecko.git] / dom / svg / SVGFilterElement.h
blob8ee3696a94c37ac4577d687ce10f50a2d6155fc8
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/. */
7 #ifndef DOM_SVG_SVGFILTERELEMENT_H_
8 #define DOM_SVG_SVGFILTERELEMENT_H_
10 #include "SVGAnimatedEnumeration.h"
11 #include "SVGAnimatedLength.h"
12 #include "SVGAnimatedString.h"
13 #include "mozilla/dom/SVGElement.h"
15 nsresult NS_NewSVGFilterElement(
16 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
18 namespace mozilla {
19 class SVGFilterFrame;
20 class SVGFilterInstance;
22 namespace dom {
23 class DOMSVGAnimatedLength;
25 using SVGFilterElementBase = SVGElement;
27 class SVGFilterElement final : public SVGFilterElementBase {
28 friend class mozilla::SVGFilterFrame;
29 friend class mozilla::SVGFilterInstance;
31 protected:
32 friend nsresult(::NS_NewSVGFilterElement(
33 nsIContent** aResult,
34 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
35 explicit SVGFilterElement(
36 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
37 JSObject* WrapNode(JSContext* cx, JS::Handle<JSObject*> aGivenProto) override;
39 public:
40 NS_IMPL_FROMNODE_WITH_TAG(SVGFilterElement, kNameSpaceID_SVG, filter)
42 // nsIContent
43 nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
45 // SVGSVGElement methods:
46 bool HasValidDimensions() const override;
48 // WebIDL
49 already_AddRefed<DOMSVGAnimatedLength> X();
50 already_AddRefed<DOMSVGAnimatedLength> Y();
51 already_AddRefed<DOMSVGAnimatedLength> Width();
52 already_AddRefed<DOMSVGAnimatedLength> Height();
53 already_AddRefed<DOMSVGAnimatedEnumeration> FilterUnits();
54 already_AddRefed<DOMSVGAnimatedEnumeration> PrimitiveUnits();
55 already_AddRefed<DOMSVGAnimatedString> Href();
57 protected:
58 LengthAttributesInfo GetLengthInfo() override;
59 EnumAttributesInfo GetEnumInfo() override;
60 StringAttributesInfo GetStringInfo() override;
62 enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
63 SVGAnimatedLength mLengthAttributes[4];
64 static LengthInfo sLengthInfo[4];
66 enum { FILTERUNITS, PRIMITIVEUNITS };
67 SVGAnimatedEnumeration mEnumAttributes[2];
68 static EnumInfo sEnumInfo[2];
70 enum { HREF, XLINK_HREF };
71 SVGAnimatedString mStringAttributes[2];
72 static StringInfo sStringInfo[2];
75 } // namespace dom
76 } // namespace mozilla
78 #endif // DOM_SVG_SVGFILTERELEMENT_H_