Skip to content

WEBKIT-BOX 1: display parses as Chrome 145; -webkit-box refused precisely, -webkit-flex as flex - #181

Merged
thejackshelton merged 41 commits into
masterfrom
webkit-box
Oct 5, 2026
Merged

thejackshelton merged 41 commits into
masterfrom
webkit-box

Conversation

@thejackshelton

Copy link
Copy Markdown
Contributor

WEBKIT-BOX (1): display now parses exactly as Chrome 145 does. display: -webkit-box and -webkit-inline-box were called invalid; Chrome parses them, so Dragon now refuses them with a precise reason instead.

What changed

  • Grammar (scripts/gen-css-grammar.ts, new SYNTAX_OVERRIDES): display takes Chrome 145's grammar, from Blink Display::ParseSingleValue and ParseDisplayMultipleKeywords, in place of webref's.
    • Now parsed: -webkit-box, -webkit-inline-box, -webkit-flex and -webkit-inline-flex. Blink's legacy keyword range runs from inline-block to -webkit-inline-flex.
    • Now invalid, because Chrome drops them: run-in (alone or in a list), grid-lanes and inline-grid-lanes (CSSGridLanesLayout is off in 145), ruby-base, ruby-base-container and ruby-text-container. Before this PR they parsed and were then refused as unsupported. That was a wrong acceptance: Chrome drops the declaration and an earlier one wins.
  • css/display-legacy.ts (called from parseValue):
    • -webkit-flex and -webkit-inline-flex become flex and inline-flex, which is how Chrome computes them (Blink has no EDisplay of their own). The web output emits flex.
    • -webkit-box and -webkit-inline-box are refused on every target with DRAGON_UNSUPPORTED_VALUE: "display: -webkit-box is unsupported: it selects Chrome's legacy -webkit-box layout, which Dragon does not lay out, line clamping with -webkit-box-orient: vertical and -webkit-line-clamp included". The span is the keyword. The fix says to use flex or inline-flex. A var() that substitutes one of them gets the same reason.
  • Fixture group display-legacy:
    • display-webkit-flex (ltr and rtl): a -webkit-flex row, a column, a blockified -webkit-inline-flex item, and an upper-case -WEBKIT-FLEX.
    • Rejects: reject-display-webkit-box and reject-display-webkit-inline-box, both the line-clamp pattern, and reject-display-run-in.

Line clamping is not in this PR

The TXT2 spec (notes/T149-txt2-spec.md R11, part TXT2-g) owns -webkit-line-clamp, -webkit-box-orient and the -webkit-box adjustment to flow-root. This PR does not duplicate that work. TXT2-g will lift this refusal for its accepted combination, in display-legacy.ts or in a per-element check. The general legacy box (-webkit-box-pack/align/flex/direction/ordinal-group) does not map cleanly onto flexbox. Blink lays it out through its own -webkit-box paths, and it is not fixed by display alone, so it stays refused. Those properties keep DRAGON_UNSUPPORTED_PROPERTY.

Proof

  • packages/parity/test/display-parse.test.ts (live Chrome 145.0.7632.6). It covers 1,095 display values: every keyword (including case variants), every two-keyword list over 18 keywords, and every three-keyword list over 9.
    • Dragon accepts a value exactly when Chrome parses it, with no gap list.
    • Each accepted value computes in Chrome the same as Dragon's value.
    • Every refusal is of a value Chrome parses. The only single-keyword refusals are the legacy box keywords. Three-keyword lists keep their existing multi-token refusal.
    • Three planted readings are each caught on every item: webkitFlexAsBlock, runInAccepted and webkitBoxInvalid.
  • packages/dragon/test/display-legacy.test.ts (14 tests): the refusal message, span, fix, blocked outputs and catalogue on every target, through var(), and with the line-clamp pattern. It also checks that -webkit-flex emits the same web CSS as flex, that -webkit-inline-flex gets the same diagnostics as inline-flex, that the autoprefixer chain compiles, and that the dropped values are invalid.
  • I ran the four new fixtures through runFixture with live Chrome: all pass, including display-webkit-flex-rtl.

