Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 81abbdb522434572239e6f2fb13ef6df74b72fc9
      
https://github.com/WebKit/WebKit/commit/81abbdb522434572239e6f2fb13ef6df74b72fc9
  Author: Andrew Fryer <[email protected]>
  Date:   2026-01-21 (Wed, 21 Jan 2026)

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

  Log Message:
  -----------
  Avoid redoing DOM checks when version unchanged
https://bugs.webkit.org/show_bug.cgi?id=305565
rdar://168227181

Reviewed by Ryosuke Niwa.

In insertBefore, replaceChild, appendChildWithoutPreInsertionValidityCheck,
and insertChildrenBeforeWithoutPreInsertionValidityCheck, we validate
nodes' structure and types and then perform several DOM mutations. Since
DOM mutation event handlers might themselves mutate the DOM, we need to
redo validation in between mutations. Instead of always redoing
mutations, only redo them when the dom version has changed.

* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck):
(WebCore::ContainerNode::insertChildrenBeforeWithoutPreInsertionValidityCheck):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to