Bug 1266851. Make <xmp> and <listing> use HTMLPreElement as their primary interface, per <https://github.com/whatwg/html/issues/1015>. r=peterv
This commit is contained in:
@@ -64,6 +64,10 @@ HTMLPreElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
NS_IMETHODIMP_(bool)
|
||||
HTMLPreElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
if (!mNodeInfo->Equals(nsGkAtoms::pre)) {
|
||||
return nsGenericHTMLElement::IsAttributeMapped(aAttribute);
|
||||
}
|
||||
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsGkAtoms::wrap },
|
||||
{ nullptr },
|
||||
@@ -80,6 +84,10 @@ HTMLPreElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
nsMapRuleToAttributesFunc
|
||||
HTMLPreElement::GetAttributeMappingFunction() const
|
||||
{
|
||||
if (!mNodeInfo->Equals(nsGkAtoms::pre)) {
|
||||
return nsGenericHTMLElement::GetAttributeMappingFunction();
|
||||
}
|
||||
|
||||
return &MapAttributesIntoRule;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user