2015-05-03 19:32:37 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2013-01-04 17:02:14 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_HTMLParagraphElement_h
|
|
|
|
#define mozilla_dom_HTMLParagraphElement_h
|
|
|
|
|
2013-05-29 20:43:41 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-01-04 17:02:14 +00:00
|
|
|
|
|
|
|
#include "nsGenericHTMLElement.h"
|
|
|
|
|
2022-05-09 20:41:08 +00:00
|
|
|
namespace mozilla::dom {
|
2013-01-04 17:02:14 +00:00
|
|
|
|
2017-08-14 16:31:47 +00:00
|
|
|
class HTMLParagraphElement final : public nsGenericHTMLElement {
|
2013-01-04 17:02:14 +00:00
|
|
|
public:
|
2018-09-21 20:45:49 +00:00
|
|
|
explicit HTMLParagraphElement(
|
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
|
|
|
: nsGenericHTMLElement(std::move(aNodeInfo)) {}
|
2013-01-04 17:02:14 +00:00
|
|
|
|
|
|
|
// nsISupports
|
2018-02-12 20:44:40 +00:00
|
|
|
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLParagraphElement,
|
|
|
|
nsGenericHTMLElement)
|
2013-01-04 17:02:14 +00:00
|
|
|
|
2023-06-22 17:22:03 +00:00
|
|
|
bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|
|
|
const nsAString& aValue,
|
|
|
|
nsIPrincipal* aMaybeScriptedPrincipal,
|
|
|
|
nsAttrValue& aResult) override;
|
2017-10-02 22:05:19 +00:00
|
|
|
NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
|
2023-06-22 17:22:03 +00:00
|
|
|
nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
|
2013-01-04 17:02:14 +00:00
|
|
|
|
2023-06-22 17:22:03 +00:00
|
|
|
nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
|
2013-01-04 17:02:14 +00:00
|
|
|
|
2013-01-04 17:02:15 +00:00
|
|
|
// WebIDL API
|
2017-08-14 16:31:47 +00:00
|
|
|
void GetAlign(nsAString& aValue) { GetHTMLAttr(nsGkAtoms::align, aValue); }
|
2013-01-04 17:02:15 +00:00
|
|
|
void SetAlign(const nsAString& aValue, mozilla::ErrorResult& rv) {
|
|
|
|
SetHTMLAttr(nsGkAtoms::align, aValue, rv);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
2014-07-08 21:23:16 +00:00
|
|
|
virtual ~HTMLParagraphElement();
|
|
|
|
|
2023-06-22 17:22:03 +00:00
|
|
|
JSObject* WrapNode(JSContext*, JS::Handle<JSObject*> aGivenProto) override;
|
2013-11-19 19:21:29 +00:00
|
|
|
|
|
|
|
private:
|
2023-06-22 17:22:03 +00:00
|
|
|
static void MapAttributesIntoRule(MappedDeclarationsBuilder&);
|
2013-01-04 17:02:14 +00:00
|
|
|
};
|
|
|
|
|
2022-05-09 20:41:08 +00:00
|
|
|
} // namespace mozilla::dom
|
2013-01-04 17:02:14 +00:00
|
|
|
|
|
|
|
#endif // mozilla_dom_HTMLParagraphElement_h
|