What passed (base origin/master 65e91d9)

  • pnpm typecheck: clean.
  • Targeted tests: display-legacy.test (14/14), display-parse.test (1/1), blockify, both registry-claims tests, diagnostics, s5, media-wiring, compile, grid-computed, tailwind-sweep units and fixture-reader: all passed.
  • Regen: through the regen label (regen-on-ci). The grammar output and the new fixture captures land in the bot's commit.

Expected regen and sweep movement

  • tw-sweep: line-clamp-1..6 move from refused DRAGON_CSS_INVALID_VALUE ... chrome-parses to a refusal Dragon no longer calls invalid.
  • Coverage rank: no ranked row becomes supported. The rank counts properties, and -webkit-line-clamp / -webkit-box-orient stay TXT2's. The -webkit-line-clamp blocker changes from CSS_INVALID_VALUE (-webkit-box) to the precise refusals.

Outside the spec

  • docs/goals/milestone-2-proof/notes/TW-SWEEP.md:39 still says Dragon calls -webkit-box invalid. It is under docs/goals, so I left it for the PM.

🤖 Generated with Claude Code

thejackshelton and others added 13 commits October 4, 2026 14:09
…nd aspect-ratio, float media size), ratio bands, iframe harness, guard and totality tests
…(zoom 128), plant mediaFractionalBandDropped, register media_query_evaluator.cc and the local_frame_view.cc media size as references
… and break captures, vectors and the media sweep records of the three new media fixtures, media-range's 9-band web output and sweep records, profiles and the host lanes
…he one Chrome-ported media numeric file, exempt by exact path in s4b and ua); one harness injection (chrome.ts injectHarness, used by the iframe capture); hit-capture identity admits MQ-R0's new fixtures and the two ruled media-range emitted files; p1/hit 2028 -> 2052 in translate.test and device-vectors.test (24 new layout vectors: 6 fixtures x 4 DPRs), p1-floor raised with DRAGON_FLOOR_WRITE=1
… with its own kinnunen-bsd-2 text (2-clause BSD, holders Kinnunen/Nokia, Apple, Intel; T067 R2), not bsd-apple header-bsd-10; IDENTITY_RULED pins the post-ruling hashes of media-range{,-rtl}.css instead of skipping the hash; viewport.ts and the s4b/ua exemption say 'reproduces the measured media size' (local_frame_view.cc is LGPL, reference only)
…registry and mediaFractionalBandDropped moves to faults/mq-r0.ts; the p1/hit pins and p1-floor take master's side and are re-derived after regen
…erived hit count (checked against p1-floor.json)
Commands: pnpm regen --skip lanes-host --skip tw-sweep (macos-26) and pnpm regen --only lanes-host (xcode-27), alternated
to a fixed point, then pnpm regen --only tw-sweep (macos-26).
Base: c4af7e3
Run: https://github.com/compiled-run/dragoncss/actions/runs/37324380859
…: master's identity base now carries REPL-a's object-fit and object-position keys (bb21396), and against master's media-range output the files differ only by MQ-R0's added fractional @media blocks; p1-floor hit 2076 -> 2100 (DRAGON_FLOOR_WRITE=1, derived from the regenerated corpus)
…words in, run-in, grid-lanes and ruby internals out); -webkit-box refused precisely, -webkit-flex as flex
@thejackshelton thejackshelton added the regen Run pnpm regen on CI (regen-on-ci.yml) and push the outputs back label Oct 5, 2026
thejackshelton and others added 2 commits October 5, 2026 11:11
…(inOrder over CHROME_PAGES, first-body check in viewport order) with MQ-R0's fractional bands sampled inside it (iframe at zoom 128 per band)
Commands: pnpm regen --skip lanes-host --skip tw-sweep (macos-26) and pnpm regen --only lanes-host (xcode-27), alternated
to a fixed point, then pnpm regen --only tw-sweep (macos-26).
Base: 0fa83b7
Run: https://github.com/compiled-run/dragoncss/actions/runs/37336867273
@github-actions github-actions Bot removed the regen Run pnpm regen on CI (regen-on-ci.yml) and push the outputs back label Oct 5, 2026
thejackshelton and others added 2 commits October 5, 2026 11:48
… twin around the shared collectNodes; the identity keeps master's IDENTITY_NEW (SELD-R1b and PNT2 transform fixtures) beside MQ-R0's IDENTITY_LATER and IDENTITY_RULED
Commands: pnpm regen --skip lanes-host --skip tw-sweep (macos-26) and pnpm regen --only lanes-host (xcode-27), alternated
to a fixed point, then pnpm regen --only tw-sweep (macos-26).
Base: c343a7e
Run: https://github.com/compiled-run/dragoncss/actions/runs/37343675221
@thejackshelton thejackshelton added the landing-failed The landing driver stopped this PR; see its comment label Oct 5, 2026
@thejackshelton

