mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 838233 - Rename nsHTMLHRElement to HTMLHRElement. r=Ms2ger
--HG-- rename : content/html/content/src/nsHTMLHRElement.cpp => content/html/content/src/HTMLHRElement.cpp rename : content/html/content/src/nsHTMLHRElement.cpp => content/html/content/src/HTMLHRElement.h
This commit is contained in:
parent
7055ccb18f
commit
8be89b4046
@ -3,93 +3,43 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "mozilla/Util.h"
|
#include "mozilla/dom/HTMLHRElement.h"
|
||||||
|
|
||||||
#include "nsGenericHTMLElement.h"
|
|
||||||
#include "nsIDOMHTMLHRElement.h"
|
|
||||||
|
|
||||||
#include "nsIDOMEventTarget.h"
|
|
||||||
#include "nsGkAtoms.h"
|
|
||||||
#include "nsStyleConsts.h"
|
|
||||||
#include "nsPresContext.h"
|
|
||||||
#include "nsMappedAttributes.h"
|
|
||||||
#include "nsAttrValueInlines.h"
|
|
||||||
#include "nsRuleData.h"
|
|
||||||
#include "nsCSSProps.h"
|
|
||||||
|
|
||||||
using namespace mozilla;
|
|
||||||
using namespace mozilla::dom;
|
|
||||||
|
|
||||||
class nsHTMLHRElement : public nsGenericHTMLElement,
|
|
||||||
public nsIDOMHTMLHRElement
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
nsHTMLHRElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
|
||||||
virtual ~nsHTMLHRElement();
|
|
||||||
|
|
||||||
// nsISupports
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
|
||||||
|
|
||||||
// nsIDOMNode
|
|
||||||
NS_FORWARD_NSIDOMNODE_TO_NSINODE
|
|
||||||
|
|
||||||
// nsIDOMElement
|
|
||||||
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
|
||||||
|
|
||||||
// nsIDOMHTMLElement
|
|
||||||
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
|
||||||
|
|
||||||
// nsIDOMHTMLHRElement
|
|
||||||
NS_DECL_NSIDOMHTMLHRELEMENT
|
|
||||||
|
|
||||||
virtual bool ParseAttribute(int32_t aNamespaceID,
|
|
||||||
nsIAtom* aAttribute,
|
|
||||||
const nsAString& aValue,
|
|
||||||
nsAttrValue& aResult);
|
|
||||||
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
|
||||||
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
|
|
||||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
|
||||||
virtual nsXPCClassInfo* GetClassInfo();
|
|
||||||
virtual nsIDOMNode* AsDOMNode() { return this; }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_NS_NEW_HTML_ELEMENT(HR)
|
NS_IMPL_NS_NEW_HTML_ELEMENT(HR)
|
||||||
|
DOMCI_NODE_DATA(HTMLHRElement, mozilla::dom::HTMLHRElement)
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
|
||||||
nsHTMLHRElement::nsHTMLHRElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
HTMLHRElement::HTMLHRElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
: nsGenericHTMLElement(aNodeInfo)
|
: nsGenericHTMLElement(aNodeInfo)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
nsHTMLHRElement::~nsHTMLHRElement()
|
HTMLHRElement::~HTMLHRElement()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMPL_ADDREF_INHERITED(HTMLHRElement, Element)
|
||||||
|
NS_IMPL_RELEASE_INHERITED(HTMLHRElement, Element)
|
||||||
|
|
||||||
NS_IMPL_ADDREF_INHERITED(nsHTMLHRElement, Element)
|
// QueryInterface implementation for HTMLHRElement
|
||||||
NS_IMPL_RELEASE_INHERITED(nsHTMLHRElement, Element)
|
NS_INTERFACE_TABLE_HEAD(HTMLHRElement)
|
||||||
|
NS_HTML_CONTENT_INTERFACE_TABLE1(HTMLHRElement,
|
||||||
|
|
||||||
DOMCI_NODE_DATA(HTMLHRElement, nsHTMLHRElement)
|
|
||||||
|
|
||||||
// QueryInterface implementation for nsHTMLHRElement
|
|
||||||
NS_INTERFACE_TABLE_HEAD(nsHTMLHRElement)
|
|
||||||
NS_HTML_CONTENT_INTERFACE_TABLE1(nsHTMLHRElement,
|
|
||||||
nsIDOMHTMLHRElement)
|
nsIDOMHTMLHRElement)
|
||||||
NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(nsHTMLHRElement,
|
NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLHRElement,
|
||||||
nsGenericHTMLElement)
|
nsGenericHTMLElement)
|
||||||
NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLHRElement)
|
NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLHRElement)
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE(nsHTMLHRElement)
|
NS_IMPL_ELEMENT_CLONE(HTMLHRElement)
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_STRING_ATTR(nsHTMLHRElement, Align, align)
|
NS_IMPL_STRING_ATTR(HTMLHRElement, Align, align)
|
||||||
NS_IMPL_BOOL_ATTR(nsHTMLHRElement, NoShade, noshade)
|
NS_IMPL_BOOL_ATTR(HTMLHRElement, NoShade, noshade)
|
||||||
NS_IMPL_STRING_ATTR(nsHTMLHRElement, Size, size)
|
NS_IMPL_STRING_ATTR(HTMLHRElement, Size, size)
|
||||||
NS_IMPL_STRING_ATTR(nsHTMLHRElement, Width, width)
|
NS_IMPL_STRING_ATTR(HTMLHRElement, Width, width)
|
||||||
NS_IMPL_STRING_ATTR(nsHTMLHRElement, Color, color)
|
NS_IMPL_STRING_ATTR(HTMLHRElement, Color, color)
|
||||||
|
|
||||||
static const nsAttrValue::EnumTable kAlignTable[] = {
|
static const nsAttrValue::EnumTable kAlignTable[] = {
|
||||||
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
|
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
|
||||||
@ -99,10 +49,10 @@ static const nsAttrValue::EnumTable kAlignTable[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool
|
bool
|
||||||
nsHTMLHRElement::ParseAttribute(int32_t aNamespaceID,
|
HTMLHRElement::ParseAttribute(int32_t aNamespaceID,
|
||||||
nsIAtom* aAttribute,
|
nsIAtom* aAttribute,
|
||||||
const nsAString& aValue,
|
const nsAString& aValue,
|
||||||
nsAttrValue& aResult)
|
nsAttrValue& aResult)
|
||||||
{
|
{
|
||||||
if (aNamespaceID == kNameSpaceID_None) {
|
if (aNamespaceID == kNameSpaceID_None) {
|
||||||
if (aAttribute == nsGkAtoms::width) {
|
if (aAttribute == nsGkAtoms::width) {
|
||||||
@ -289,7 +239,7 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP_(bool)
|
NS_IMETHODIMP_(bool)
|
||||||
nsHTMLHRElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
HTMLHRElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||||
{
|
{
|
||||||
static const MappedAttributeEntry attributes[] = {
|
static const MappedAttributeEntry attributes[] = {
|
||||||
{ &nsGkAtoms::align },
|
{ &nsGkAtoms::align },
|
||||||
@ -310,7 +260,10 @@ nsHTMLHRElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
|||||||
|
|
||||||
|
|
||||||
nsMapRuleToAttributesFunc
|
nsMapRuleToAttributesFunc
|
||||||
nsHTMLHRElement::GetAttributeMappingFunction() const
|
HTMLHRElement::GetAttributeMappingFunction() const
|
||||||
{
|
{
|
||||||
return &MapAttributesIntoRule;
|
return &MapAttributesIntoRule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace mozilla
|
||||||
|
} // namespace dom
|
56
content/html/content/src/HTMLHRElement.h
Normal file
56
content/html/content/src/HTMLHRElement.h
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
|
/* 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_HTMLHRElement_h
|
||||||
|
#define mozilla_dom_HTMLHRElement_h
|
||||||
|
|
||||||
|
#include "nsGenericHTMLElement.h"
|
||||||
|
#include "nsIDOMHTMLHRElement.h"
|
||||||
|
#include "nsIDOMEventTarget.h"
|
||||||
|
#include "nsMappedAttributes.h"
|
||||||
|
#include "nsAttrValueInlines.h"
|
||||||
|
#include "nsRuleData.h"
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
|
||||||
|
class HTMLHRElement : public nsGenericHTMLElement,
|
||||||
|
public nsIDOMHTMLHRElement
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HTMLHRElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||||
|
virtual ~HTMLHRElement();
|
||||||
|
|
||||||
|
// nsISupports
|
||||||
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
|
|
||||||
|
// nsIDOMNode
|
||||||
|
NS_FORWARD_NSIDOMNODE_TO_NSINODE
|
||||||
|
|
||||||
|
// nsIDOMElement
|
||||||
|
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
||||||
|
|
||||||
|
// nsIDOMHTMLElement
|
||||||
|
NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC
|
||||||
|
|
||||||
|
// nsIDOMHTMLHRElement
|
||||||
|
NS_DECL_NSIDOMHTMLHRELEMENT
|
||||||
|
|
||||||
|
virtual bool ParseAttribute(int32_t aNamespaceID,
|
||||||
|
nsIAtom* aAttribute,
|
||||||
|
const nsAString& aValue,
|
||||||
|
nsAttrValue& aResult);
|
||||||
|
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||||
|
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
|
||||||
|
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||||
|
virtual nsXPCClassInfo* GetClassInfo();
|
||||||
|
virtual nsIDOMNode* AsDOMNode() { return this; }
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace dom
|
||||||
|
} // namespace mozilla
|
||||||
|
|
||||||
|
#endif // mozilla_dom_HTMLHRElement_h
|
@ -38,6 +38,7 @@ EXPORTS_mozilla/dom = \
|
|||||||
HTMLFontElement.h \
|
HTMLFontElement.h \
|
||||||
HTMLFrameSetElement.h \
|
HTMLFrameSetElement.h \
|
||||||
HTMLHeadingElement.h \
|
HTMLHeadingElement.h \
|
||||||
|
HTMLHRElement.h \
|
||||||
HTMLImageElement.h \
|
HTMLImageElement.h \
|
||||||
HTMLLabelElement.h \
|
HTMLLabelElement.h \
|
||||||
HTMLLIElement.h \
|
HTMLLIElement.h \
|
||||||
@ -84,7 +85,7 @@ CPPSRCS = \
|
|||||||
nsHTMLFormElement.cpp \
|
nsHTMLFormElement.cpp \
|
||||||
nsHTMLFrameElement.cpp \
|
nsHTMLFrameElement.cpp \
|
||||||
HTMLFrameSetElement.cpp \
|
HTMLFrameSetElement.cpp \
|
||||||
nsHTMLHRElement.cpp \
|
HTMLHRElement.cpp \
|
||||||
HTMLHeadingElement.cpp \
|
HTMLHeadingElement.cpp \
|
||||||
nsHTMLIFrameElement.cpp \
|
nsHTMLIFrameElement.cpp \
|
||||||
HTMLImageElement.cpp \
|
HTMLImageElement.cpp \
|
||||||
|
Loading…
Reference in New Issue
Block a user