зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1721370 - Undo the behavior change from bug 1720703. r=annevk
Making <source> display: none is not web compatible. <track> could probably stay, your call, but other browsers also don't do this so perhaps we should just change the spec... Differential Revision: https://phabricator.services.mozilla.com/D120454
This commit is contained in:
Родитель
af2f2867e6
Коммит
4f696bd524
|
@ -717,7 +717,7 @@ html:focus-visible {
|
|||
* selector in a UA sheet.
|
||||
*/
|
||||
base, basefont, datalist, head, link, meta, noembed,
|
||||
noframes, param, rp, script, source, style, template, track, title {
|
||||
noframes, param, rp, script, style, template, title {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,13 +4,24 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div hidden></div>
|
||||
<script>
|
||||
const kLocalNames = [
|
||||
"area", "base", "basefont", "datalist", "head", "link", "meta", "noembed",
|
||||
"noframes", "param", "rp", "script", "source", "style", "template",
|
||||
"track", "title",
|
||||
const kNotHiddenElementLocalNames = [
|
||||
"source", "track",
|
||||
];
|
||||
|
||||
for (let name of kLocalNames) {
|
||||
const kHiddenElementLocalNames = [
|
||||
"area", "base", "basefont", "datalist", "head", "link", "meta", "noembed",
|
||||
"noframes", "param", "rp", "script", "style", "template", "title",
|
||||
];
|
||||
|
||||
for (let name of kNotHiddenElementLocalNames) {
|
||||
test(function() {
|
||||
let element = document.createElement(name);
|
||||
document.body.appendChild(element);
|
||||
assert_equals(getComputedStyle(element).display, "inline");
|
||||
}, `${name} should not be hidden`);
|
||||
}
|
||||
|
||||
for (let name of kHiddenElementLocalNames) {
|
||||
test(function() {
|
||||
let element = document.createElement(name);
|
||||
document.body.appendChild(element);
|
||||
|
|
Загрузка…
Ссылка в новой задаче