Bug 148781
| Summary: | node.replaceChild(node.lastChild, node.firstChild) should add two mutation records | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | cdumez, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ryosuke Niwa
Because of the way replaceChild is defined (https://dom.spec.whatwg.org/#dom-node-replacechild),
it should add two mutation records when the inserted node was originally a sibling of the reference child.
e.g. node.replaceChild(node.lastChild, node.firstChild) when node has two children.
This bug was found by the newly added test: LayoutTests/http/tests/w3c/dom/nodes/MutationObserver-childList.html
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/22571887>
Chris Dumez
*** This bug has been marked as a duplicate of bug 149546 ***