mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb/CSS: Tell CalculationContext whether to treat numbers as integers
Calc simplification eventually produces a single style-value as its output. This extra context data will let us know whether a calculated number should be treated as a `<number>` or an `<integer>`, so that for example, `z-index: 12` and `z-index: calc(12)` both produce an `IntegerStyleValue` containing 12.
This commit is contained in:
committed by
Andreas Kling
parent
91831438e0
commit
39cefd7abf
@@ -28,6 +28,7 @@ class CalculationNode;
|
||||
// Contains the context available at parse-time.
|
||||
struct CalculationContext {
|
||||
Optional<ValueType> percentages_resolve_as {};
|
||||
bool resolve_numbers_as_integers = false;
|
||||
};
|
||||
// Contains the context for resolving the calculation.
|
||||
struct CalculationResolutionContext {
|
||||
|
||||
Reference in New Issue
Block a user