no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / svg / SVGTitleElement.h
blob52f8bf886ca87f7ff3ddc34b01ced9a465c4f30b
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_SVGTITLEELEMENT_H_
8 #define DOM_SVG_SVGTITLEELEMENT_H_
10 #include "mozilla/Attributes.h"
11 #include "SVGElement.h"
12 #include "nsStubMutationObserver.h"
14 nsresult NS_NewSVGTitleElement(
15 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
16 namespace mozilla::dom {
18 using SVGTitleElementBase = SVGElement;
20 class SVGTitleElement final : public SVGTitleElementBase,
21 public nsStubMutationObserver {
22 protected:
23 friend nsresult(::NS_NewSVGTitleElement(
24 nsIContent** aResult,
25 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
26 explicit SVGTitleElement(
27 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
28 ~SVGTitleElement() = default;
30 JSObject* WrapNode(JSContext* aCx,
31 JS::Handle<JSObject*> aGivenProto) override;
33 public:
34 // interfaces:
36 NS_DECL_ISUPPORTS_INHERITED
38 // nsIMutationObserver
39 NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
40 NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
41 NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
42 NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
44 nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
46 nsresult BindToTree(BindContext&, nsINode& aParent) override;
48 void UnbindFromTree(bool aNullParent = true) override;
50 void DoneAddingChildren(bool aHaveNotified) override;
52 private:
53 void SendTitleChangeEvent(bool aBound);
56 } // namespace mozilla::dom
58 #endif // DOM_SVG_SVGTITLEELEMENT_H_