servo/components/layout/flow/inline
Oriol Brufau 18b3e5fe21
layout: Make lines non-phantom if they have inline padding/border/margin (#39058)
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>
2025-09-16 22:18:46 +00:00
..
construct.rs layout: Refactor InlineFormattingContextBuilder::is_empty (#39048) 2025-08-31 00:50:00 +00:00
inline_box.rs cargo: Bump rustc to 1.89 (#36818) 2025-08-19 11:07:53 +00:00
line.rs layout: Remove clearance parameter from BoxFragment::new() (#37921) 2025-07-08 10:04:37 +00:00
line_breaker.rs layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
mod.rs layout: Make lines non-phantom if they have inline padding/border/margin (#39058) 2025-09-16 22:18:46 +00:00
text_run.rs fonts: Implement CSS font-variation-settings property for FreeType platforms (#38642) 2025-08-18 16:30:14 +00:00