The stroke-join rung: the SVG2-only join values land as Chromium's own drop - #77
Conversation
…n drop
The first checklist-loop rung, and the first measurement-only one: zero
engine code (one comment is the only source edit). Chromium 149 parses
stroke-linejoin's miter-clip and arcs as invalid declarations — byte-
identical to miter, the same fate as garbage — and Stylo's three-keyword
grammar drops them at the same parse stage, so both admissions agree by
construction. The declaration-level cells prove where: CSS miter-clip over
a round attribute paints round, because the invalid declaration ceases to
exist and the presentation hint survives.
Ten cells, all byte-exact with no tolerance: the two SVG2-only values as
attributes, every implemented keyword in CSS spelling, author-beats-hint
precedence, and the miter limit's CSS twin including the below-one carry
SVG 1.1 forbade and SVG2 allows.
Three checklist rows tick: attribute stroke-linejoin, CSS stroke-linejoin,
CSS stroke-miterlimit. Precedent, stated for the next rung: a valid listed
value the oracle itself treats as invalid does not gate a tick when the
drop is celled — nothing refuses and no pixel diverges, which is stronger
than the preserveAspectRatio precedent, not an extension of it. The
grammar bar where cited references disagree is the standard-track index:
fill-stroke-3's draft crop/fallback ship in no engine and sit outside the
surface (now a named header rule).
Collateral records accuracy, caught by this rung's audit: the reftest
header's tolerance census ("six rows... the curved cells") predated the
gradient ramp-quantization cells and is rewritten count-free in the two
declared kinds.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe PR documents SVG stroke grammar and fallback behavior, marks related checklist items complete, adds ten Chromium-backed stroke fixtures, updates fixture status metadata, and replaces fixed reftest tolerance documentation with two tolerance categories. ChangesSVG stroke coverage
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/websem/src/svg.rs`:
- Line 3568: Update the nearby grammar comment to use “are” instead of “is” for
subject-verb agreement, without changing the surrounding wording or code.
In `@crates/websem/tests/reftest_oracle.rs`:
- Around line 14-16: Update the documentation near the ramp-quantization
reference in reftest_oracle.rs to state both fixture-contract limits: at most
one differing pixel and at most one code value per channel. Clarify that these
bounds are specific to the current ramp-quantization fixture if applicable.
In `@fixtures/web-first/README.md`:
- Line 57: Update the README description for the svg-stroke-miter-limit fixtures
to replace “neither celled” with explicit wording that the cases were measured
but have no dedicated cells.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7cdc78ea-509a-45b2-86ec-6a53c245963c
⛔ Files ignored due to path filters (20)
fixtures/web-first/chromium/svg-stroke-join-arcs.pngis excluded by!**/*.pngfixtures/web-first/chromium/svg-stroke-join-css-arcs.pngis excluded by!**/*.pngfixtures/web-first/chromium/svg-stroke-join-css-bevel.pngis excluded by!**/*.pngfixtures/web-first/chromium/svg-stroke-join-css-miter-clip.pngis excluded by!**/*.pngfixtures/web-first/chromium/svg-stroke-join-css-miter.pngis excluded by!**/*.pngfixtures/web-first/chromium/svg-stroke-join-css-over-attr.pngis excluded by!**/*.pngfixtures/web-first/chromium/svg-stroke-join-css-round.pngis excluded by!**/*.pngfixtures/web-first/chromium/svg-stroke-join-miter-clip.pngis excluded by!**/*.pngfixtures/web-first/chromium/svg-stroke-miter-limit-css-below-one.pngis excluded by!**/*.pngfixtures/web-first/chromium/svg-stroke-miter-limit-css.pngis excluded by!**/*.pngfixtures/web-first/svg-stroke-join-arcs.svgis excluded by!**/*.svgfixtures/web-first/svg-stroke-join-css-arcs.svgis excluded by!**/*.svgfixtures/web-first/svg-stroke-join-css-bevel.svgis excluded by!**/*.svgfixtures/web-first/svg-stroke-join-css-miter-clip.svgis excluded by!**/*.svgfixtures/web-first/svg-stroke-join-css-miter.svgis excluded by!**/*.svgfixtures/web-first/svg-stroke-join-css-over-attr.svgis excluded by!**/*.svgfixtures/web-first/svg-stroke-join-css-round.svgis excluded by!**/*.svgfixtures/web-first/svg-stroke-join-miter-clip.svgis excluded by!**/*.svgfixtures/web-first/svg-stroke-miter-limit-css-below-one.svgis excluded by!**/*.svgfixtures/web-first/svg-stroke-miter-limit-css.svgis excluded by!**/*.svg
📒 Files selected for processing (8)
crates/n0_cli/README.mdcrates/websem/src/svg.rscrates/websem/tests/reftest_oracle.rsdocs/wg/consolidation/web-checklist.mdfixtures/web-first/README.mdfixtures/web-first/STATUS.mdfixtures/web-first/oracle-bake.jsonfixtures/web-first/primitives.json
| StyloLinecap::Round => StrokeCap::Round, | ||
| StyloLinecap::Square => StrokeCap::Square, | ||
| }; | ||
| // Three variants is the full supported grammar, not a subset: the |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the subject-verb agreement in the comment.
Use are, not is.
Proposed wording
- // Three variants is the full supported grammar, not a subset: the
+ // Three variants are the full supported grammar, not a subset: the📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Three variants is the full supported grammar, not a subset: the | |
| // Three variants are the full supported grammar, not a subset: the |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/websem/src/svg.rs` at line 3568, Update the nearby grammar comment to
use “are” instead of “is” for subject-verb agreement, without changing the
surrounding wording or code.
| //! loudly because it leaves the ring — and `ramp-quantization` for the | ||
| //! gradient cells, where the two builds round a colour ramp one code value | ||
| //! apart. The bounds are measured values rather than headroom. Every other |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Document the ramp-quantization pixel bound.
If ramp-quantization uses the current fixture contract, state that it allows at most one differing pixel and at most one code value per channel. fixtures/web-first/primitives.json:454-465 declares both limits, but Lines 14-16 mention only the channel difference. If the limits are fixture-specific, state that explicitly instead.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/websem/tests/reftest_oracle.rs` around lines 14 - 16, Update the
documentation near the ramp-quantization reference in reftest_oracle.rs to state
both fixture-contract limits: at most one differing pixel and at most one code
value per channel. Clarify that these bounds are specific to the current
ramp-quantization fixture if applicable.
| | `svg-stroke-join-miter-clip.svg` · `svg-stroke-join-arcs.svg` | The SVG2-only join values, measured unimplemented: Chromium parses `miter-clip` and `arcs` as invalid declarations, so both drop to the initial miter — byte-identical to the `miter` cell, the same fate as garbage input (measured). Stylo's three-keyword grammar drops them in the same place, so both admissions agree without a special case. The grammar bar for both twin rows is SVG2's property index; the fill-stroke-3 draft's `crop`/`fallback` keywords ship in no engine and sit outside the standard-track surface. | | ||
| | `svg-stroke-join-css-miter.svg` · `svg-stroke-join-css-round.svg` · `svg-stroke-join-css-bevel.svg` · `svg-stroke-join-css-over-attr.svg` | The CSS spelling of every implemented join keyword, plus the precedence cell: an author `stroke-linejoin: round` beats the `bevel` presentation attribute. | | ||
| | `svg-stroke-join-css-miter-clip.svg` · `svg-stroke-join-css-arcs.svg` | The declaration-level proof the drop happens at parse: CSS `miter-clip` or `arcs` over a `round` **attribute** paints round — the invalid declaration ceases to exist and the hint survives, where an implemented value would have changed the corner. | | ||
| | `svg-stroke-miter-limit-css.svg` · `svg-stroke-miter-limit-css-below-one.svg` | The miter limit's CSS twin at the same forced bevel, and a below-one limit — valid in SVG2 where SVG 1.1 forbade it — is not dropped: no miter can satisfy it, so it bevels identically. A negative limit instead drops as invalid and the initial 4 miters, and a CSS limit beats the attribute spelling (both measured, neither celled). | |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Replace neither celled with explicit fixture wording.
The phrase is unclear. State that the cases were measured but have no dedicated cells.
Proposed wording
- A negative limit instead drops as invalid and the initial 4 miters, and a CSS limit beats the attribute spelling (both measured, neither celled).
+ A negative limit drops as invalid, so the initial limit of 4 produces miters. A CSS limit beats the attribute spelling; both cases are measured, but neither has a dedicated cell.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | `svg-stroke-miter-limit-css.svg` · `svg-stroke-miter-limit-css-below-one.svg` | The miter limit's CSS twin at the same forced bevel, and a below-one limit — valid in SVG2 where SVG 1.1 forbade it — is not dropped: no miter can satisfy it, so it bevels identically. A negative limit instead drops as invalid and the initial 4 miters, and a CSS limit beats the attribute spelling (both measured, neither celled). | | |
| | `svg-stroke-miter-limit-css.svg` · `svg-stroke-miter-limit-css-below-one.svg` | The miter limit's CSS twin at the same forced bevel, and a below-one limit — valid in SVG2 where SVG 1.1 forbade it — is not dropped: no miter can satisfy it, so it bevels identically. A negative limit drops as invalid, so the initial limit of 4 produces miters. A CSS limit beats the attribute spelling; both cases are measured, but neither has a dedicated cell. | |
🧰 Tools
🪛 LanguageTool
[grammar] ~57-~57: Ensure spelling is correct
Context: ...tead drops as invalid and the initial 4 miters, and a CSS limit beats the attribute sp...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@fixtures/web-first/README.md` at line 57, Update the README description for
the svg-stroke-miter-limit fixtures to replace “neither celled” with explicit
wording that the cases were measured but have no dedicated cells.
Source: Linters/SAST tools
…gs made refusals (#80) Eleven new Chromium-149-baked cells (suite 206 -> 217). Ten are twins: px, rem, calc(4px + 4px), and the CSS spelling of the value, the unitless quirk, calc, min(), the precedence pair, and the invalid-negative fallback all bake onto svg-stroke-rect-centred's exact oracle bytes, and the CSS percent cell onto svg-percent-stroke-width's. The eleventh pins the em basis to the *authored* font-size: font-size 8px x 1em shares the same 8-wide oracle, where a render still reading the default basis paints double and fails. The rung's real work was what the probes and the two-pass verify ritual found: five spellings through which a stroke-width painted silently wrong in both admissions -- rex/rch/ric/rcap missing from the basis-less unit list (1rex painted 8.0 where Chromium paints the root ex-height), the six container-query units (the pinned Stylo drops what Chromium resolves: 1 painted where 8 belongs), var() indirection (--w: 1vw through a sheet painted 12.8 where Chromium paints 0.64), a poisoned em basis (font-size: 2vw x 1em painted ~25.6 where Chromium paints 1.28), and CSS escapes (1\76 w is 1vw to the tokenizer and nothing to a text scan, in all three ingresses). Every one is now a named refusal with a guarding test, across all four spellings each can arrive through; the mixed-length-and-percentage calc() refusal that existed unguarded is guarded and registered too. Three register fixtures land beside the cells; over-refusal is the contract (a benign var(--w: 8px) refuses). Records: both web-checklist stroke-width twin rows tick (the rx/ry precedent from #75: remaining unit classes live in their own rows, all still unticked, now as registered refusals); the n0_cli statement of record names the admitted width grammar and every refusal class; the stroke-cell count, stale since #77 at "30 of the 31", reads its true 57-of-58; STATUS regenerated (217 cells, register 47 -> 50 rows).
The first rung of the checklist loop (the master Web checklist, #74), and the first measurement-only one: zero engine code — one comment in
websemis the only source edit.The measured verdict (Chromium 149.0.7827.55)
stroke-linejoin="miter-clip"and="arcs"— valid SVG2 grammar, declared at-risk with no known implementations — parse as invalid declarations: byte-identical tomiter, the same fate as garbage input.stroke-linejoin: miter-clipover aroundattribute paints round — the invalid declaration ceases to exist at parse and the presentation hint survives. Had Chromium implemented the value, this pair would differ.1equals the attribute cell,0.5(valid in SVG2, forbidden in SVG 1.1) is not dropped and bevels, a negative drops to the initial 4, and a CSS limit beats the attribute spelling (the last two measured, not celled).Ten cells, all byte-exact, no tolerance blocks
Two SVG2-only values as attributes · all five CSS spellings (
miter/round/bevelplain;miter-clip/arcsas the over-attribute drop proof) · author-beats-hint precedence · the miter-limit CSS twin at 1 and 0.5. Suite: 202 cells, all green throughwebsem → rframe → n0.Three rows tick
Attribute
stroke-linejoin· CSSstroke-linejoin· CSSstroke-miterlimit.The precedent this rung states for the next one (adversarially audited): a valid listed value the oracle itself treats as invalid does not gate a tick when the drop is celled — nothing refuses, no pixel diverges on valid input, which is strictly stronger than the preserveAspectRatio precedent (which tolerated a divergence on invalid input) and distinct from the viewBox class (which blocks because we refuse valid grammar the oracle paints). Implementing the at-risk values would create pixels no external oracle can grade — forbidden by the repo's own oracle law. The committed byte-exact cells catch a future Blink implementation at re-bake.
A second named rule, now in the checklist header: where cited references disagree, the standard-track grammar is the bar — fill-stroke-3's draft
crop/fallbackship in no engine and sit outside the surface.Collateral records accuracy
This rung's audit caught the reftest header's stale tolerance census ("six rows… the curved cells" — nine rows in two kinds since the gradient cells landed); rewritten count-free over the two declared kinds (
aa-boundary-ring,ramp-quantization).Verification: three adversarial judges (tick audit, law audit, independent repro incl. probe re-run) — no must_fix; both should_fixes and the wording notes are applied in this diff.