mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Mark CalculatedStyleValue::resolve_* methods as deprecated
The existing resolve methods are not to spec and we are working to replace them with new ones based on the `simplify_a_calculation_tree` method. These are marked as deprecated rather than replaced outright as work will need to be done on the caller side to be made compatible with the new methods, for instance the new methods can fail to resolve (e.g. if we are missing required context), where the existing methods will always resolve (albeit sometimes with an incorrect value). No functionality changes.
This commit is contained in:
Notes:
github-actions[bot]
2025-07-16 12:06:57 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/afa95c2815a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5305 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -450,7 +450,7 @@ int CSSStyleValue::to_font_weight() const
|
||||
return round_to<int>(as_number().number());
|
||||
}
|
||||
if (is_calculated()) {
|
||||
auto maybe_weight = as_calculated().resolve_integer({});
|
||||
auto maybe_weight = as_calculated().resolve_integer_deprecated({});
|
||||
if (maybe_weight.has_value())
|
||||
return maybe_weight.value();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user