mirror of
https://github.com/servo/servo
synced 2026-05-10 00:52:08 +02:00
According to https://drafts.csswg.org/css-inline/#invisible-line-boxes, if a line box contains non-zero inline-axis margins, padding or borders, then it can't be phantom. Therefore, this patch makes adds a `has_inline_pbm` flag to the line. Note that we can't use the `has_content` flag, because that would add a soft wrap opportunity between the padding/border/margin and the first content of the line. The patch also renames `InlineFormattingContext::had_inflow_content` to `has_line_boxes`, which is what we care about for collapsing margins through. Testing: Adding new tests Fixes: #39057 Signed-off-by: Oriol Brufau <obrufau@igalia.com>