layout: Unify layout logic for replaced and non-replaced floats&atomics (#37897)

Laying out a float or atomic inline will now use the same logic
regardless of whether it's replaced or not.
This reduces the amount of code, and should have no observable effect.

Testing: Unneeded (no behavior change)
This part of #37942

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-07-09 21:46:22 +02:00 committed by GitHub
parent 70c57c6136
commit 47c56d8d74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 94 additions and 146 deletions

View file

@ -2076,11 +2076,8 @@ impl IndependentFormattingContext {
.content_rect
.translate(pbm_physical_offset.to_vector());
// Apply baselines if necessary.
let mut fragment = match baselines {
Some(baselines) => fragment.with_baselines(baselines),
None => fragment,
};
// Apply baselines.
fragment = fragment.with_baselines(baselines);
// Lay out absolutely positioned children if this new atomic establishes a containing block
// for absolutes.