Repository navigation
INL2a 1/2: atomic inlines in the layout engine (inline-block, inline-flex) - #112
Open
thejackshelton wants to merge 3 commits into
Open
thejackshelton wants to merge 3 commits into
thejackshelton wants to merge 3 commits into
Conversation
An inline-block or inline-flex box is a LayoutBox among a block container's inline-level children (input.ts: the Display union only). inline-box.ts lays it out as its block-level equivalent at its shrink-to-fit width (CSS2 §10.3.9), with its margin box as its advance and its line height contribution; its baseline is the last line box's for inline-block (the bottom margin edge with none, or for a scroll container) and the flex container's first baseline for inline-flex (Blink 145, INL-P family 5). inline.ts puts it in the break text as U+FFFC with a soft wrap opportunity before and after it, places it on its line, and counts its min- and max-content contributions; block.ts carries the last baseline through block children (a scroll container child gives its bottom margin edge; a flex child's last baseline is refused as flex-baseline). Refused with typed codes: an atomic inline beside text in a face other than Ahem (atomic-beside-shaped-text, INL2c), in rtl without a letter on both sides in its paragraph (bidi-neutral), relatively positioned (inline-box-position), or with a percentage block size (percent-height-flex); validate.ts refuses one inside an inline box (atomic-in-inline-box). Six engine plants: inlineBlockFirstBaseline, overflowBaselineIgnored, inlineFlexLastBaseline, atomicMarginExcluded, noBreakAroundAtomic, atomicShrinkToFitIgnored. The engine-inline differential suite appends 1500 generated atomic contexts after INL1a's 3000 (their inputs unchanged). test/inline-atomic.test.ts compares the 16 family 5 cases without vertical-align with Chrome at DPR 1, 2, 3 and 2.625 in ltr and rtl, and each plant against them. (cherry picked from commit 62cad4640fa48dfb8ad466071a6421f9aeba8b46)
…se.sh pnpm regen (fixed point after 2 passes): the translated engine, corpus-dpr.json, lanes.json host lanes and the profiles
…52, after this branch's old base): block_layout_algorithm.cc, flex_layout_algorithm.cc and line_breaker.cc gain their Dragon references; physical_box_fragment.h, inline_items_builder.cc and logical_line_builder.cc are new BSD reference entries; pnpm notices:gen
This was referenced Oct 3, 2026
Open
This branch has not been deployed
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.
INL2a part 1 of 2 (T059, notes/T044-inl-spec.md R1-R8, notes/T059J-inl2.md): the layout engine for atomic inlines (
inline-blockandinline-flex). This is the INL2 chain restacked onto the v2 text stack: inl2a-engine → inl2 → txt2a-engine → txt2a → inl2b, as-v2branches. The originals are untouched.Base:
review/tdec-a2-v2, a copy of tdec-a2-v2 7b99e3a, the top of the text-stack chain. This PR lands after the text-stack train.What changed
packages/layout), cherry-picked from inl2a-engine 62cad4640f:inline-blockorinline-flexbox is a LayoutBox among a block container's inline-level children.inline-box.tslays it out at its shrink-to-fit width (CSS2 §10.3.9), with its margin box as its advance.inline-block(the bottom margin edge when there is none, or for a scroll container), and the first baseline forinline-flex.inline.tsputs it in the break text as U+FFFC with a soft wrap opportunity on each side, places it on its line, and counts its min- and max-content contributions.block.tscarries the last baseline through block children.validate.ts).inline-atomic.test.tscompares the 16 family-5 cases with Chrome at DPR 1, 2, 3 and 2.625, in ltr and rtl.block.tsandflex.tsreplaced paths setlastBaseline: null.inlineChildrenstill rejects a replaced box beside inline content.validate.tschecks for an atomic inline first, then applies the base'sisInlineLevelblock-in-inline rule.docs/ports.json(the port registry from PORT-0: Chrome port registry (docs/ports.json), its test, and generated THIRD_PARTY_NOTICES.md #52 postdates the old base), with notices regenerated bypnpm notices:gen:block_layout_algorithm.cc,flex_layout_algorithm.ccandline_breaker.ccgain their Dragon references;physical_box_fragment.h,inline_items_builder.ccandlogical_line_builder.ccare new BSD reference entries.corpus-dpr.test's engine-inline count is derived from INLINE_SPEC, now 3000 plus the atomic contexts. The base's text-latin count is kept.What passed
pnpm regen: fixed point after 2 passes. The output commit covers the translated engine, corpus-dpr.json, host lanes and profiles.pnpm typecheck: clean.pnpm test(heavy lease, on a loaded machine): 178 files; 3723 passed, 39 failed and 1 skipped.lanes.jsonis host-only, and the device run happens in the train.🤖 Generated with Claude Code