Skip to content

script: Allow Selection to live in shadow roots - #47694

Merged
mrobinson merged 1 commit into
servo:mainfrom
mrobinson:selection-allow-selections-in-shadow-roots
Sep 7, 2026
Merged

mrobinson merged 1 commit into
servo:mainfrom
mrobinson:selection-allow-selections-in-shadow-roots

Conversation

@mrobinson

@mrobinson mrobinson commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

This change makes Selection capable of living inside shadow roots, but
only when those selections do not span shadow root boundaries. A
followup change will allow shadow-spanning Selection, but this is a
transitionary step.

Testing: This causes a few subtests to start passing and one to start failing (this was a false pass previously).
Fixes: #47118.
Fixes: #47119.

@mrobinson
mrobinson requested a review from gterzian as a code owner August 31, 2026 16:28
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 31, 2026
@mrobinson mrobinson added the T-linux-wpt Do a try run of the WPT label Aug 31, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Aug 31, 2026
@github-actions

Copy link
Copy Markdown

🔨 Triggering try run (#33414410958) for Linux (WPT)

@github-actions

Copy link
Copy Markdown

⚠️ Try run (#33414410958) failed!

@mrobinson
mrobinson force-pushed the selection-allow-selections-in-shadow-roots branch 2 times, most recently from 8db4cb6 to deb8d20 Compare September 2, 2026 14:51
@mrobinson mrobinson added the T-linux-wpt Do a try run of the WPT label Sep 2, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

🔨 Triggering try run (#33644991786) for Linux (WPT)

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

⚠️ Try run (#33644991786) failed!

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

⚠️ Try run (#33644991786) cancelled.

@SimonSapin
SimonSapin force-pushed the selection-allow-selections-in-shadow-roots branch from deb8d20 to 05ed72d Compare September 7, 2026 07:39
@mrobinson
mrobinson force-pushed the selection-allow-selections-in-shadow-roots branch 2 times, most recently from 4d32b0e to 98dee03 Compare September 7, 2026 09:42
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Sep 7, 2026
@mrobinson
mrobinson added this pull request to the merge queue Sep 7, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Sep 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 7, 2026
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 7, 2026
This change makes `Selection` capable of living inside shadow roots, but
only when those selections do not span shadow root boundaries. A
followup change will allow shadow-spanning `Selection`, but this is a
transitionary step.

Signed-off-by: Martin Robinson <[email protected]>
@mrobinson
mrobinson force-pushed the selection-allow-selections-in-shadow-roots branch from 98dee03 to dd87bd8 Compare September 7, 2026 11:35
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Sep 7, 2026
@mrobinson
mrobinson added this pull request to the merge queue Sep 7, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Sep 7, 2026
Merged via the queue into servo:main with commit 7459ed3 Sep 7, 2026
36 checks passed
@mrobinson
mrobinson deleted the selection-allow-selections-in-shadow-roots branch September 7, 2026 17:02
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Sep 7, 2026
RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
This change makes `Selection` capable of living inside shadow roots, but
only when those selections do not span shadow root boundaries. A
followup change will allow shadow-spanning `Selection`, but this is a
transitionary step.

Testing: This causes a few subtests to start passing and one to start
failing (this was a false pass previously).
Fixes: servo#47118.
Fixes: servo#47119.

Signed-off-by: Martin Robinson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selection's selectAllChildren() doesn't work with shadow roots Selection's extend() doesn't work with shadow boundaries

3 participants