servo/components/layout
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
..
display_list Removed FnvHash and transformed the rest to FxHashmap (#39233) 2025-09-10 13:34:54 +00:00
flexbox layout: Fix propagation of overflow to viewport (#39173) 2025-09-16 20:53:46 +00:00
flow layout: Make lines non-phantom if they have inline padding/border/margin (#39058) 2025-09-16 22:18:46 +00:00
fragment_tree Switch the majority of fxhash uses to rustc_hash which is maintained (#39168) 2025-09-06 05:19:47 +00:00
stylesheets layout: Fix Textual <input> Vertical Align Style (#39014) 2025-09-09 03:09:38 +00:00
table layout: Fix propagation of overflow to viewport (#39173) 2025-09-16 20:53:46 +00:00
taffy layout: Fix propagation of overflow to viewport (#39173) 2025-09-16 20:53:46 +00:00
tests layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
Cargo.toml Removed FnvHash and transformed the rest to FxHashmap (#39233) 2025-09-10 13:34:54 +00:00
cell.rs layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
construct_modern.rs layout: Use the PseudoElement from ServoThreadSafeLayoutNode in NodeAndStyleInfo (#38630) 2025-08-13 17:31:57 +00:00
context.rs Removed FnvHash and transformed the rest to FxHashmap (#39233) 2025-09-10 13:34:54 +00:00
dom.rs layout: Fix propagation of overflow to viewport (#39173) 2025-09-16 20:53:46 +00:00
dom_traversal.rs layout: Always build Tag and BaseFragmentInfo with ServoThreadSafeLayoutNode (#38680) 2025-08-18 12:19:09 +00:00
formatting_contexts.rs cargo: Bump rustc to 1.89 (#36818) 2025-08-19 11:07:53 +00:00
geom.rs layout: Move sizing logic from geom.rs to sizing.rs (#38568) 2025-08-09 20:43:40 +00:00
layout_box_base.rs layout: Move sizing logic from geom.rs to sizing.rs (#38568) 2025-08-09 20:43:40 +00:00
layout_impl.rs Removed FnvHash and transformed the rest to FxHashmap (#39233) 2025-09-10 13:34:54 +00:00
lib.rs layout: Add style to ConstraintSpace and IndefiniteContainingBlock (#39229) 2025-09-11 21:53:14 +00:00
lists.rs layout: Use the PseudoElement from ServoThreadSafeLayoutNode in NodeAndStyleInfo (#38630) 2025-08-13 17:31:57 +00:00
positioned.rs layout: Add style to ConstraintSpace and IndefiniteContainingBlock (#39229) 2025-09-11 21:53:14 +00:00
query.rs script: Use HTMLElement.scrollParent to implement Element.scrollIntoView (#39144) 2025-09-07 21:44:11 +00:00
quotes.rs layout: Combine layout_2020 and layout_thread_2020 into a crate called layout (#36613) 2025-04-19 10:17:03 +00:00
replaced.rs layout: Add style to ConstraintSpace and IndefiniteContainingBlock (#39229) 2025-09-11 21:53:14 +00:00
sizing.rs layout: Add style to ConstraintSpace and IndefiniteContainingBlock (#39229) 2025-09-11 21:53:14 +00:00
style_ext.rs layout: Add style to ConstraintSpace and IndefiniteContainingBlock (#39229) 2025-09-11 21:53:14 +00:00
traversal.rs cargo: Bump rustc to 1.89 (#36818) 2025-08-19 11:07:53 +00:00