/work/obj-fuzz/dist/include/mozilla/dom/HTMLFrameElement.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_HTMLFrameElement_h |
8 | | #define mozilla_dom_HTMLFrameElement_h |
9 | | |
10 | | #include "mozilla/Attributes.h" |
11 | | #include "nsGenericHTMLFrameElement.h" |
12 | | #include "nsGkAtoms.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace dom { |
16 | | |
17 | | class HTMLFrameElement final : public nsGenericHTMLFrameElement |
18 | | { |
19 | | public: |
20 | | using nsGenericHTMLFrameElement::SwapFrameLoaders; |
21 | | |
22 | | explicit HTMLFrameElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo, |
23 | | FromParser aFromParser = NOT_FROM_PARSER); |
24 | | |
25 | | // nsISupports |
26 | | NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLFrameElement, |
27 | | nsGenericHTMLFrameElement) |
28 | | |
29 | | NS_IMPL_FROMNODE_HTML_WITH_TAG(HTMLFrameElement, frame) |
30 | | |
31 | | // nsIContent |
32 | | virtual bool ParseAttribute(int32_t aNamespaceID, |
33 | | nsAtom* aAttribute, |
34 | | const nsAString& aValue, |
35 | | nsIPrincipal* aMaybeScriptedPrincipal, |
36 | | nsAttrValue& aResult) override; |
37 | | virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override; |
38 | | |
39 | | // WebIDL API |
40 | | void GetFrameBorder(DOMString& aFrameBorder) const |
41 | 0 | { |
42 | 0 | GetHTMLAttr(nsGkAtoms::frameborder, aFrameBorder); |
43 | 0 | } |
44 | | void SetFrameBorder(const nsAString& aFrameBorder, ErrorResult& aError) |
45 | 0 | { |
46 | 0 | SetHTMLAttr(nsGkAtoms::frameborder, aFrameBorder, aError); |
47 | 0 | } |
48 | | |
49 | | void GetLongDesc(nsAString& aLongDesc) const |
50 | 0 | { |
51 | 0 | GetURIAttr(nsGkAtoms::longdesc, nullptr, aLongDesc); |
52 | 0 | } |
53 | | void SetLongDesc(const nsAString& aLongDesc, ErrorResult& aError) |
54 | 0 | { |
55 | 0 | SetHTMLAttr(nsGkAtoms::longdesc, aLongDesc); |
56 | 0 | } |
57 | | |
58 | | void GetMarginHeight(DOMString& aMarginHeight) const |
59 | 0 | { |
60 | 0 | GetHTMLAttr(nsGkAtoms::marginheight, aMarginHeight); |
61 | 0 | } |
62 | | void SetMarginHeight(const nsAString& aMarginHeight, ErrorResult& aError) |
63 | 0 | { |
64 | 0 | SetHTMLAttr(nsGkAtoms::marginheight, aMarginHeight, aError); |
65 | 0 | } |
66 | | |
67 | | void GetMarginWidth(DOMString& aMarginWidth) const |
68 | 0 | { |
69 | 0 | GetHTMLAttr(nsGkAtoms::marginwidth, aMarginWidth); |
70 | 0 | } |
71 | | void SetMarginWidth(const nsAString& aMarginWidth, ErrorResult& aError) |
72 | 0 | { |
73 | 0 | SetHTMLAttr(nsGkAtoms::marginwidth, aMarginWidth, aError); |
74 | 0 | } |
75 | | |
76 | | void GetName(DOMString& aName) const |
77 | 0 | { |
78 | 0 | GetHTMLAttr(nsGkAtoms::name, aName); |
79 | 0 | } |
80 | | void SetName(const nsAString& aName, ErrorResult& aError) |
81 | 0 | { |
82 | 0 | SetHTMLAttr(nsGkAtoms::name, aName, aError); |
83 | 0 | } |
84 | | |
85 | | bool NoResize() const |
86 | 0 | { |
87 | 0 | return GetBoolAttr(nsGkAtoms::noresize); |
88 | 0 | } |
89 | | void SetNoResize(bool& aNoResize, ErrorResult& aError) |
90 | 0 | { |
91 | 0 | SetHTMLBoolAttr(nsGkAtoms::noresize, aNoResize, aError); |
92 | 0 | } |
93 | | |
94 | | void GetScrolling(DOMString& aScrolling) const |
95 | 0 | { |
96 | 0 | GetHTMLAttr(nsGkAtoms::scrolling, aScrolling); |
97 | 0 | } |
98 | | void SetScrolling(const nsAString& aScrolling, ErrorResult& aError) |
99 | 0 | { |
100 | 0 | SetHTMLAttr(nsGkAtoms::scrolling, aScrolling, aError); |
101 | 0 | } |
102 | | |
103 | | void GetSrc(nsString& aSrc) |
104 | 0 | { |
105 | 0 | GetURIAttr(nsGkAtoms::src, nullptr, aSrc); |
106 | 0 | } |
107 | | void SetSrc(const nsAString& aSrc, nsIPrincipal* aTriggeringPrincipal, ErrorResult& aError) |
108 | 0 | { |
109 | 0 | SetHTMLAttr(nsGkAtoms::src, aSrc, aTriggeringPrincipal, aError); |
110 | 0 | } |
111 | | |
112 | | using nsGenericHTMLFrameElement::GetContentDocument; |
113 | | using nsGenericHTMLFrameElement::GetContentWindow; |
114 | | |
115 | | NS_FORWARD_NSIFRAMELOADEROWNER(nsGenericHTMLFrameElement::) |
116 | | |
117 | | protected: |
118 | | virtual ~HTMLFrameElement(); |
119 | | |
120 | | virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override; |
121 | | |
122 | | private: |
123 | | static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, |
124 | | MappedDeclarations&); |
125 | | }; |
126 | | |
127 | | } // namespace dom |
128 | | } // namespace mozilla |
129 | | |
130 | | #endif // mozilla_dom_HTMLFrameElement_h |