From 59e2911f28b19081c5f386950d0774e2ec24acbe Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 10 Oct 2015 08:58:38 -0400 Subject: [PATCH] Add 'listing' alias for
 elements

---
 components/script/dom/create.rs                 | 3 ++-
 tests/wpt/metadata/html/dom/interfaces.html.ini | 6 ------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/components/script/dom/create.rs b/components/script/dom/create.rs
index f2b8182cdc3..14e061c07a0 100644
--- a/components/script/dom/create.rs
+++ b/components/script/dom/create.rs
@@ -175,6 +175,8 @@ pub fn create_element(name: QualName, prefix: Option,
         atom!("legend")     => make!(HTMLLegendElement),
         atom!("li")         => make!(HTMLLIElement),
         atom!("link")       => make!(HTMLLinkElement),
+        // https://html.spec.whatwg.org/multipage/#other-elements,-attributes-and-apis:listing
+        atom!("listing")    => make!(HTMLPreElement),
         atom!("main")       => make!(HTMLElement),
         atom!("map")        => make!(HTMLMapElement),
         atom!("mark")       => make!(HTMLElement),
@@ -241,4 +243,3 @@ pub fn create_element(name: QualName, prefix: Option,
         _                   => make!(HTMLUnknownElement),
     }
 }
-
diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini
index 9a528a172da..4152904127e 100644
--- a/tests/wpt/metadata/html/dom/interfaces.html.ini
+++ b/tests/wpt/metadata/html/dom/interfaces.html.ini
@@ -2370,12 +2370,6 @@
   [HTMLPreElement interface: document.createElement("pre") must inherit property "width" with the proper type (0)]
     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