Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d1eb42e417eb4b68aba5d7db42aabeba7be2dfc0
      
https://github.com/WebKit/WebKit/commit/d1eb42e417eb4b68aba5d7db42aabeba7be2dfc0
  Author: Luke Warlow <[email protected]>
  Date:   2026-06-02 (Tue, 02 Jun 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/dom/nodes/moveBefore/live-range-updates-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/dom/nodes/moveBefore/moveBefore-nodeiterator-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/dom/nodes/moveBefore/moveBefore-nodeiterator.html
    M Source/WebCore/dom/ContainerNode.cpp
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h

  Log Message:
  -----------
  moveBefore() should run node iterator and live range pre-remove steps
https://bugs.webkit.org/show_bug.cgi?id=315754

Reviewed by Ryosuke Niwa.

This adds a new nodeWillBeMoved() function to Document and calls it from within
ContainerNode::moveBefore(). This function calls the pre-remove steps.

Also adds a new WPT to excercise the node iterator steps as coverage was 
lacking.

Test: 
imported/w3c/web-platform-tests/dom/nodes/moveBefore/moveBefore-nodeiterator.html

* 
LayoutTests/imported/w3c/web-platform-tests/dom/nodes/moveBefore/live-range-updates-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/dom/nodes/moveBefore/moveBefore-nodeiterator-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/dom/nodes/moveBefore/moveBefore-nodeiterator.html:
 Added.
* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::ContainerNode::moveBefore):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::nodeWillBeMoved):
* Source/WebCore/dom/Document.h:

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



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

Reply via email to