Repository navigation
INL1a 2/5 (B1): the inline input model (InlineBox, LineBreak, strut, verticalAlign) and its additive vector migration - #88
Merged
Conversation
…ritten engine inputs (packages/layout/vectors/calc/*.json and the vectors README example), which no generator rewrites; every box gains strut (its first text leaf's font and line-height, else null) and every style verticalAlign baseline after aspectRatio, nothing else changes; ran node scripts/migrate-inline-input.ts; --check exits 1 if any file would change
… required LayoutBox strut (CSS2 §10.8.1) and LayoutStyle verticalAlign; validateLayoutInput checks their shape, a text leaf's font and line-height against its parent's (leaf-font), block-in-inline, display inline only on inline boxes (a replaced leaf stays block-level), and white-space collapsing across inline boxes and <br>s; the compiler writes baseline and the container strut; the engine lays out text leaves only and refuses an inline box or <br> with the typed code inline-box (box.ts inlineTextLeaves; inline.ts unchanged); the environment pass zooms the strut and vertical-align; native emit, the translate harness and the random corpus write the new fields; scripts/check-inline-input-migration.ts proves the vector migration additive
… last LayoutStyle argument and the strut as a third LineHeightCalc; the dropInheritedText plant now fails the case at the validator (leaf-font: the reverted leaf font differs from its container's strut) before the layout lane; the vertical-align calc test carries its range
…m regen (fixed point after 3 passes; vectors and DPR vectors gain strut and verticalAlign only, proven by node scripts/check-inline-input-migration.ts origin/master; translated engines, corpus digests, lanes.json host lanes and native-lanes.ts; device lanes await the device run)
This was referenced Oct 3, 2026
Open
Merged
Open
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
INL1a part B1: the R5 inline input model and its migration. Part 1 was #66.
Stacked, lands as train 3. This is the first of four stacked PRs (B1 → B2 → C1 → C2). They land as train 3, after train 2 (REPL-a). B1's head predates master's latest commits (it was built on master 30f03f4), so the train's catch-up merges master into it.
What changed
InlineBox(kindinline),LineBreak(kindbr), a requiredLayoutBox.strut(CSS2 §10.8.1: the container's own font and line-height when its children are inline-level, else null) and a requiredLayoutStyle.verticalAlign(keyword, px, percent or calc; the compiler writesbaseline).validateLayoutInputchecks the new shapes:leaf-font);block-in-inline);display: inlineonly on inline boxes, so a replaced leaf stays block-level;<br>s.box.tsinlineTextLeavesrefuses an inline box or<br>with the typed codeinline-box, naming the node.inline.tsis unchanged; B2 replaces the refusal with the inline core.<br>fonts, and vertical-align px and calc.boxDependenciescovers them.ios-layout.tswritesverticalAlign: baselineand the container strut (lowerFont, which refuses a non-Ahem family). Native emit writesLineStrut,InlineBox,LineBreakandVerticalAlignKeywordValuewith the translated union names.native-programthrows on an inline box or<br>rather than dropping it.scripts/migrate-inline-input.tsmigrates the hand-written inputs (17 calc vectors and the vectors README example), which no generator rewrites. It refuses to write anything unless the result differs only bystrutandverticalAlign, and its--checkis clean.node scripts/check-inline-input-migration.ts origin/masterfinds 4777 files at the base and 1921 changed, with 68602 neutral additions. Every other byte is identical, and no files are added. Its planted faults (vector-output,vertical-align,strut-font,strut-on-block,missing-strut,stray-file) each fail with their own message.pnpm regen, fixed point after 3 passes): 476 vectors and 1428 DPR vectors gainstrutandverticalAlignonly. The other outputs are the 44 translated engine files, the corpus digests, the lanes.json host lanes andnative-lanes.ts. No capture, emitted CSS, break, pixel or WPT output changed.Tests and pins changed, with reasons
parity.testdropInheritedText plant: it is now caught one step earlier. The reverted leaf font no longer equals its container's strut, so the validator rejects the input (leaf-font) before the layout lane runs. The case still fails, which is what the plant checks.native-backends.test: the expected constructor text gainsverticalAlign: baselineas the lastLayoutStyleargument. The calc line-height count goes from 2 to 3 because the strut adds one.styleSchema's keys, so the newverticalAlignkey is counted.packages/layout/test/inline-input.test.ts, with 10 tests covering the validator, the inline-box refusal and the environment zoom.What passed (host-side)
tsc -bpasses.layout:subsetreports 0 violations.parity.testpasses 687/687.check-inline-input-migration.tsis clean, and all 6 planted faults are caught.pnpm test: 15 tests in 7 files fail, and every one of them needs device evidence (lanes, lanes-records, lanes-concurrent, device-failures, p6a-promotion and related). They pass or fail only after the train's device run and secondpnpm regen, which rebuildsnative-lanes.tsfrom the device-run lanes.json. No device run has been done for this head.Size
About 98 KB of reviewed diff after
.macroscope/ignore.md(25 files). Counting the hand-migrated calc vectors, which the ignore list skips, it is about 136 KB.🤖 Generated with Claude Code