Skip to content

Release 1.1.3 - #251

Merged
FlorianRappl merged 7 commits into
mainfrom
devel
Oct 15, 2026
Merged

FlorianRappl merged 7 commits into
mainfrom
devel

Conversation

@FlorianRappl

Copy link
Copy Markdown
Contributor

Types of Changes

Prerequisites

Please make sure you can check the following two boxes:

  • I have read the CONTRIBUTING document
  • My code follows the code style of this project

Contribution Type

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue, please reference the issue id)
  • New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Description

This pull request updates the AngleSharp.Css library to version 1.1.3, focusing on performance improvements for pseudo-class matching and fixing an issue with box-shadow serialization. It also adds a new test to cover the box-shadow fix and updates documentation and versioning files accordingly.

lahma and others added 7 commits September 12, 2026 10:37
WithCss() wraps every non-:focus pseudo-class selector in
ForcingPseudoClassSelector so a caller-forced state (SetPseudoClass)
can override normal matching. Its Match() probed the process-wide
PseudoClassStateStore ConditionalWeakTable before delegating, on every
attempted match - so a page that has never called SetPseudoClass still
paid that probe for every :hover, :disabled, :checked, ... match
attempt in the cascade.

Add a static flag set the first time anything is forced, checked
before the table probe in TryGet. It only ever moves from "nothing
forced" to "something forced": Remove/Clear cannot prove every forced
state everywhere has been undone (there is no per-element or
per-process count to check), so it deliberately never goes back to
false - once anything has been forced anywhere in the process, matching
pays the old per-attempt cost again. This is a process-wide static, so
it also does not distinguish between documents/engines; the trade-off
favors the overwhelmingly common case of a process that never forces
anything.

Extended CssCascadeBenchmarks' ComputedStyle row (the existing 400-rule
cascade) with one :hover/:active/:disabled rule per child class so most
sampled elements reach the forcing wrapper instead of being
short-circuited by an earlier, non-matching simple selector - this
benchmark builds against the published AngleSharp NuGet package, so it
cannot exercise the sibling AngleSharp-core specificity-caching change
from this same stream without a local package override; only this
pseudo-class fix is observable from an in-repo run.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WQwq9NqYqG3kk9M8CKdfdJ
1.1.2 shipped on September 11 (GitHub release v1.1.2, and 1.1.2 is the
latest stable on NuGet), so this change belongs to the next version rather
than to a released one. Left <Version> in src/Directory.Build.props alone:
ReleaseNotesParser takes the version from this file's top entry, and the
props value is documented as the fallback for builds that bypass Fallout.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WQwq9NqYqG3kk9M8CKdfdJ
Per review: opening the 1.1.3 section is not the whole bump - the props
value and the docs package.json carry it too.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WQwq9NqYqG3kk9M8CKdfdJ
Skip the pseudo-class forcing lookup until something is forced
Preserve zero blur when serializing box-shadow spread
Updated release date and added a fix for box-shadow serialization.
@FlorianRappl FlorianRappl added this to the v1.1.3 milestone Oct 15, 2026
@FlorianRappl
FlorianRappl merged commit fdf4a58 into main Oct 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants