mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
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:
parent
3f5c339d59
commit
28b24b72bc
Notes:
github-actions[bot]
2025-06-17 07:27:49 +00:00
Author: https://github.com/tcl3
Commit: 28b24b72bc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5109
Reviewed-by: https://github.com/gmta ✅
4 changed files with 36 additions and 15 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue