mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 15:49:15 +00:00
LibWeb/CSS: Separate IntegerSV and NumberSV from CSSUnitValue
This inheritance exists for typed-om classes, but StyleValues aren't
typed-om.
Somehow this makes our z-index interpolation slightly more correct. 🎉
This commit is contained in:
parent
51a657ca47
commit
7157d19f56
Notes:
github-actions[bot]
2025-08-08 14:20:36 +00:00
Author: https://github.com/AtkinsSJ
Commit: 7157d19f56
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5775
Reviewed-by: https://github.com/tcl3 ✅
10 changed files with 23 additions and 25 deletions
|
@ -365,7 +365,7 @@ Optional<Ratio> Parser::parse_ratio(TokenStream<ComponentValue>& tokens)
|
|||
if (!maybe_calc)
|
||||
return {};
|
||||
if (maybe_calc->is_number())
|
||||
return maybe_calc->as_number().value();
|
||||
return maybe_calc->as_number().number();
|
||||
if (!maybe_calc->is_calculated() || !maybe_calc->as_calculated().resolves_to_number())
|
||||
return {};
|
||||
if (auto resolved_number = maybe_calc->as_calculated().resolve_number_deprecated({}); resolved_number.has_value() && resolved_number.value() >= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue