Commit a091551
fix(dom): getRootNode honours the
`getRootNode()` ignored its options and always walked to the topmost node,
crossing shadow boundaries (a ShadowRoot's `_parent` is its host). Per DOM "get
the root", the default (`composed: false`) returns the node's own root and stops
at a shadow boundary; only `composed: true` returns the shadow-including root.
So a node in a shadow tree now returns its ShadowRoot, not the document.
The one internal consumer relying on the old shadow-crossing behaviour —
`moveBefore`'s same-(shadow-including-)tree check — now passes `{composed: true}`
explicitly (the symmetric WPT allowlist caught this regression on regen).
Clears rootNode.html. Gate 660/0/15, gem 1586/0/35, 0 regressions (incl.
moveBefore). Shadow-only public-API semantics, not a hot path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>composed option (−1)1 parent 2b1792a commit a091551
3 files changed
Lines changed: 23 additions & 12 deletions
File tree
- lib/capybara/simulated/js
- src
- spec/support
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7071 | 7071 | | |
7072 | 7072 | | |
7073 | 7073 | | |
7074 | | - | |
| 7074 | + | |
| 7075 | + | |
7075 | 7076 | | |
7076 | | - | |
| 7077 | + | |
| 7078 | + | |
| 7079 | + | |
| 7080 | + | |
7077 | 7081 | | |
7078 | 7082 | | |
7079 | 7083 | | |
| |||
12528 | 12532 | | |
12529 | 12533 | | |
12530 | 12534 | | |
12531 | | - | |
| 12535 | + | |
12532 | 12536 | | |
12533 | 12537 | | |
12534 | 12538 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
761 | | - | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
762 | 768 | | |
763 | | - | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
764 | 773 | | |
765 | 774 | | |
766 | 775 | | |
| |||
5853 | 5862 | | |
5854 | 5863 | | |
5855 | 5864 | | |
5856 | | - | |
5857 | | - | |
5858 | | - | |
5859 | | - | |
| 5865 | + | |
| 5866 | + | |
| 5867 | + | |
| 5868 | + | |
| 5869 | + | |
5860 | 5870 | | |
5861 | 5871 | | |
5862 | 5872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | 340 | | |
344 | 341 | | |
345 | 342 | | |
| |||
0 commit comments