You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b93829a
Browse filesBrowse the repository at this point in the historyBrowse files
fix(css): keep the calc() around a steps() count jump-none rejects bare (#22168)
* fix(css): keep the calc() around a steps() count jump-none rejects bare
The math fold wrote `steps(calc(1), jump-none)` back as `steps(1,jump-none)`,
which is not the same function: CSS Easing 2 §2.2 says the count must be at
least 2 under `jump-none` and at least 1 under every other step position, so
the literal is rejected where the `calc()` around it is clamped. WebKit
honours the source and drops the printed form; Blink rejects both, which is
why only the WebKit equivalence row reported it.
This is the `CLAMPED_VALUE_RANGES` trade one argument in, so it is answered
the same way: the generator carries the minimum per `<step-position>` — spec
prose no dataset states, since the grammar says only `<integer>` — and the
printer declines the bare form below it. A position the table has not met
reads as the largest minimum, so an unknown spelling keeps its `calc()`
rather than being guessed at.
`steps(calc(2), jump-none)` still folds, as does every other position's
`calc(1)`, and an omitted position is `end`, which takes one.
* fix(css): decline the steps() fold under a position it cannot read
The guard read the first identifier among `steps()`'s children, so a position
written as a substitution left it at the minimum every position but
`jump-none` takes: `steps(calc(1), var(--pos))` folded to `steps(1,var(--pos))`,
which `--pos` resolving to `jump-none` makes invalid.
The comma now parts the count from the position, and anything standing there
that is not a keyword this knows reads as the largest minimum, so the fold
declines rather than guess what it resolves to. `steps(calc(2), var(--pos))`
still folds, since no position rejects two.
* test: assert the folded step count without a substitution
WebKit reported the new `steps(calc(2), var(--pos))` case as a difference:
a declaration carrying a substitution is not parsed until the substitution
resolves, so the engine echoes its text as written and the folded `2` reads
apart from the source's `calc(2)`, where Blink folds both alike. The printed
form is valid either way — two satisfies every step position — so this is
what the engine serializes rather than what the printer wrote.
Filing it would exempt the whole fixture from the WebKit row, which is the
file this change is about. An unknown keyword makes the same point: the
position is one the table cannot read, so the minimum is two and the count
folds, with nothing for a substitution to defer.
* test(css): drive the steps() count guard in-process
The config cases prove the behaviour but cannot report it: the minifier runs
where the coverage run does not count it, so the whole math-fold region reads
as unexecuted under the integration flag. `codecov/patch` is scoped to `unit`
and `integration`, which is why the patch stayed at 46.66% while the comment,
counting `syntax-equivalence` too, read 100%.
These drive the same assertions through `SourceProcessor` directly, which runs
in-process: every line and branch of the guard, each `<step-position>` the
generated table names, the omitted position, a spelling it cannot read, a
substitution standing where the keyword goes, and a comment between the
arguments.
"webkit only: a printer defect, not yet decided \u2014 WebKit reads the step count through a `calc()` where the printed form drops it. Measured in the first WebKit run"
261
-
],
262
258
[
263
259
"font-family:\"New Century Schoolbook\", serif",
264
260
"firefox only: not a printer defect — Gecko carries the source's quoting into the computed family where Blink drops it, so unquoting a name neither engine reads differently still reads as a difference there"
0 commit comments