mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02: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:
committed by
Tim Ledbetter
parent
51a657ca47
commit
7157d19f56
Notes:
github-actions[bot]
2025-08-08 14:20:36 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/7157d19f560 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5775 Reviewed-by: https://github.com/tcl3 ✅
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user