mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
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:
parent
e00900da05
commit
907c772eb9
@ -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;
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ HTML_TAG("label", "Label");
|
||||
HTML_TAG("legend", "Legend");
|
||||
HTML_TAG("li", "LI");
|
||||
HTML_TAG("link", "Link");
|
||||
HTML_TAG("listing", "");
|
||||
HTML_TAG("listing", "Pre");
|
||||
HTML_TAG("main", "");
|
||||
HTML_TAG("map", "Map");
|
||||
HTML_TAG("mark", "");
|
||||
@ -223,7 +223,7 @@ HTML_TAG("u", "");
|
||||
HTML_TAG("ul", "UList");
|
||||
HTML_TAG("var", "");
|
||||
HTML_TAG("wbr", "");
|
||||
HTML_TAG("xmp", "");
|
||||
HTML_TAG("xmp", "Pre");
|
||||
|
||||
function tagName(aTag) {
|
||||
return "<" + aTag + ">";
|
||||
|
@ -105,7 +105,7 @@ HTML_TAG(label, Label)
|
||||
HTML_TAG(legend, Legend)
|
||||
HTML_TAG(li, LI)
|
||||
HTML_TAG(link, Link)
|
||||
HTML_HTMLELEMENT_TAG(listing)
|
||||
HTML_TAG(listing, Pre)
|
||||
HTML_HTMLELEMENT_TAG(main)
|
||||
HTML_TAG(map, Map)
|
||||
HTML_HTMLELEMENT_TAG(mark)
|
||||
@ -170,7 +170,7 @@ HTML_TAG(ul, SharedList)
|
||||
HTML_HTMLELEMENT_TAG(var)
|
||||
HTML_TAG(video, Video)
|
||||
HTML_HTMLELEMENT_TAG(wbr)
|
||||
HTML_HTMLELEMENT_TAG(xmp)
|
||||
HTML_TAG(xmp, Pre)
|
||||
|
||||
|
||||
/* These are not for tags. But they will be included in the nsHTMLTag
|
||||
|
@ -694,33 +694,6 @@
|
||||
[Stringification of document.createElement("basefont")]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLPreElement must be primary interface of document.createElement("listing")]
|
||||
expected: FAIL
|
||||
|
||||
[Stringification of document.createElement("listing")]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLPreElement interface: document.createElement("listing") must inherit property "width" with the proper type (0)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLPreElement must be primary interface of document.createElement("plaintext")]
|
||||
expected: FAIL
|
||||
|
||||
[Stringification of document.createElement("plaintext")]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLPreElement interface: document.createElement("plaintext") must inherit property "width" with the proper type (0)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLPreElement must be primary interface of document.createElement("xmp")]
|
||||
expected: FAIL
|
||||
|
||||
[Stringification of document.createElement("xmp")]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLPreElement interface: document.createElement("xmp") must inherit property "width" with the proper type (0)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLAnchorElement interface: document.createElement("a") must inherit property "ping" with the proper type (2)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -3243,6 +3243,7 @@ window.onload = function() {
|
||||
'document.createElement("wbr")',
|
||||
'document.createElement("summary")',
|
||||
'document.createElement("acronym")',
|
||||
'document.createElement("plaintext")',
|
||||
],
|
||||
HTMLUnknownElement: [
|
||||
'document.createElement("blink")',
|
||||
@ -3279,7 +3280,6 @@ window.onload = function() {
|
||||
HTMLPreElement: [
|
||||
'document.createElement("pre")',
|
||||
'document.createElement("listing")',
|
||||
'document.createElement("plaintext")',
|
||||
'document.createElement("xmp")',
|
||||
],
|
||||
HTMLQuoteElement: [
|
||||
|
@ -58,7 +58,7 @@ var elements = [
|
||||
["legend", "Legend"],
|
||||
["li", "LI"],
|
||||
["link", "Link"],
|
||||
["listing", ""],
|
||||
["listing", "Pre"],
|
||||
["map", "Map"],
|
||||
["marquee", "Marquee"],
|
||||
["menu", "Menu"],
|
||||
@ -105,7 +105,7 @@ var elements = [
|
||||
["var", ""],
|
||||
["video", "Video"],
|
||||
["wbr", ""],
|
||||
["xmp", ""],
|
||||
["xmp", "Pre"],
|
||||
["section", ""],
|
||||
["nav", ""],
|
||||
["article", ""],
|
||||
|
Loading…
Reference in New Issue
Block a user