mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibWeb/CSS: Remove use of Dimension in calc() parsing
Rather than partly-converting number, dimension, and ident tokens at the start of parsing a calculation, and then later finishing it off, we can just do the whole step in convert_to_calculation_node(). This is a little less code, but mainly means we are left with only a single use of the Dimension type in the codebase, so that can be removed soon.
This commit is contained in:
parent
5cda2ac961
commit
ba43dfe49a
Notes:
github-actions[bot]
2025-01-08 14:29:57 +00:00
Author: https://github.com/AtkinsSJ
Commit: ba43dfe49a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3167
2 changed files with 51 additions and 52 deletions
|
@ -43,7 +43,7 @@ struct ProductNode;
|
|||
struct SumNode;
|
||||
struct InvertNode;
|
||||
struct NegateNode;
|
||||
using Node = Variant<Operator, Number, Dimension, CalculationNode::ConstantType, NonnullOwnPtr<ProductNode>, NonnullOwnPtr<SumNode>, NonnullOwnPtr<InvertNode>, NonnullOwnPtr<NegateNode>, NonnullRawPtr<ComponentValue const>>;
|
||||
using Node = Variant<Operator, NonnullOwnPtr<ProductNode>, NonnullOwnPtr<SumNode>, NonnullOwnPtr<InvertNode>, NonnullOwnPtr<NegateNode>, NonnullRawPtr<ComponentValue const>>;
|
||||
struct ProductNode {
|
||||
Vector<Node> children;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue