Skip to content

Let embedder handle "maybe clone option into selectedcontent" algorithm#719

Merged
mrobinson merged 2 commits intoservo:mainfrom
simonwuelker:selectedcontent-fixes
Jan 22, 2026
Merged

Let embedder handle "maybe clone option into selectedcontent" algorithm#719
mrobinson merged 2 commits intoservo:mainfrom
simonwuelker:selectedcontent-fixes

Conversation

@simonwuelker
Copy link
Contributor

@simonwuelker simonwuelker commented Jan 20, 2026

The current way we track the enabled selectedcontent element of the nearest ancestor select is wrong (see #712 (comment)). This change moves most of the code for maybe clone an option into selectedcontent into TreeSink, removing the need to track said element.

Hopefully the amount of code needed to provide a reasonable (yet still incorrect!) implementation of the new method in rcdom is enough to convince everyone that we don't want to handle this inside html5ever - it needs very tight integration with the DOM, much more so than anything else we currently have.

Merging this change will also require a new breaking release. It is unfortunate to bump the version again so soon, but the current version has major issues, see #560 (comment).

Part of #712
Companion PR for servo/servo#42036

cc @untitaker

@github-actions github-actions bot added the V-breaking Breaking change label Jan 20, 2026
@simonwuelker simonwuelker marked this pull request as ready for review January 21, 2026 12:07
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
@simonwuelker simonwuelker force-pushed the selectedcontent-fixes branch from e03ecbf to c5b938b Compare January 21, 2026 12:09
@github-actions github-actions bot added V-breaking Breaking change and removed V-breaking Breaking change labels Jan 21, 2026
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
@simonwuelker
Copy link
Contributor Author

servo/servo#42036 is approved.

Can someone with release permissions merge this and then publish the new versions?

@github-actions github-actions bot added V-non-breaking A non-breaking change and removed V-breaking Breaking change labels Jan 22, 2026
@mrobinson mrobinson added this pull request to the merge queue Jan 22, 2026
Merged via the queue into servo:main with commit be20a55 Jan 22, 2026
9 checks passed
@mrobinson
Copy link
Member

I've released the new versions.

github-merge-queue bot pushed a commit to servo/servo that referenced this pull request Jan 22, 2026
Do not merge yet - we need to create a new html5ever release.
The html5ever bump also includes encoding indicators, which we handle in
the most minimal way possible here. They will be handled properly by
#41730

Companion PR for servo/html5ever#719

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

V-non-breaking A non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants