Wrong MutationRecords for Node.replaceChild() |
|||
Issue descriptionChrome Version: (copy from chrome://version) OS: (e.g. Win7, OSX 10.9.5, etc...) What steps will reproduce the problem? (1) Open http://w3c-test.org/dom/nodes/MutationObserver-childList.html What is the expected result? Expected: No Fail tests What happens instead? Actual: Two Fail tess Please use labels and text to provide additional information. They tests mutation records for replaceChild(). parent.replaceChild(parent.lastChild, parent.firstChild); It should produce two MutationRecords for * the removal of parent.lastChild from parent, and * the removal of parent.firstChild and the addition of parent.lastChild. But we produces only one record.
,
May 16 2017
,
May 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/56387aa57bc11d0f969c5bb9824a39c804202be3 commit 56387aa57bc11d0f969c5bb9824a39c804202be3 Author: tkent <tkent@chromium.org> Date: Wed May 17 09:12:21 2017 MutationObserver: Correct MutationRecords for Node.replaceChild(). parent.replaceChild(parent.lastChild, parent.firstChild); This code produced just one MutationRecord, but it should produce two MutationRecords. This CL makes replaceChild() implementation close to the DOM standard. New behavior matches to Firefox and Safari. BUG= 722741 Review-Url: https://codereview.chromium.org/2889523002 Cr-Commit-Position: refs/heads/master@{#472393} [delete] https://crrev.com/05e9dab183abf911f6a390ec6bdd77692760a824/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/MutationObserver-childList-expected.txt [modify] https://crrev.com/56387aa57bc11d0f969c5bb9824a39c804202be3/third_party/WebKit/LayoutTests/fast/dom/move-nodes-across-documents-expected.txt [modify] https://crrev.com/56387aa57bc11d0f969c5bb9824a39c804202be3/third_party/WebKit/LayoutTests/fast/dom/move-nodes-across-documents.html [modify] https://crrev.com/56387aa57bc11d0f969c5bb9824a39c804202be3/third_party/WebKit/LayoutTests/fast/events/mutation-during-replace-child-expected.txt [modify] https://crrev.com/56387aa57bc11d0f969c5bb9824a39c804202be3/third_party/WebKit/LayoutTests/fast/events/mutation-during-replace-child.html [modify] https://crrev.com/56387aa57bc11d0f969c5bb9824a39c804202be3/third_party/WebKit/Source/core/dom/ContainerNode.cpp
,
May 18 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by tkent@chromium.org
, May 16 2017