Bug 1890793: Assert CallArgs::newTarget is not gray. r=spidermonkey-reviewers,sfink...
[gecko.git] / dom / svg / SVGClipPathElement.h
blob7f00753a46b457e42324698f940b7761d187faec
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_SVGCLIPPATHELEMENT_H_
8 #define DOM_SVG_SVGCLIPPATHELEMENT_H_
10 #include "SVGAnimatedEnumeration.h"
11 #include "mozilla/dom/SVGTransformableElement.h"
13 nsresult NS_NewSVGClipPathElement(
14 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
16 namespace mozilla {
17 class SVGClipPathFrame;
19 namespace dom {
21 using SVGClipPathElementBase = SVGTransformableElement;
23 class SVGClipPathElement final : public SVGClipPathElementBase {
24 friend class mozilla::SVGClipPathFrame;
26 protected:
27 friend nsresult(::NS_NewSVGClipPathElement(
28 nsIContent** aResult,
29 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
30 explicit SVGClipPathElement(
31 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
32 JSObject* WrapNode(JSContext* cx, JS::Handle<JSObject*> aGivenProto) override;
34 public:
35 nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
37 // WebIDL
38 already_AddRefed<DOMSVGAnimatedEnumeration> ClipPathUnits();
40 // This is an internal method that does not flush style, and thus
41 // the answer may be out of date if there's a pending style flush.
42 bool IsUnitsObjectBoundingBox() const;
44 protected:
45 enum { CLIPPATHUNITS };
46 SVGAnimatedEnumeration mEnumAttributes[1];
47 static EnumInfo sEnumInfo[1];
49 EnumAttributesInfo GetEnumInfo() override;
52 } // namespace dom
53 } // namespace mozilla
55 #endif // DOM_SVG_SVGCLIPPATHELEMENT_H_