Fix unresolved-any converter re-entry during style computation - #244
Merged
FlorianRappl merged 1 commit intoSep 7, 2026
Merged
Conversation
Return an accepted opaque value instead of recursively computing it through the same composite converter. Preserve complete-input validation, concrete computation, and direct Any resolution semantics. Cover individual transforms, nested composite converters, variable substitution, inheritance, invalid values, and custom-property cycles. Fixes AngleSharp#243 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
sebastienros
marked this pull request as draft
September 7, 2026 05:32
sebastienros
marked this pull request as ready for review
September 7, 2026 05:33
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.
Types of Changes
Prerequisites
Please make sure you can check the following two boxes:
Contribution Type
What types of changes does your code introduce? Put an
xin all the boxes that apply:Description
ComputeCurrentStyle()stack-overflows on a plain<div style='translate: 1px'></div>. The same issue affectsrotateandscale: their composite converters accept opaque tokens through anAnyarm, thenCssAnyValue.Computerecursively recomputes the returnedCssAnyValuethrough the same converter. No JavaScript or custom-property cycle is needed; the re-entry predates #242.After checking that conversion consumed the complete input, return an accepted
CssAnyValuedirectly. Concrete results still compute normally, and directAny/ missing-converterIsResolvedbehavior remains unchanged. This is a computation-boundary fix, not a property-specific workaround; #242's custom-property resolution and cycle handling are untouched.Fixes: #243
Regression coverage includes translate 1/2/3-component forms, percentages and zero, rotate/scale and
none, nested composite converters, concrete unit/calc conversion, invalid/trailing input, exception propagation, render-tree and specified-style compatibility, substitution, inheritance, and missing/cyclic variable fallback behavior.Validation
1pxon .NET 8 and .NET 10.-p:TargetFrameworks=net10.0 -p:RestoreEnablePackagePruning=falsewithout changing project manifests.Scope
Existing individual-transform
Anygrammars remain permissive and retain token serialization; this does not add grammar validation, browser-style unit normalization, or transform layout. Windows-only net462/net472 targets were not exercised on macOS. No public API, dependency, or package-version changes are included.