Skip to content

fix: preserve explicit margins after source root normalization - #659

Draft
bubkoo wants to merge 1 commit into
codex/fragmented-block-sizefrom
codex/root-margin-cascade-math
Draft

bubkoo wants to merge 1 commit into
codex/fragmented-block-sizefrom
codex/root-margin-cascade-math

Conversation

@bubkoo

@bubkoo bubkoo commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Retained source !important margins can reapply an external 24px offset after cloning. Promoting inline zeros also suppresses a user's explicit 16px margin. Record the source's adjoining-margin origin before callbacks, remove the cloned baseline before user changes, then defer eligible source rules to private native-cascade channels at serialization. Color-only changes keep the old margin normalized; inline 0/16/24, newly winning 16px rules, source STYLE text edits and non-target margins remain effective.

Stacked on #658 at ea16708, using its actual head branch codex/fragmented-block-size. This ten-file commit preserves that branch's Firefox native-metadata/readiness implementation and all original 192 package tests.

The source plan keeps primitive DTOs behind weak source keys. Existing clone STYLE text stays unchanged until callbacks finish; owned clone records are cleared in finally. Inert XML parsing, final namespace-universal paths and adjacent non-target restore rules preserve selector case, target identity and literal resource URIs. No source stylesheet mutation, adopted stylesheet, marker attribute or extra Image/Canvas prediction is introduced.

The important-margin path is limited to measured ordinary horizontal flow and flat finite scalar px declarations. Grouped/layered/imported styles, unsupported declarations/selectors and ambiguous ownership retain prior handling. Layer and style-attribute negative controls explicitly retain unresolved desired pixel differences; they are not fixes or new skips.

Validation of commit 3753568:

  • Full source: 1435 passed, 1 failed, 4 existing skips (1440 total).
  • Full coverage: 1554 passed, the same 1 failed, 4 existing skips (1559 total).
  • The remaining failure is the known content-visibility:auto root comparison. Its assertion is unchanged and it remains a merge blocker.
  • All original 141 root cases remain. Added controls cover color-only changes, losing/new winning rules, explicit margins, source text edits, non-target insertion, named forms and exact raw alpha. The important-source logical-axis controls (9), parser-refusal SVG controls (3), and held-snapshot removed-source-iframe controls (3) pass in both full phases. GC commands, counts, deadlines and the existing WebKit native-removal boundary are unchanged.
  • Fresh final ESM/UMD package checks: 36/36 passed. Full lint, source/browser types, build, normal commit hooks and installed-tarball ESM/CJS/UMD/type consumers pass. The 74 source/unit, 180 compiled/package and 298 expanded input fingerprints remain stable; hooks changed no bytes.

The earlier 228/228 full package pass used the version before the optional parser-refusal catch; it is historical validation, not a full-package result for the final bytes. An earlier targeted 210-test run also preserved two Firefox GC-command errors. Both final full phases pass those GC cases without extra calls or increased waits; the earlier command-error cause remains unresolved. The named-form fixture correction initializes hidden inputs before its original snapshot to avoid Playwright caret restoration leaving an empty style attribute; the complete source-HTML assertion is retained.

Keep draft. This does not claim every root-layout case, unsupported CSS domain or remaining issue is solved. No npm publication or merging.

Remote validation for 3753568:

CI 46248802852 failed at coverage: 1554 passed, 1 failed, 4 existing skips. The sole failure is WebKit content-visibility:auto, expected zero but observed 12800 different channels. Explicit source and full built-package stages did not run; Coveralls and Codecov uploads were skipped. This remains a merge blocker. No rerun replaced the failing result.

The tested merge 7ed5b8cf4348d9abbe2a45a4ba46d745ac30ee50 has parents [ea167089,3753568] and the same tree as this head. Local original evidence and verifier preserve all intermediate failures, the final 36 package checks, six unsupported-domain controls, and the absence of paired capture PNGs for the native group. Exact-head remote evidence and verifier independently check checkout identity, counts, ZIP digest/CRC and all six members. These evidence links are pinned to an immutable documentation commit.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant