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

@ -975,19 +975,6 @@ void StyleComputer::for_each_property_expanding_shorthands(PropertyID property_i
return;
}
if (property_id == CSS::PropertyID::Float) {
auto keyword = value.to_keyword();
// FIXME: Honor writing-mode, direction and text-orientation.
if (keyword == Keyword::InlineStart) {
set_longhand_property(CSS::PropertyID::Float, CSSKeywordValue::create(Keyword::Left));
return;
} else if (keyword == Keyword::InlineEnd) {
set_longhand_property(CSS::PropertyID::Float, CSSKeywordValue::create(Keyword::Right));
return;
}
}
if (property_is_shorthand(property_id)) {
// ShorthandStyleValue was handled already, as were unresolved shorthands.
// That means the only values we should see are the CSS-wide keywords, or the guaranteed-invalid value.