Skip to content

script: Use AtomicRefCell for Selection::visible_range - #49068

Merged
jdm merged 2 commits into
servo:mainfrom
gabrielecabrini:selection-visible-range-atomicrefcell
Oct 20, 2026
Merged

jdm merged 2 commits into
servo:mainfrom
gabrielecabrini:selection-visible-range-atomicrefcell

Conversation

@gabrielecabrini

Copy link
Copy Markdown
Contributor

script: Use AtomicRefCell for Selection::visible_range

Replace the DomRefCell with an AtomicRefCell, like #46757 and #46758,
so layout no longer needs borrow_for_layout(). The field holds
Dom<Node>, so this also adds a CustomTraceable impl for AtomicRefCell.

Testing: Existing tests in tests/wpt/tests/selection pass.
Fixes: #49058

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 19, 2026
Comment thread components/script/dom/selection.rs Resolved
@servo-highfive servo-highfive added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 19, 2026
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Oct 19, 2026
@gabrielecabrini
gabrielecabrini requested a review from jdm October 19, 2026 18:45
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Oct 20, 2026
@jdm

jdm commented Oct 20, 2026

Copy link
Copy Markdown
Member

Thank you!

@jdm
jdm added this pull request to the merge queue Oct 20, 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 Oct 20, 2026
Merged via the queue into servo:main with commit d58f03b Oct 20, 2026
38 checks passed
@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 Oct 20, 2026
@gabrielecabrini
gabrielecabrini deleted the selection-visible-range-atomicrefcell branch October 20, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace Selection::visible_range with AtomicRefCell

3 participants