Created attachment 8534964 [details] Minimal test case to reproduce the issue I found difference between Firefox and Chrome behavior while fixing the bug 1108796. Looks like Chrome does not perform anything in appendChild if the child element is already in its place in the DOM; e.g. div.appendChild(video); will not stop the video if it is already appended to the div. For comparison, the video stops in Firefox.
Per spec, div.appendChild(video) must have exactly the same observable behavior as doing these steps: video.remove(); div.appendChild(video); Is that not the case in Chrome?
(In reply to Boris Zbarsky (Vacation Dec 15-31) [:bz] from comment #1) > > Is that not the case in Chrome? It is not. It looks like Chromium is doing if-already-last-child-of optimization . You are right -- the spec does not define this type of optimization. won't fix?  https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/dom/ContainerNode.cpp&rcl=1418267803&l=693
That blink behavior is totally nuts. Please file a chromium bug.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.