layout: Make bottom table captions obey relative positioning offsets (#39388)

#33426 only added support for relative positioning on captions with
`caption-side: top`, but forgot about `caption-side: bottom`. This
unifies the logic for both kinds of captions to avoid divergences.

Testing: Modifying an existing test to also cover this case.
Fixes: #39386

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-09-19 14:44:17 +02:00 committed by GitHub
parent d08be14c7a
commit 754c938722
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 109 additions and 129 deletions

View file

@ -257401,7 +257401,7 @@
]
],
"caption-relative-positioning.html": [
"2be1e86bc077f1293ccc9ea851f23123ae679157",
"083a39fdf6800bfbec43a418068573f014c8adc5",
[
null,
[

View file

@ -11,7 +11,7 @@
position: relative;
background: green;
width: 100px;
height: 100px;
height: 50px;
margin-left: 200px;
left: -200px;
}
@ -20,7 +20,10 @@
<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>
<caption style="caption-side: top"></caption>
</table>
<table>
<caption style="caption-side: bottom"></caption>
</table>
</div>
</html>