Copy link
Copy Markdown
Contributor Author

Landing stopped at step test (pnpm land)

packages/parity/test/css-escapes.test.ts, rerun alone on a quiet machine, exited 1 (log /tmp/land-181-test-solo-1.log)
 ❯ packages/parity/test/css-escapes.test.ts:415:38
    413|     }
    414|     expect(new Set(twins.map((t) => t.decl)).size).toBe(twins.length);
    415|     expect(twinFloorProblems(twins)).toEqual([]);
       |                                      ^
    416|   });
    417| });

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯


 Test Files  1 failed (1)
      Tests  1 failed | 1 passed (2)
   Start at  12:42:04
   Duration  1.81s (transform 216ms, setup 0ms, import 275ms, tests 1.48s, environment 0ms)

Found by bisecting the batch #181 #185 #186 (2 proofs): master passes, adding #181 fails.

Fix the cause, then hand #181 back to the landing queue with the new clean head.

…asserted invalid both ways in Dragon and Chrome) and the legacy -webkit- keywords, keeping the display twin floor of 33
@thejackshelton

Copy link
Copy Markdown
Contributor Author

Landing failure fixed in 45a1141: css-escapes display twin floor (27 < 33). The six keywords Chrome 145 drops (run-in, grid-lanes, inline-grid-lanes, ruby-base, ruby-base-container, ruby-text-container) are now escape twins asserted invalid in Dragon, escaped and plain, and dropped by Chrome both ways; the four legacy -webkit- keywords (which reach() skips for their leading hyphen) are twins too. display now has 37 plain spellings with twins; floor unchanged. css-escapes, display-parse, display-legacy, registry-claims and blockify pass; typecheck clean.

@thejackshelton

Copy link
Copy Markdown
Contributor Author

Landing stopped at step merge (pnpm land)

merge-train: merging webkit-box onto 7526bbf73cb0dbb9cd2c9ca58898ae10d92c4090 failed; conflicts in packages/parity/src/fixtures.ts

Fix the cause, then hand #181 back to the landing queue with the new clean head.

@thejackshelton thejackshelton added the regen Run pnpm regen on CI (regen-on-ci.yml) and push the outputs back label Oct 5, 2026
thejackshelton and others added 3 commits October 5, 2026 14:00
…D-R2's interaction cases and first-band condition with MQ-R0's mediaFractionalBandDropped filter; the identity keeps master's IDENTITY_NEW (with SELD-R2a's interaction fixtures) beside MQ-R0's lists; p1-floor takes master's hit 2108
Commands: pnpm regen --skip lanes-host --skip tw-sweep (macos-26) and pnpm regen --only lanes-host (xcode-27), alternated
to a fixed point, then pnpm regen --only tw-sweep (macos-26).
Base: 671e882
Run: https://github.com/compiled-run/dragoncss/actions/runs/37359968710
@github-actions github-actions Bot removed the regen Run pnpm regen on CI (regen-on-ci.yml) and push the outputs back label Oct 5, 2026
@thejackshelton

Copy link
Copy Markdown
Contributor Author

