servo/tests
bors-servo bf29f59adf
Auto merge of #29641 - CYBAI:fix-attr-checking, r=jdm
Throw HierarchyRequest error for attr node in pre-insertion

Based on Step 4 of https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity, we should throw `HierarchyRequest` error when the node is not a [DocumentFragment](https://dom.spec.whatwg.org/#documentfragment), [DocumentType](https://dom.spec.whatwg.org/#documenttype), [Element](https://dom.spec.whatwg.org/#element), or [CharacterData](https://dom.spec.whatwg.org/#characterdata) [node](https://dom.spec.whatwg.org/#concept-node).

Thus, Attr is not one of them; we should throw an error in this case.

(I'm guessing it was a kind of typo in https://github.com/servo/servo/pull/25310 because we need to handle Attr with `unreachable` in line 1946)

So, with doing so, we can fix the CRASH in `/dom/attributes-are-nodes.html`.

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
- [x] There are tests for these changes
2023-04-23 18:16:15 +02:00
..
dromaeo
html
jquery Replace usage of six.moves.urllib with urllib 2023-04-10 12:47:39 +02:00
power
unit */Cargo.toml: use the shmem feature for the dependency on the selectors cratre 2023-02-14 13:05:59 -06:00
wpt Auto merge of #29641 - CYBAI:fix-attr-checking, r=jdm 2023-04-23 18:16:15 +02:00