mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-01 07:52:50 +00:00
LibWeb/CSS: Remove an ad-hoc simplification step in calc()
parsing
This commit is contained in:
parent
715bf0de2c
commit
4bf197872b
Notes:
github-actions[bot]
2025-03-05 12:06:57 +00:00
Author: https://github.com/LucasChollet
Commit: 4bf197872b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3726
Reviewed-by: https://github.com/AtkinsSJ ✅
10 changed files with 84 additions and 92 deletions
|
@ -3248,12 +3248,6 @@ RefPtr<CSSStyleValue> Parser::parse_calculated_value(ComponentValue const& compo
|
|||
if (!function_node)
|
||||
return nullptr;
|
||||
|
||||
// If the calculation got simplified down to a single value, return that instead.
|
||||
if (function_node->type() == CalculationNode::Type::Numeric) {
|
||||
if (auto number_value = as<NumericCalculationNode>(*function_node).to_style_value(context))
|
||||
return number_value.release_nonnull();
|
||||
}
|
||||
|
||||
auto function_type = function_node->numeric_type();
|
||||
if (!function_type.has_value())
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue