diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-11-14 19:40:35 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-11-14 19:41:17 +0100 |
| commit | 352b21b7fed0c0ca5e19952f1f0e1dab03b2c140 (patch) | |
| tree | 39d7d75d7e22fcd18d43f9eec2c5c4772ce76756 /src/css/mediaquery.nim | |
| parent | 3415826c80f3a3ad9d090e18ee9d3d360a08f591 (diff) | |
| download | chawan-352b21b7fed0c0ca5e19952f1f0e1dab03b2c140.tar.gz | |
cssvalues: reduce CSSComputedValue size
far from perfect, but it's something.
(ideally, we should store enums in a bitmap instead of allocating a
GC'ed property for each of them.)
Diffstat (limited to 'src/css/mediaquery.nim')
| -rw-r--r-- | src/css/mediaquery.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/css/mediaquery.nim b/src/css/mediaquery.nim index 73649e8f..f86ea197 100644 --- a/src/css/mediaquery.nim +++ b/src/css/mediaquery.nim @@ -254,10 +254,10 @@ proc parseLengthRange(parser: var MediaQueryParser; ismin, ismax: bool): Opt[LengthRange] = if ismin: let a = ?parser.parseLength() - let b = CSSLength(num: Inf, unit: cuPx) + let b = CSSLength(num: Inf, u: cuPx) return ok(LengthRange(s: a .. b, aeq: true, beq: false)) if ismax: - let a = CSSLength(num: 0, unit: cuPx) + let a = CSSLength(num: 0, u: cuPx) let b = ?parser.parseLength() return ok(LengthRange(s: a .. b, aeq: false, beq: true)) let comparison = ?parser.parseComparison() @@ -267,10 +267,10 @@ proc parseLengthRange(parser: var MediaQueryParser; ismin, ismax: bool): of mqcEq: return ok(LengthRange(s: len .. len, aeq: true, beq: true)) of mqcGt, mqcGe: - let b = CSSLength(num: Inf, unit: cuPx) + let b = CSSLength(num: Inf, u: cuPx) return ok(LengthRange(s: len .. b, aeq: comparison == mqcGe, beq: false)) of mqcLt, mqcLe: - let a = CSSLength(num: 0, unit: cuPx) + let a = CSSLength(num: 0, u: cuPx) return ok(LengthRange(s: a .. len, aeq: false, beq: comparison == mqcLe)) proc parseFeature0(parser: var MediaQueryParser; t: MediaFeatureType; |