mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
Notes:
github-actions[bot]
2025-01-08 14:29:57 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/ba43dfe49a5 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3167
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user