Files
ladybird/Tests/LibWeb/Layout/input/table/caption-specified-width-with-float.html
Andreas Kling 0e438c01d8 LibWeb: Compute CAPMIN from caption outer widths
Fixing float-related intrinsic width bookkeeping exposed that table
captions only contributed their raw min-content width to CAPMIN.
That ignored caption padding, borders, margins, and definite widths,
so captions could be laid out too narrow and wrap content that should
stay beside floats.

Compute each caption's min-content contribution as an outer width and
clamp it against the preferred outer width when the caption has a
definite width. Add a test for a fixed-width caption with a float and
rebaseline the existing padded-caption layout test.
2026-03-29 12:05:25 +02:00

15 lines
347 B
HTML

<!DOCTYPE html>
<p>
The words floated and inline should be legible below, with inline appearing just
to the right of the border surrounding floated.
</p>
<table>
<caption style="text-align:left; width:200px">
<div style="float:left; border: 1px solid black;">
floated
</div>
inline
</caption>
</table>