LibWeb: Don't resolve flow-relative values for float too early

This allows `getComputedStyle()` to return the correct value if `float`
is set to `inline-start` or `inline-end`
This commit is contained in:
Tim Ledbetter 2025-06-16 22:41:15 +01:00 committed by Jelle Raaijmakers
parent 3f5c339d59
commit 28b24b72bc
Notes: github-actions[bot] 2025-06-17 07:27:49 +00:00
4 changed files with 36 additions and 15 deletions

View file

@ -1164,9 +1164,10 @@ void BlockFormattingContext::layout_floating_box(Box const& box, BlockContainer
};
// Next, float to the left and/or right
if (box.computed_values().float_() == CSS::Float::Left) {
// FIXME: Honor writing-mode, direction and text-orientation.
if (box.computed_values().float_() == CSS::Float::Left || box.computed_values().float_() == CSS::Float::InlineStart) {
float_box(FloatSide::Left, m_left_floats);
} else if (box.computed_values().float_() == CSS::Float::Right) {
} else if (box.computed_values().float_() == CSS::Float::Right || box.computed_values().float_() == CSS::Float::InlineEnd) {
float_box(FloatSide::Right, m_right_floats);
}