Skip to content

Commit

Permalink
Bug 1266851. Make <xmp> and <listing> use HTMLPreElement as their pri…
Browse files Browse the repository at this point in the history
…mary interface, per <whatwg/html#1015>.  r=peterv

UltraBlame original commit: 6dd235136facc833619c153a6f27bfe96f709cb7
  • Loading branch information
marco-c committed Sep 30, 2019
1 parent b72f71e commit b930df6
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 201 deletions.
49 changes: 49 additions & 0 deletions dom/html/HTMLPreElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,31 @@ aAttribute
)
const
{
if
(
!
mNodeInfo
-
>
Equals
(
nsGkAtoms
:
:
pre
)
)
{
return
nsGenericHTMLElement
:
:
IsAttributeMapped
(
aAttribute
)
;
}
static
const
MappedAttributeEntry
Expand Down Expand Up @@ -427,6 +452,30 @@ GetAttributeMappingFunction
)
const
{
if
(
!
mNodeInfo
-
>
Equals
(
nsGkAtoms
:
:
pre
)
)
{
return
nsGenericHTMLElement
:
:
GetAttributeMappingFunction
(
)
;
}
return
&
MapAttributesIntoRule
Expand Down
2 changes: 2 additions & 0 deletions dom/html/test/test_bug389797.html
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,7 @@
listing
"
"
Pre
"
)
;
Expand Down Expand Up @@ -1874,6 +1875,7 @@
xmp
"
"
Pre
"
)
;
Expand Down
6 changes: 4 additions & 2 deletions parser/htmlparser/nsHTMLTagList.h
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,10 @@ HTML_TAG
link
Link
)
HTML_HTMLELEMENT_TAG
HTML_TAG
(
listing
Pre
)
HTML_HTMLELEMENT_TAG
(
Expand Down Expand Up @@ -949,9 +950,10 @@ HTML_HTMLELEMENT_TAG
(
wbr
)
HTML_HTMLELEMENT_TAG
HTML_TAG
(
xmp
Pre
)
/
*
Expand Down
189 changes: 0 additions & 189 deletions testing/web-platform/meta/html/dom/interfaces.html.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5491,195 +5491,6 @@ 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
:
Expand Down
20 changes: 10 additions & 10 deletions testing/web-platform/tests/html/dom/interfaces.html
Original file line number Diff line number Diff line change
Expand Up @@ -16019,6 +16019,16 @@
"
)
'
'
document
.
createElement
(
"
plaintext
"
)
'
]
HTMLUnknownElement
:
Expand Down Expand Up @@ -16381,16 +16391,6 @@
createElement
(
"
plaintext
"
)
'
'
document
.
createElement
(
"
xmp
"
)
Expand Down
2 changes: 2 additions & 0 deletions testing/web-platform/tests/html/semantics/interfaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ Link
listing
"
"
Pre
"
]
[
Expand Down Expand Up @@ -823,6 +824,7 @@ wbr
xmp
"
"
Pre
"
]
[
Expand Down

0 comments on commit b930df6

Please sign in to comment.