mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
Previously, `run_caption_layout()` passed the table's border-box width as the available space to the caption's formatting context. The BFC then used this width directly for inline line breaking, causing text to overflow the caption's content box by the size of the caption's own border and padding.
21 lines
415 B
HTML
21 lines
415 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
@font-face {
|
|
font-family: 'Ahem';
|
|
src: url('../../../Ref/data/fonts/Ahem.ttf');
|
|
}
|
|
table {
|
|
border: 1px solid black;
|
|
font: 10px/1 Ahem;
|
|
}
|
|
caption {
|
|
padding: 0 6px;
|
|
border: 1px solid gray;
|
|
}
|
|
</style>
|
|
<table>
|
|
<!-- The text should not overflow the table border -->
|
|
<caption>AAAAAAAAAA BBBBBBBBB CCCC</caption>
|
|
<tr><td style="width: 200px">x</td></tr>
|
|
</table>
|