Bug 1816170 - Disable perftest-on-autoland cron. r=aglavic
[gecko.git] / dom / html / HTMLHRElement.h
blob0adaf6aeed52ce4ab20782c48afe8e3254658097
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_HTMLHRElement_h
8 #define mozilla_dom_HTMLHRElement_h
10 #include "nsGenericHTMLElement.h"
11 #include "nsMappedAttributes.h"
12 #include "nsAttrValueInlines.h"
14 namespace mozilla::dom {
16 class HTMLHRElement final : public nsGenericHTMLElement {
17 public:
18 explicit HTMLHRElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
20 // nsISupports
21 NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLHRElement, nsGenericHTMLElement)
23 virtual bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
24 const nsAString& aValue,
25 nsIPrincipal* aMaybeScriptedPrincipal,
26 nsAttrValue& aResult) override;
27 NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
28 virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction()
29 const override;
30 virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
32 // WebIDL API
33 void GetAlign(nsAString& aValue) const {
34 GetHTMLAttr(nsGkAtoms::align, aValue);
36 void SetAlign(const nsAString& aAlign, ErrorResult& aError) {
37 SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
40 void GetColor(nsAString& aValue) const {
41 GetHTMLAttr(nsGkAtoms::color, aValue);
43 void SetColor(const nsAString& aColor, ErrorResult& aError) {
44 SetHTMLAttr(nsGkAtoms::color, aColor, aError);
47 bool NoShade() const { return GetBoolAttr(nsGkAtoms::noshade); }
48 void SetNoShade(bool aNoShade, ErrorResult& aError) {
49 SetHTMLBoolAttr(nsGkAtoms::noshade, aNoShade, aError);
52 void GetSize(nsAString& aValue) const {
53 GetHTMLAttr(nsGkAtoms::size, aValue);
55 void SetSize(const nsAString& aSize, ErrorResult& aError) {
56 SetHTMLAttr(nsGkAtoms::size, aSize, aError);
59 void GetWidth(nsAString& aValue) const {
60 GetHTMLAttr(nsGkAtoms::width, aValue);
62 void SetWidth(const nsAString& aWidth, ErrorResult& aError) {
63 SetHTMLAttr(nsGkAtoms::width, aWidth, aError);
66 protected:
67 virtual ~HTMLHRElement();
69 virtual JSObject* WrapNode(JSContext* aCx,
70 JS::Handle<JSObject*> aGivenProto) override;
72 private:
73 static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
74 MappedDeclarations&);
77 } // namespace mozilla::dom
79 #endif // mozilla_dom_HTMLHRElement_h