Repository navigation
Close remaining CSS layout gaps with browser-referenced geometry contracts #240
Description
Activity
- addedvscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integrationPlanned for the AppScene/WebScene VS Code OSS integration
on Sep 17, 2026 Focused implementation candidate is ready on current main
d7720a63: commit01c12edac7e4186b1eb1930d5b4270e698f7cd63, branchfix/generated-content-line-height-240.The reduced Chromium/native contract isolated the generated-content geometry gap. For a 40px
::before, native stored unitlessline-height:1andline-height:5as literal pixel lengths, producing heights[60,1,5,2]; Chromium produces[60,40,200,2]for inherited 1.5, authored 1, authored 5, and explicit 2px. The fix preserves<number>as a multiplier until the generated box font size is known, uses the same representation in retained text publication, and removes the old paint-only “positive values <=4 are multipliers” heuristic. Dynamic class mutation restores 40→60→200→40 geometry and retained scene strings carry exact 40/60/200/2 line heights.Exact-current gates:
- Chromium authority: 1/1 documents, 5/5 subtests, 324 ms.
- Native WPT: 1/1 documents, 5/5 subtests, 282 ms.
- Focused native
dimension-variable-compatibility: pass, including adjacent font-relative/layout cases and retained text-resource assertions. - 4,096 generated boxes, 20 mutation/layout cycles: p95 115.67 ms, max 130.74 ms; V8 heap 678,776→678,776 bytes after low memory; peak RSS 40,845,312→61,784,064 bytes (20.0 MiB growth, 64 MiB bound); DOM node and pseudo storage return to baseline bounds.
The four changed paths have zero overlap with merged #312’s parser/resource paths and do not touch #286’s CSS parsing/cascade or oracle/profile paths. This is a focused #240 tranche; it does not close the broader layout issue.
The generated-content unitless
line-heightslice is complete and merged via #322 as4ccadd1333c54e91e83e65234e783685964ae1d9.This closes the measured gap where a 40px pseudo-element incorrectly treated unitless values as pixels: Chromium/native now agree on
[60, 40, 200, 2]for inherited1.5, own1, own5, and explicit2px. Dynamic restoration, retained text-resource geometry, browser/native WPT, the V8-free shared CSS service, a 4,096-node × 20-cycle bound, and the exact Native Linux document/compiler gate pass. The final profile was p95 106.36 ms, max 106.70 ms, unchanged V8 heap, and +19.98 MiB RSS.#240 remains open for its other independent layout gaps.
Implementation merged via #444 at
d28995e2a8cd898a6ba5a3f43baffe091ccda18afrom exact source597b387f69a2346808faea308e6ef6c9e63bea02on baseac235def2417569b949af14ff18fd99153c88dbd.The focused slice exposes and retains
aspect-ratio, carries it into generated pseudo boxes, applies a preferred ratio when one axis is definite in ordinary/flex/grid/floating/positioned layout, accounts for content-box versus border-box edges, serializes computed style, and includes ratio changes in layout equality.No validation was run under the implementation-only instruction. Outstanding debt remains exactly the browser/native geometry matrix, invalid-value and min/max transfer coverage, dynamic mutation and pseudo coverage, the 4,096-box performance/heap/RSS/lifecycle/idle-publication gate, and exact-package Code OSS editor watermark, banner, and aquarium regions. This issue is reopened to retain that debt after the PR's
Closesdirective automatically closed it.Implementation-first re-audit at WebScene
488b9790found no documented browser-reduced product-used layout defect beyond implemented owners. #439 aspect-ratio behavior is merged; its remaining geometry/mutation/performance/lifecycle/package matrix is validation debt. The developer-owned #112 worktree was left untouched. No code or runtime validation was run;git diff --checkpassed.
Current layout checkpoint — 20 September 2026
Exact merged heads: WebScene
a46b62e14eb197603f7e227c1558afb9088633b0; AppScene97702daeb9ad71341ced7226f0aa966dc77ea53c; unchanged Code OSS645f29cc3176500b4b5762ba887cf2a7f0ffdf2c; local vscode-demoe4b98e5470cd7856aff3dfd6843c8e125d7db933(clean, intentionally unpushed). Open consolidations remain WebScene #76085bba760fa571c8f08ea866dc5dd1ec27c4d376, AppScene #65ce66ef6ceb776b3f14e129f853bfc08b5c5e608c, and vscode-demo #1; do not merge them. One-agent mode is active.Focused layout slices recorded here are merged through the later isolation, text-wrap, word-break/overflow-wrap, retained image fit/alignment, overscroll and touch-action work now present on current main. No focused layout branch is active.
Continue implementation only from a reduced current-main geometry defect. Browser/native geometry, mutation scope, 4,096-node bounds, editor/Settings/Explorer/terminal pixels, package and cross-RID acceptance remain deferred.
Parent tracker: #235
Problem
Remaining CSS layout gaps surface as product-specific visual differences. We need browser-referenced, product-neutral geometry contracts across the layout algorithms used by desktop applications.
Proposed work
Acceptance
#148 owns its current logical sizing, responsive grid, scrolling, and catalog layout changes; do not duplicate them.