Move to AngleSharp.Css 1.1.1-beta.308, the preview with the converter re-entry fix - #3980
Merged
lahma merged 1 commit intoSep 8, 2026
Merged
Conversation
… re-entry fix AngleSharp.Css 1.1.0 stack-overflows while computing a style for any of CSS Transforms Level 2's individual transform properties. Those three converters are an Or of `none` with an any-arm, and CssAnyValue.Compute skipped reparsing only when the compute context's converter was directly that any-converter; through the composite it reparsed the unchanged text with the same composite converter, whose any-arm handed back another unresolved value, without bound (AngleSharp/AngleSharp.Css#243, fixed by its sebastienros#244). A plain `<div style="translate: 1px">` therefore ended the process: a stack overflow is the one CSS failure Dom/Views/CssCascade's guard cannot turn into a null cascade, because it cannot be caught at all. 1.1.1-beta.308 is v1.1.0 plus exactly that fix — upstream's devel branch is three commits ahead of the v1.1.0 tag, and they are the fix, its version bump and the merge. Core AngleSharp stays at 1.8.0: nuget.org lists nothing after it, prerelease included. The generator pin moves with the reference, as tools/dom-bindings/README.md requires. Regenerating against the beta produces a byte-identical Jint.Browser/Dom/Generated/ and a report differing only in its assembly-version line, so nothing is regenerated here and no divergence row is retired: the beta changes a computation boundary, not a [DomName] surface. DomBindingsPinTests compared the pinned string's first three dot-separated parts against the loaded assembly version, which reads "1.1.1-beta" against "1.1.1"; it now drops the prerelease suffix before comparing. Evidence: Jint.Tests.Browser/Views/IndividualTransformStyleTests, run in this worktree with the package reverted to 1.1.0, aborts the run — "Test host process crashed : Stack overflow", the repeating frame being AngleSharp.Css.Values.CssAnyValue...Compute — both for the getComputedStyle cases and, running on its own, for the geometry case. The `none` control passes on 1.1.0, so the suite's green is not vacuous. On the beta all nine cases pass, and Jint.Tests.Browser is green on net8.0 (2291) and net10.0 (2295) with the wpt browser census checked and unchanged. Refs sebastienros#3882 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SLCujwvKtTvtWD9f6RTyiF
This was referenced Sep 8, 2026
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.
What and why
Refs #3882.
Directory.Packages.propsmoves AngleSharp.Css from 1.1.0 to 1.1.1-beta.308, the preview the maintainer asked this repository to consume. It unblocks draft #3888, which has been waiting for an official package containing AngleSharp/AngleSharp.Css#244 and today carries no dependency change at all.Core AngleSharp stays at 1.8.0. Verified against nuget.org's flat container: the newest version of
AngleSharpis1.8.0, and the two entries before it (1.8.0-beta.677,1.8.0-beta.679) are its own pre-release run — there is no post-1.8.0 preview to move to.Mechanism
AngleSharp.Css 1.1.0 stack-overflows while computing a style for any of CSS Transforms Level 2 §3's individual transform properties (
translate,rotate,scale). Each is shaped as anOrofnonewith an any arm, andCssAnyValue.Computeskipped reparsing only when the compute context's converter was directly that any-converter; through the composite it reparsed the unchanged text with the same composite converter, whose any arm returned another unresolved value, without bound (AngleSharp/AngleSharp.Css#243).That matters more here than an ordinary upstream bug, because it is the one CSS failure this package cannot contain.
Jint.Browser/Dom/Views/CssCascadeis the single guarded door ontoComputeCurrentStyle()and turns every CLR failure into anullcascade — but a .NET stack overflow is not an exception and cannot be caught, so<div style="translate: 1px">ended the host process. A page is not something an embedder can sandbox out of that.1.1.1-beta.308 is 1.1.0 plus exactly that fix. Checked rather than assumed:
GET repos/AngleSharp/AngleSharp.Css/compare/v1.1.0...develreportsahead_by 3, and the three commits areaf16326e(the fix),f48e8ba2(version bump) andd4e41f29(the #244 merge).What moved with it
tools/dom-bindings/pin.json— the pin and the package reference are one record, whichDomBindingsPinTestsenforces.Jint.Tests.Browser/DomBindingsPinTests.cs— its assembly comparison took the pinned version's first three dot-separated parts, which for1.1.1-beta.308is1.1.1-betaand never matches the loaded assembly's1.1.1. It now drops the prerelease suffix first. This is a real failure the bump produced, not preventive tidying (log below).AngleSharp.Cssentry saying why the pin is a prerelease and why the core package is not.Failing-first evidence
New suite:
Jint.Tests.Browser/Views/IndividualTransformStyleTests— nine cases overgetComputedStyleand over a geometry query.Run in this worktree with
Directory.Packages.propstemporarily reverted toAngleSharp.Css 1.1.0, everything else identical:--filter FullyQualifiedName~IndividualTransformStyleTestsTest host process crashed : Stack overflow.Passed! Failed: 0, Passed: 9AGeometryQueryOverATranslatedSubtreeStillAnswersABox)TheNoneKeywordStillComputes)Passed! Failed: 0, Passed: 3The repeating frame in the crash output is the upstream one:
So the "failing" half is a process-fatal crash rather than a test failure, which is exactly why it needs the
nonecontrol beside it:TheNoneKeywordStillComputesexercises the same three properties through the same converter's keyword arm and passes on 1.1.0, so the new suite going green on the beta is a measurement and not a tautology. TheDomBindingsPinTestschange has an ordinary failing-first record instead:Verified
All Release, no
--no-build, on this branch's head.dotnet build -c ReleaseBuild succeeded. 1 Warning(s), 0 Error(s)— the warning is the pre-existingMSB3277onJint.Tests.CommonScripts's net472 test-SDK assets; nothing in it names AngleSharpJINT_WPT_BROWSER_CENSUS=1 dotnet test -c Release Jint.Tests.Browser/Jint.Tests.Browser.csproj -f net8.0Failed: 0, Passed: 2291, Skipped: 36-f net10.0Failed: 0, Passed: 2295, Skipped: 36TheTableMatchesWhatTheLaneMeasuresis not among the 36 skipped)Jint.Tests.Browser/Wpt/README.mdis untouched in the diff, so no=updateregeneration was needed or performeddotnet test -c Release --filter FullyQualifiedName~AgentInstructionFileTestsPassed: 5on each of net8.0, net10.0, net472dotnet test -c Release Jint.Tests.Browser/Jint.Tests.Browser.csproj -f net8.0 --filter FullyQualifiedName~DomBindingsPassed: 5The bindings did not need regenerating, and that is a measurement too. The generator was run the long way against both packages with the same pinned
AngleSharp 1.8.0and the sameoverrides.json:gen(1.1.0)andgen(1.1.1-beta.308)are byte-identical (diff -rq).AngleSharp.Css 1.1.0.0becomesAngleSharp.Css 1.1.1.0. Same attribute inventory, same skipped members,Diagnostics (0)on both.Jint.Browser/Dom/Generated/modulo line endings, which is whatDomBindingsStalenessTestsindependently reports by passing.Deliberately left out
Jint.Browser/Dom/divergences.mdrow was added or retired. Clean project.json #243 was a crash, not a divergence, and the search for a Jint-side workaround came up empty — nothing inJint.Browser/orJint.Tests.Browser/mentions Clean project.json #243/System.Console.WriteLine(JSON.stringify(...)) does not work #244, no exclusion inWptBrowserExclusionsnames a transform or a computed-style crash, no fixture declarestranslate/rotate/scale, andCssCascade'scatchfilters could never have covered it. There was nothing to retire, and the beta's single change retires none of the recorded rows either (their subjects — colour serialization,:enabledon links, thematchMediaevaluator, explicitinherit— are untouched by System.Console.WriteLine(JSON.stringify(...)) does not work #244, and the whole suite stays green).docs/,Jint.Browser/AGENTS.md,Jint.Browser/Accessibility/AGENTS.mdanddivergences.mdsay things like "shipped in 1.1.0" and "fixed by Css 1.1.0's native computed-style pipeline". Those state which release introduced a behaviour and are still true; only the two records that must agree with the reference —Directory.Packages.propsandpin.json— carry the version.docs/releases/headless-browser.md. Its upstream-contributions tables are a snapshot of what a specific release consumed (they do not list AngleSharp.Css#242 either), not a running ledger.Upstream (AngleSharp) findings
None new. For the record, the two this consumes:
ComputeCurrentStylestack-overflows fortranslate/rotate/scalethroughCssAnyValueconverter re-entry. Closed.1.1.1-beta.308.One thing worth a maintainer's eye rather than an upstream report: a stable
Jint.Browserwould now carry a prerelease transitive dependency. That is fine while the package ships as5.0.0-preview-*, and it is the reason the pin comment says so out loud, but it wants a stableAngleSharp.Css 1.1.1before a stableJint.Browser.🤖 Generated with Claude Code
https://claude.ai/code/session_01SLCujwvKtTvtWD9f6RTyiF