Bug 1560374 - Set testharness and reftest web-platform-tests to Tier-1; r=jmaher...
[gecko.git] / dom / html / HTMLTitleElement.h
blob44c3a56c3cab59adf18f275593dc6c692435b00c
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 mozilla_dom_HTMLTITLEElement_h_
8 #define mozilla_dom_HTMLTITLEElement_h_
10 #include "mozilla/Attributes.h"
11 #include "nsGenericHTMLElement.h"
12 #include "nsStubMutationObserver.h"
14 namespace mozilla {
15 class ErrorResult;
17 namespace dom {
19 class HTMLTitleElement final : public nsGenericHTMLElement,
20 public nsStubMutationObserver {
21 public:
22 using Element::GetText;
24 explicit HTMLTitleElement(
25 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
27 // nsISupports
28 NS_DECL_ISUPPORTS_INHERITED
30 // HTMLTitleElement
31 void GetText(DOMString& aText, ErrorResult& aError);
32 void SetText(const nsAString& aText, ErrorResult& aError);
34 // nsIMutationObserver
35 NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
36 NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
37 NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
38 NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
40 virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
42 virtual nsresult BindToTree(BindContext&, nsINode& aParent) override;
44 virtual void UnbindFromTree(bool aNullParent = true) override;
46 virtual void DoneAddingChildren(bool aHaveNotified) override;
48 protected:
49 virtual ~HTMLTitleElement();
51 JSObject* WrapNode(JSContext* cx, JS::Handle<JSObject*> aGivenProto) final;
53 private:
54 void SendTitleChangeEvent(bool aBound);
57 } // namespace dom
58 } // namespace mozilla
60 #endif // mozilla_dom_HTMLTitleElement_h_