Update web-platform-tests to revision 4a5223502fa660ce03e470af6a61c8bc26c5a8ee

This commit is contained in:
WPT Sync Bot 2018-04-23 21:13:37 -04:00
parent c5f7c9ccf3
commit e891345f26
1328 changed files with 36632 additions and 20588 deletions

View file

@ -10,9 +10,10 @@
var pairs = [
// Defined in DOM
{attr: "classList", sup: ["anyElement"]},
// Defined in HTML except for a which is also SVG
{attr: "relList", sup: ["a", "area", "link"]},
// Defined in HTML
{attr: "htmlFor", sup: ["output"]},
{attr: "relList", sup: ["a", "area", "link"]},
{attr: "sandbox", sup: ["iframe"]},
{attr: "sizes", sup: ["link"]}
];
@ -26,7 +27,11 @@ var namespaces = [
var elements = ["a", "area", "link", "iframe", "output", "td", "th"];
function testAttr(pair, new_el){
return (pair.attr === "classList" || (new_el.namespaceURI === "http://www.w3.org/1999/xhtml" && pair.sup.indexOf(new_el.localName) != -1));
return (pair.attr === "classList" ||
(pair.attr === "relList" && new_el.localName === "a" &&
new_el.namespaceURI === "http://www.w3.org/2000/svg") ||
(new_el.namespaceURI === "http://www.w3.org/1999/xhtml" &&
pair.sup.indexOf(new_el.localName) != -1));
}
pairs.forEach(function(pair) {