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
);
17 class SVGClipPathFrame
;
21 using SVGClipPathElementBase
= SVGTransformableElement
;
23 class SVGClipPathElement final
: public SVGClipPathElementBase
{
24 friend class mozilla::SVGClipPathFrame
;
27 friend nsresult(::NS_NewSVGClipPathElement(
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
;
35 nsresult
Clone(dom::NodeInfo
*, nsINode
** aResult
) const override
;
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;
45 enum { CLIPPATHUNITS
};
46 SVGAnimatedEnumeration mEnumAttributes
[1];
47 static EnumInfo sEnumInfo
[1];
49 EnumAttributesInfo
GetEnumInfo() override
;
53 } // namespace mozilla
55 #endif // DOM_SVG_SVGCLIPPATHELEMENT_H_