mirror of
https://github.com/servo/servo.git
synced 2025-10-01 00:59:15 +01:00
layout: Ensure that <caption>
's support position: relative
(#33426)
This change adds support for `position: relative` to table `<caption>`. In addition to adjusting their position according to inset values, table captions must also establish containing blocks for descendants that are absolutely positioned. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
eecf5bdea1
commit
ef229b9386
5 changed files with 52 additions and 7 deletions
13
tests/wpt/meta/MANIFEST.json
vendored
13
tests/wpt/meta/MANIFEST.json
vendored
|
@ -240575,6 +240575,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"caption-relative-positioning.html": [
|
||||
"2be1e86bc077f1293ccc9ea851f23123ae679157",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"col-definite-max-size-001.html": [
|
||||
"bcd7ca2fd89c26384e26be64dade0e7af0ea4c79",
|
||||
[
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[table-caption-is-containing-block-001.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[position-relative-table-caption.html]
|
||||
expected: FAIL
|
26
tests/wpt/tests/css/css-tables/caption-relative-positioning.html
vendored
Normal file
26
tests/wpt/tests/css/css-tables/caption-relative-positioning.html
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel="author" title="Martin Robinson" href="mailto:mrobinson@igalia.com">
|
||||
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
|
||||
<title><caption> elements can be relatively positioned</title>
|
||||
<meta name="assert" content="The caption is positioned relatively to the table wrapper">
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/#relative-positioning">
|
||||
<link rel="match" href="/css/reference/ref-filled-green-100px-square.xht">
|
||||
<style>
|
||||
caption {
|
||||
position: relative;
|
||||
background: green;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-left: 200px;
|
||||
left: -200px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div style="width: 100px; background: red;">
|
||||
<table>
|
||||
<caption></caption>
|
||||
</table>
|
||||
</div>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue