Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c177199a72c0d38878dcffa142e64ffe263e822e
      
https://github.com/WebKit/WebKit/commit/c177199a72c0d38878dcffa142e64ffe263e822e
  Author: Ryosuke Niwa <[email protected]>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    A LayoutTests/fast/dom/replace-children-mutation-events-expected.txt
    A LayoutTests/fast/dom/replace-children-mutation-events.html
    M Source/WebCore/dom/ContainerNode.cpp
    M Source/WebCore/dom/Node.cpp
    M Source/WebCore/dom/Node.h

  Log Message:
  -----------
  Add mutation events tests for ContainerNode::replaceChildren and refactor the 
code
https://bugs.webkit.org/show_bug.cgi?id=261016

Reviewed by Chris Dumez.

Added some tests for mutating DOM during replaceChildren's tree mutating 
operations.

Also refactor the code in ContainerNode::replaceChildren by merging some 
aspects of
Node::convertNodesOrStringsIntoNode into the function so that all node removal &
insertion the logic will be in one place.

* LayoutTests/fast/dom/replace-children-mutation-events-expected.txt: Added.
* LayoutTests/fast/dom/replace-children-mutation-events.html: Added.
* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::ContainerNode::replaceChildren):
* Source/WebCore/dom/Node.cpp:
(WebCore::Node::convertNodesOrStringsIntoNodeVector): Extracted from 
convertNodesOrStringsIntoNode.
(WebCore::Node::convertNodesOrStringsIntoNode):
* Source/WebCore/dom/Node.h:

Canonical link: https://commits.webkit.org/267565@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to