Landing stopped at step test (pnpm land)

packages/parity/test/hit-capture-identity.test.ts, rerun alone on a quiet machine, exited 1 (log /tmp/land-181-test-solo-1.log)
 ❯ packages/parity/test/hit-capture-identity.test.ts:64:56
     62|   it('holds only SELD-R1b fixtures\' files beyond the base', () => {
     63|     const extra = IDENTITY_ROOTS.flatMap(walk).filter((p) => (p.endsWi…
     64|     expect(extra.filter((p) => !IDENTITY_NEW.test(p))).toEqual([]);
       |                                                        ^
     65|     expect(extra.length).toBeGreaterThan(0);
     66|   });

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯


 Test Files  1 failed (1)
      Tests  1 failed | 5 passed (6)
   Start at  15:42:33
   Duration  1.73s (transform 995ms, setup 0ms, import 1.31s, tests 356ms, environment 0ms)

Fix the cause, then hand #181 back to the landing queue with the new clean head.

…rived 'beyond the base' check and #180's ctx-proof- entry (IDENTITY_LATER dropped: #189 covers MQ-R0's media fixtures); IDENTITY_RULED and its hash override stay
# Conflicts:
#	packages/parity/src/fixtures.ts
@thejackshelton thejackshelton added the regen Run pnpm regen on CI (regen-on-ci.yml) and push the outputs back label Oct 5, 2026
thejackshelton and others added 10 commits October 5, 2026 16:43
Merge driver for the sorted per-feature registries (dragon-sorted)
…usts GitHub's CONFLICTING, which ignores the merge drivers

#190's dragon-sorted driver (and dragon-floor, dragon-generated) merge PRs that GitHub's plain text merge calls CONFLICTING,
so admission failed #142 although it merges cleanly onto master. Before its build the driver now passes --conflicts-ok: a
CONFLICTING head is judged as UNKNOWN, and the merge train, which merges with the drivers, fails a real conflict at merge.
pr:review --conflicts-ok: admission defers conflicts to the merge train's drivers
Commands: pnpm regen; pnpm run parity:devices; pnpm regen
Commands: pnpm regen --skip lanes-host --skip tw-sweep (macos-26) and pnpm regen --only lanes-host (xcode-27), alternated
to a fixed point, then pnpm regen --only tw-sweep (macos-26).
Base: 65e9e6b
Run: https://github.com/compiled-run/dragoncss/actions/runs/37377476074
@github-actions github-actions Bot removed the regen Run pnpm regen on CI (regen-on-ci.yml) and push the outputs back label Oct 5, 2026
thejackshelton and others added 3 commits October 5, 2026 17:30
MQ-R0: Chrome-exact @media evaluation (1/64 slack, whole-px orientation and aspect-ratio, float media size), orientation and aspect-ratio bands
Commands: pnpm regen; pnpm run parity:devices; pnpm regen
@thejackshelton
thejackshelton merged commit 88f7da8 into master Oct 5, 2026
5 checks passed
@thejackshelton
thejackshelton deleted the webkit-box branch October 5, 2026 22:59
@thejackshelton thejackshelton removed the landing-failed The landing driver stopped this PR; see its comment label Oct 5, 2026
thejackshelton added a commit that referenced this pull request Oct 6, 2026
…ring. capture.ts: master moved the page collector into the shared collectNodes (also used by MQ-R0's iframe capture); INL1a's inline-box fragment lines (<id>:line<j>, the culled-box <br> piece rule) move into it
thejackshelton added a commit that referenced this pull request Oct 6, 2026
…d others): MQ-R0's slack-aware partition replaces the temporary near-threshold refusal (closeThresholds removed); the off-grid sweep runs on MQ-R0's partition with media-range, media-epsilon and the ratio fixtures and asserts its band everywhere; rt-band's atoms checked against media/evaluate.ts; mqr-orientation proves the ratio atoms; LATER_FIXTURES dropped for #189's registry check; at-rules keeps MQ-R0's accepted features with the MQ-R2/MQ-R3 refusal text
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