Skip to content

TDEC-a2 (v2): decoration geometry and the decoration capture, restacked onto the text stack - #109

Open
thejackshelton wants to merge 192 commits into
review/tdec-a1-v2from
tdec-a2-v2
Open

thejackshelton wants to merge 192 commits into
review/tdec-a1-v2from
tdec-a2-v2

Conversation

@thejackshelton

Copy link
Copy Markdown
Contributor

Stacked, lands as the text-stack train after train 3. This branch is a restack onto INL1a (#88 B1, #89 B2, #90 C1, #91 C2), made by intent: C2 plus this branch's own change. Its base is review/tdec-a1-v2, pushed at tdec-a1-v2's head dbe22e4, so the diff is this branch's alone. The text stack lands as one train after train 3; master is merged in during the train's catch-up. Host-only: no device run yet (pending-device).

What changed

  • TDEC-a2 (T148 part a), restacked from tdec-a (5a3c7b890): decoration geometry in layout, parity:decoration-capture, and the decorated web-only cases.
  • Conflicts:
    • faults.ts: propagatedIntoOutOfFlow leaves master's NO_FAULTS (the plant is now text-decoration.ts's own fault type).
    • decoration-capture.ts skips replaced leaves (REPL-a).
  • regen.ts gains a decoration-capture step writing packages/parity/expected-decorations/**, and .gitattributes merges those outputs as generated. This is LAND-1: pnpm regen (cached, fixed-point regeneration chain) and a merge policy for generated outputs #58's rule for a branch that adds a generated output.
  • docs/ports.json:
    • layout/text-decoration.ts ports text_decoration_offset.cc, decoration_line_painter.cc, text_fragment_painter.cc, text_painter.cc and SkScan_Antihair.cpp antifilldot8. All are BSD and new.
    • It also adds the cited text_decoration_info.cc and simple_font_data.cc ranges.
  • Regenerated outputs:
    • The new decoration step's PNGs come out byte-identical to the committed ones.
    • The 12 decorated cases gain their font captures.
    • The web profile gains the text-decoration rows.

Tests and pins changed, with reasons

  • regen.test.ts passes, with a producer for every tracked capture.
  • No other pin moved.

What passed (host-side, this head)

  • /tmp/heavy-lease.sh pnpm regen reaches a fixed point; its outputs are in their own commit, whose message names the command.
  • pnpm typecheck passes.
  • pnpm test: everything passes except the 12 device-record tests that need a fresh device run (lanes, lanes-records, lanes-concurrent, device-failures, p6a-promotion): device step pending. Load timeouts in the full run (load up to 83): 24 tests timed out, all at 120 s except one at 900 s. In the reruns, 16 files under the heavy lease, then the slowest one at a time: everything passes, inline.test.ts at the default timeout once load dropped (12/12). CI risk: inline.test.ts 'labels inline boxes' took up to 560 s at load 50, so it may time out on CI. No timeout was loosened.

🤖 Generated with Claude Code

…xt px is proven in, and in the border shorthands

css/values.ts: a math function in border, border-<side>, border-block(-start/-end) and border-inline(-start/-end) is the <line-width>, typed and refused as the border-*-width longhands are (css-backgrounds-3 §3.1, css-logical-1 §6.3); shorthands/border.ts and logical.ts assign it to the width.

Fixtures (values group, ltr and rtl): values-calc-contexts-block, -flex, -positioned, -display-none, -root, -root-min-max put each of calc(), min(), max() and clamp() in every box property in the block, flex-row/column, relative, absolute (cb-ltr and cb-rtl), display-none and root contexts, and gaps in every flex line mode and on a non-flex container, plus px, rem and % insets, flex-basis and gaps on a static block; values-calc-border-shorthand; values-calc-length-max, the CSS_LENGTH_MAX golden (T118J): Chrome collapses float(33554429) with -33554430 to -2 device px at every DPR. values-reject-order-fraction pins the order refusal.

Retargets: values-reject-border-shorthand moves from calc(1px + 0.5vw), now accepted, to calc(1px * 2px / 1px) solid #000, still refused (typed arithmetic), refused on border-left-width. values.test.ts blinkNumber writes printf %g (3.35544e+07), which the new computed values need.
…ture, then pnpm run profile:rows and pnpm run parity:capture three times to the fixed point, then pnpm run profile:rows; pnpm run parity:dpr-capture; pnpm run layout:vectors; pnpm run layout:dpr-vectors; pnpm run layout:break-vectors; pnpm run parity:break-capture; pnpm run parity:pixel-capture; pnpm run native:gen; node --conditions=dragon-internal examples/music-player/tools/check.ts (pnpm run north-star:check lacks the condition, T124); pnpm run parity:glyph-b3 -- --write-bottom-pins; node --conditions=dragon-internal packages/parity/src/cli/media-sweep.ts (then --check: 18/18, 286 samples); pnpm run wpt:run -- --target web and pnpm run wpt:update-expectations -- --target web (no change); pnpm run tw:sweep. Profiles: 1922 rows added on each target (web and ios exact, android unsupported), none removed or changed. Tailwind 4.3.3: web and ios 2214 -> 4121 supported, none the other way, 0 mismatch
…nes -- --run-host) for the CALC-2 cases; device lanes not run (device step pending, landing-queue rule)
…h its own height treated as auto (T128)

css-flexbox-1 §4.5 content size suggestion; ported from Blink third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc at 145.0.7632.6 (BSD, The Chromium Authors; sha256 b0ea68654c62d2ca1d73d801ffca395901aa37e51569281266fc9ef87a9e892c) lines 914-923 and 1117-1120 (LayoutResult::IntrinsicBlockSize). A percentage height child of such an item is refused as percent-height-flex, since Blink resolves it against the item's set height.
…ontainer shorter than its items, px and calc() heights, empty and non-empty content, ltr and rtl; Chrome captures from pnpm run parity:capture and pnpm run parity:dpr-capture
…ize (flex_layout_algorithm.cc lines 1078-1084 at 145.0.7632.6): an item that cannot shrink takes its specified size without measuring its content, which gives the same used size and avoids 4 percent-height-flex refusals
…enerated), rt-hit.ts (Chrome 145 hit test with the T063J inline rule), the hit table, hit capture and report, the states fixture group
…eld-r1: faults.ts keeps both field sets; lanes.ts takes master's SUITE_LINE; grammar.generated.ts regenerated (pnpm run grammar:gen); out/lanes.json taken from master and regenerated later
…ure values-calc-flex-column-auto-min): pnpm run grammar:gen; pnpm run parity:capture and pnpm run profile:rows twice (fixed point); pnpm run parity:dpr-capture; pnpm run layout:vectors; pnpm run layout:dpr-vectors; pnpm run layout:break-vectors; pnpm run parity:break-capture; pnpm run parity:pixel-capture; pnpm run native:gen; node --conditions=dragon-internal examples/music-player/tools/check.ts; pnpm run tw:sweep; pnpm run wpt:run -- --target web; pnpm run wpt:update-expectations -- --target web; pnpm run parity:glyph-b3 -- --write-bottom-pins; node --conditions=dragon-internal packages/parity/src/cli/media-sweep.ts (then --check); pnpm run parity:lanes -- --run-host. Every existing vector and capture is byte-identical; emitted CSS changes only in the compilation-digest header; the new fixture adds its vectors, captures, pixel and break records; corpus.json and corpus-dpr.json carry the new engine digests
…unk); hit-capture identity manifest writer and hit-capture-identity.test.ts
…efused loudly by the hit table, the line ink gate from Skia's run-local glyph bounds, layers in order-modified paint order, layer clips; tap steps on the host runtime; rt-hit, pointer-events, hit report and identity tests; hit-pointer-events covers an absolute pointer-events: none track (the north-star context)
… run parity:hit-capture -- --identity-base 9b60a9e, then grammar:gen, parity:capture, profile:rows, parity:capture, profile:rows, parity:dpr-capture, layout:vectors, layout:dpr-vectors, layout:break-vectors, parity:break-capture, parity:pixel-capture, native:gen, node --conditions=dragon-internal examples/music-player/tools/check.ts, tw:sweep, parity:glyph-b3 -- --write-bottom-pins, node --conditions=dragon-internal packages/parity/src/cli/media-sweep.ts, parity:hit-capture twice; ua:capture earlier changed nothing more). Every capture and emitted file of 9b60a9e differs only by the pointer-events key (hit-capture-identity.test.ts); profiles gain only the pointer-events rows; expected-media changes only valuesCompared (one more longhand per element); RtHit.swift and RtHit.kt are new translated roots
…ed grid, pinned by the grid's sha256 (hit-capture/2): 15 MB to 2 MB
…y:hit-capture, run twice: the second run changes nothing): 468 cases, 703666 points
…rder, and px lengths clamped to the CSS length range

Chrome places an rtl in-flow block child at line-left = ((Pb + border-padding) + additional) + margin-left with
additional = ((available - inline size) - InlineSum()), so a margin-left near the CSS length minimum saturates and
lands the box at x = 1.984375 px where CSS2 (and the engine) ignored it (block_layout_algorithm.cc 2799-2804,
3283-3304 at 145.0.7632.6, BSD). The engine now threads the container's BFC line offset and follows Blink's order for
in-flow children (ComputeChildData), new formatting contexts (LayoutNewFormattingContext 2054-2169, no floats),
ResolveInlineAutoMargins (length_utils.cc 1555-1574), the stretch size (46-65) and SlowToPhysical. px lengths are
clamped after zoom like calc() results already were (measured: width 1e9px is 33554428 px at DPR 1 and 2).
Without saturation the result equals the old closed form (pinned by a 2000-case test).
New fixture values-length-saturation.
…it.ts (translated, the same function on host and device); P1 corpus hit suite (one line per layout vector at DPR 1, 2, 3 and 2.625: rt-hit harness op, corpus.ts suite hunk, targets.ts declares p1/hit from the vector counts); parity:hit-capture -- --vectors writes the hit facts
…ors, then pnpm run native:gen): RtHit.swift and RtHit.kt gain hitTableOf, hitGrid and hitRuns; the harnesses gain the rt-hit operation; corpus.json declares hit 1872; native:swift and native:kotlin give hit 1872/1872 and every other suite unchanged
… inline placement): pnpm run parity:capture, profile:rows, parity:capture, profile:rows (fixed point); pnpm run parity:dpr-capture; pnpm run layout:vectors; pnpm run layout:dpr-vectors; pnpm run layout:break-vectors; pnpm run parity:break-capture; pnpm run parity:pixel-capture; pnpm run native:gen; node --conditions=dragon-internal examples/music-player/tools/check.ts (no change); node --conditions=dragon-internal packages/parity/src/cli/media-sweep.ts (then --check: 18/18, 286 samples; no change); pnpm run parity:glyph-b3 -- --write-bottom-pins (no change); pnpm run wpt:run -- --target web and wpt:update-expectations -- --target web (no change); pnpm run tw:sweep (no change).

No existing vector, capture or expectation moves: every changed tracked file is a new fixture's files, an emitted-CSS compilation header (bodies identical), 88 profile rows that gain values-length-saturation proof cases (no status changes), the generated Swift and Kotlin engines, the pixel manifest, and the corpus-dpr lock (+2 vectors-m2, +6 vectors-dpr/engine-dpr/snap-values lines; on identical corpus lines the old engine differs only on the 16 lines built from values-length-saturation-rtl (1 vectors-m2, 3 vectors-dpr, 4 engine-dpr, 8 engine-calc); corpus.json (the milestone-1 corpus with its 20000 random trees) is unchanged).
…nes --run-host) for the values-length-saturation cases; device lanes not run (device step pending, landing-queue rule)
…ve-swift and native-kotlin: hit 1872/1872 appended; intent kept: exact suite sizes, full passes); device-vectors pins p1/hit at 1872 and fails a short run; the identity test checks every manifest hash's shape
…parity:lanes --run-host) on the SELD-R1b head after merging origin/master: layout-vectors-host passes on ios and android with p1/hit 1872/1872 and p1/rt 54588/54588; device lanes not run until the device step
… keeps the engine's Ctx and Piece names (the native support code reads Ctx)
… run native:gen): the engine's Ctx and Piece keep their names; only RtHit and the harnesses change
…once, hitAt answers a point (hitTest is the two); hitRuns and the host compare prepare once per case. The Swift hit suite drops from 65 s to 19 s, so it no longer reaches the 180 s suite timeout when both host lanes run at once
…en); native:swift and native:kotlin keep hit 1872/1872
…t): seams and grid registry order gain pointer-events after grid (and INHERITED gains it); values stays the group before states; rt stays the P1 suite before hit; css-escapes twin count 13778 -> 13799 and the glyph-clearance counts per DPR grow with the eight hit-* cases. targets.ts derives the hit suite's DPR directories from DPRS (no DPR literal). The visiblePainted reject expects Dragon's lowercased message
…to seld-r1: lanes.ts takes master's SUITE_CAUSE; native-swift and native-kotlin pins take master's cause check with rt and hit appended; generated files taken from seld-r1a and regenerated in the next commit
…in: grammar:gen, ua:capture, parity:capture and profile:rows twice, parity:dpr-capture, layout:vectors, layout:dpr-vectors, layout:break-vectors, parity:break-capture, parity:pixel-capture, parity:hit-capture --vectors, native:gen, music-player check.ts, tw:sweep, parity:glyph-b3 --write-bottom-pins, media-sweep.ts, parity:hit-capture, wpt:run and wpt:update-expectations --target web, parity:lanes --run-host) and parity:hit-capture --identity-base 77c641e; north-star errors per target equal master's (android equals ios) and pointer-events has no diagnostic
…nline-tags-faces is refused on ios and android until phase R, ready on web, and the engine lane lays it out; the original no-error compile holds under phase C's lowering (nativeRealFaces); the tags-change-the-faces check reads the engine projection, the faces the engine is given
…h no error under phase C's native lowering, off by default until TXT1a-2 phase R; text-weight.test.ts: the cases before the text-weight group are 533 (520 on the merged C2, TXT1a-2's 11 and T133's 2)
…rts at 533 and font-shorthand.test.ts's cases before its group are 545 (the merged C2's 520, TXT1a-2's 11, T133's 2 and TXT-W1's 12)
…Projection, the engine lane's projection: native refuses the real faces of the decorated cases until TXT1a-2 phase R (review of #104), and the engine lowers them in engine mode
…heavy-lease.sh pnpm regen (fixed point after 2 passes). The generated Swift and Kotlin harnesses list INL1a's break faults once, and lanes.json host lanes pass again
# Conflicts:
#	packages/translate/harness/harness.ts
…-lanes-v2 merged forward): /tmp/heavy-lease.sh pnpm regen (fixed point after 3 passes). The translated engines and harnesses (shaping and order faults), corpus digests and lanes.json host lanes

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant