Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 601a3f85ff36a7cbb4e1aa21d37a99fe268312f1
      
https://github.com/WebKit/WebKit/commit/601a3f85ff36a7cbb4e1aa21d37a99fe268312f1
  Author: Nathan Solomon <[email protected]>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M Source/WebCore/dom/ContainerNode.cpp

  Log Message:
  -----------
  Remove calling notifyChildInserted in 
executeParserNodeInsertionIntoIsolatedTreeWithoutNotifyingParent in 
ContainerNodeAlgorithms.cpp
https://bugs.webkit.org/show_bug.cgi?id=288982
rdar://146035398

Reviewed by Ryosuke Niwa.

This PR is put up currently to test correctness on Layout Tests.

When parsing and constructing a temporary DocumentFragment using the 
HTMLFastPathParser,
we insert un-connected nodes and update the node flags of this node's subtree 
by calling
notifyChildInserted via 
executeParserNodeInsertionIntoIsolatedTreeWithoutNotifyingParent.
notifyChildInserted does a traversal of the inserted node's subtree to do this 
updating.
When appending the constructed DocumentFragment's children to be children of 
the ContainerNode
that the user has called .innerHTML on, we also call notifyChildInserted on the 
each of these
fragment nodes from appendChildWithoutPreInsertionValidityCheck via 
replaceChildrenWithFragment.
This visits and updates the node flags of every node in the DocumentFragment 
tree.
Skip the traversals to update the node flags when inserting nodes into the 
DocumentFragment,
since we always finally update the flags of the inserted nodes when they are 
inserted into
the permanent Document. This is a .64% progression on SP3.

This PR was influenced by this Chromium commit: 
https://chromium-review.googlesource.com/c/chromium/src/+/6174392

* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::executeParserNodeInsertionIntoIsolatedTreeWithoutNotifyingParent):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to