зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1483519 [wpt PR 12498] - HTML: fieldset legend should inherit alignment, a=testonly
Automatic update from web-platform-testsHTML: fieldset legend should inherit alignment See https://github.com/whatwg/html/issues/3913. -- wpt-commits: 8dd18afacc7a7cf9969592d8dbd74c20e6d6df8e wpt-pr: 12498
This commit is contained in:
Родитель
0e0835d7ea
Коммит
a2d7e678e7
|
@ -356416,6 +356416,12 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"html/rendering/non-replaced-elements/the-fieldset-element-0/legend-align.html": [
|
||||||
|
[
|
||||||
|
"/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-align.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
"html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html": [
|
"html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html": [
|
||||||
[
|
[
|
||||||
"/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html",
|
"/html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html",
|
||||||
|
@ -599065,6 +599071,10 @@
|
||||||
"df30468b0041323667946739369ec7d42bf47742",
|
"df30468b0041323667946739369ec7d42bf47742",
|
||||||
"reftest"
|
"reftest"
|
||||||
],
|
],
|
||||||
|
"html/rendering/non-replaced-elements/the-fieldset-element-0/legend-align.html": [
|
||||||
|
"f7511c9e4c91dbd2cb11db502789d8792f038a29",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html": [
|
"html/rendering/non-replaced-elements/the-fieldset-element-0/legend-block-formatting-context.html": [
|
||||||
"4e9539179739a3690aab276f2ba98c25bd4dfe9b",
|
"4e9539179739a3690aab276f2ba98c25bd4dfe9b",
|
||||||
"testharness"
|
"testharness"
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
<!doctype html>
|
||||||
|
<title>legend align</title>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<fieldset><legend align=left>x</legend></fieldset>
|
||||||
|
<fieldset><legend align=center>x</legend></fieldset>
|
||||||
|
<fieldset><legend align=right>x</legend></fieldset>
|
||||||
|
<div align=left>
|
||||||
|
<fieldset><legend>x</legend></fieldset>
|
||||||
|
</div>
|
||||||
|
<div align=center>
|
||||||
|
<fieldset><legend>x</legend></fieldset>
|
||||||
|
</div>
|
||||||
|
<div align=right>
|
||||||
|
<fieldset><legend>x</legend></fieldset>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<fieldset><legend>x</legend></fieldset>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: center" align=center>
|
||||||
|
<fieldset><legend>x</legend></fieldset>
|
||||||
|
</div>
|
||||||
|
<fieldset><legend style="margin: 0 auto">x</legend></fieldset>
|
||||||
|
<fieldset><legend style="margin: 0 0 0 auto">x</legend></fieldset>
|
||||||
|
<fieldset dir=rtl><legend>x</legend></fieldset>
|
||||||
|
<fieldset dir=rtl><legend style="text-align: left">x</legend></fieldset>
|
||||||
|
<script>
|
||||||
|
function test_align(selectorTest, selectorRef) {
|
||||||
|
const testElm = document.querySelector(selectorTest);
|
||||||
|
const refElm = document.querySelector(selectorRef);
|
||||||
|
test(() => {
|
||||||
|
assert_equals(testElm.offsetLeft, refElm.offsetLeft, `expected ${selectorRef}`);
|
||||||
|
}, selectorTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const val of ['left', 'center', 'right']) {
|
||||||
|
test_align(`div[align=${val}] legend`, `legend[align=${val}]`);
|
||||||
|
}
|
||||||
|
|
||||||
|
test_align(`div[style="text-align: center"] legend`, `legend[align=left]`);
|
||||||
|
test_align(`div[style="text-align: center"][align=center] legend`, `legend[align=center]`);
|
||||||
|
test_align(`legend[style="margin: 0 auto"]`, `legend[align=center]`);
|
||||||
|
test_align(`legend[style="margin: 0 0 0 auto"]`, `legend[align=right]`);
|
||||||
|
test_align(`fieldset[dir=rtl] legend`, `legend[align=right]`);
|
||||||
|
test_align(`fieldset[dir=rtl] legend[style="text-align: left"]`, `legend[align=right]`);
|
||||||
|
</script>
|
Загрузка…
Ссылка в новой задаче