Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/HTMLMetaElement.h
Line
Count
Source (jump to first uncovered line)
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/. */
6
7
#ifndef mozilla_dom_HTMLMetaElement_h
8
#define mozilla_dom_HTMLMetaElement_h
9
10
#include "mozilla/Attributes.h"
11
#include "nsGenericHTMLElement.h"
12
13
namespace mozilla {
14
namespace dom {
15
16
class HTMLMetaElement final : public nsGenericHTMLElement
17
{
18
public:
19
  explicit HTMLMetaElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
20
21
  // nsISupports
22
  NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLMetaElement, nsGenericHTMLElement)
23
24
  virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
25
                              nsIContent* aBindingParent) override;
26
  virtual void UnbindFromTree(bool aDeep = true,
27
                              bool aNullParent = true) override;
28
29
  virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
30
                                const nsAttrValue* aValue,
31
                                const nsAttrValue* aOldValue,
32
                                nsIPrincipal* aSubjectPrincipal,
33
                                bool aNotify) override;
34
35
  void CreateAndDispatchEvent(nsIDocument* aDoc, const nsAString& aEventName);
36
37
  virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
38
39
  void GetName(nsAString& aValue)
40
0
  {
41
0
    GetHTMLAttr(nsGkAtoms::name, aValue);
42
0
  }
43
  void SetName(const nsAString& aName, ErrorResult& aRv)
44
0
  {
45
0
    SetHTMLAttr(nsGkAtoms::name, aName, aRv);
46
0
  }
47
  void GetHttpEquiv(nsAString& aValue)
48
0
  {
49
0
    GetHTMLAttr(nsGkAtoms::httpEquiv, aValue);
50
0
  }
51
  void SetHttpEquiv(const nsAString& aHttpEquiv, ErrorResult& aRv)
52
0
  {
53
0
    SetHTMLAttr(nsGkAtoms::httpEquiv, aHttpEquiv, aRv);
54
0
  }
55
  void GetContent(nsAString& aValue)
56
0
  {
57
0
    GetHTMLAttr(nsGkAtoms::content, aValue);
58
0
  }
59
  void SetContent(const nsAString& aContent, ErrorResult& aRv)
60
0
  {
61
0
    SetHTMLAttr(nsGkAtoms::content, aContent, aRv);
62
0
  }
63
  void GetScheme(nsAString& aValue)
64
0
  {
65
0
    GetHTMLAttr(nsGkAtoms::scheme, aValue);
66
0
  }
67
  void SetScheme(const nsAString& aScheme, ErrorResult& aRv)
68
0
  {
69
0
    SetHTMLAttr(nsGkAtoms::scheme, aScheme, aRv);
70
0
  }
71
72
  virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
73
74
protected:
75
  virtual ~HTMLMetaElement();
76
77
private:
78
  void SetMetaReferrer(nsIDocument* aDocument);
79
};
80
81
} // namespace dom
82
} // namespace mozilla
83
84
#endif // mozilla_dom_HTMLMetaElement_h