LibWeb: Set up initial infrastructure for non-math functions in calc

There are some non-math functions (such as tree counting functions)
which we should allow within `calc()`s . This commit implements the
initial infrastructure for this.

We don't yet parse any of these non-math functions in
`parse_a_calculation` so there is no functional change.
This commit is contained in:
Callum Law 2025-09-30 16:39:23 +13:00 committed by Tim Ledbetter
commit 55bcdcf824
Notes: github-actions[bot] 2025-10-20 15:13:37 +00:00
5 changed files with 89 additions and 9 deletions

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2025, Callum Law <callumlaw1709@outlook.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/CSS/StyleValues/StyleValue.h>
namespace Web::CSS {
class AbstractNonMathCalcFunctionStyleValue : public StyleValue {
using StyleValue::StyleValue;
public:
virtual RefPtr<CalculationNode const> resolve_to_calculation_node(CalculationContext const&, CalculationResolutionContext const&) const = 0;
};
}