[webkit-changes] [WebKit/WebKit] af3763: Specialize appendChild for cloneNodeInternal

Ryosuke Niwa noreply at github.com
Thu Jul 27 18:36:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: af3763363c5b099d010049d6ca17f5e339763b31
      https://github.com/WebKit/WebKit/commit/af3763363c5b099d010049d6ca17f5e339763b31
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2023-07-27 (Thu, 27 Jul 2023)

  Changed paths:
    M Source/WebCore/dom/ContainerNode.cpp
    M Source/WebCore/dom/ContainerNode.h
    M Source/WebCore/html/HTMLOptionElement.cpp

  Log Message:
  -----------
  Specialize appendChild for cloneNodeInternal
https://bugs.webkit.org/show_bug.cgi?id=259542

Reviewed by Yusuke Suzuki.

This PR integrates appendChild into cloneNodeInternal. It also introduces new ChildChange::Source
for cloning and deploys it in HTMLOptionElement::childrenChanged to avoid hitting debug assertions
in HTMLSelectElement::listItems().

* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeNodeWithScriptAssertion):
(WebCore::makeChildChangeForCloneInsertion):
(WebCore::ContainerNode::cloneChildNodes):
* Source/WebCore/dom/ContainerNode.h:
* Source/WebCore/html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::childrenChanged):

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




More information about the webkit-changes mailing list