mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +01:00
layout: Avoid setting baseline for phantom line boxes (#39055)
Phantom line boxes should be treated as non-existing for most purposes, so don't let them affect the baseline of their block container. Testing: An existing test passes, and also adding a new one which doesn't rely on `<button>` Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
dc7fca5c79
commit
6e92e1d7d5
4 changed files with 73 additions and 5 deletions
|
@ -993,9 +993,11 @@ impl InlineFormattingContextLayout<'_> {
|
|||
return;
|
||||
}
|
||||
|
||||
let baseline = baseline_offset + block_start_position;
|
||||
self.baselines.first.get_or_insert(baseline);
|
||||
self.baselines.last = Some(baseline);
|
||||
if line_to_layout.has_content {
|
||||
let baseline = baseline_offset + block_start_position;
|
||||
self.baselines.first.get_or_insert(baseline);
|
||||
self.baselines.last = Some(baseline);
|
||||
}
|
||||
|
||||
// The inline part of this start offset was taken into account when determining
|
||||
// the inline start of the line in `calculate_inline_start_for_current_line` so
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue