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_HTMLBRElement_h
8 #define mozilla_dom_HTMLBRElement_h
10 #include "mozilla/Attributes.h"
11 #include "nsGenericHTMLElement.h"
12 #include "nsGkAtoms.h"
17 class HTMLBRElement final
: public nsGenericHTMLElement
20 explicit HTMLBRElement(already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
22 virtual bool ParseAttribute(int32_t aNamespaceID
,
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() const override
;
29 virtual nsresult
Clone(dom::NodeInfo
*, nsINode
** aResult
) const override
;
33 return GetBoolAttr(nsGkAtoms::clear
);
35 void SetClear(const nsAString
& aClear
, ErrorResult
& aError
)
37 return SetHTMLAttr(nsGkAtoms::clear
, aClear
, aError
);
39 void GetClear(DOMString
& aClear
) const
41 return GetHTMLAttr(nsGkAtoms::clear
, aClear
);
44 virtual JSObject
* WrapNode(JSContext
*aCx
, JS::Handle
<JSObject
*> aGivenProto
) override
;
47 virtual ~HTMLBRElement();
49 static void MapAttributesIntoRule(const nsMappedAttributes
* aAttributes
,
54 } // namespace mozilla