Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fa5a06a66c96bc6864e684d9f9f07b115f39c60e
      
https://github.com/WebKit/WebKit/commit/fa5a06a66c96bc6864e684d9f9f07b115f39c60e
  Author: Ryosuke Niwa <rn...@webkit.org>
  Date:   2023-02-07 (Tue, 07 Feb 2023)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/custom-elements/range-and-constructors-expected.txt
    M Source/WebCore/dom/CustomElementReactionQueue.cpp
    M Source/WebCore/dom/CustomElementReactionQueue.h
    M Source/WebCore/dom/Range.cpp

  Log Message:
  -----------
  Range APIs do not construct / move trees in tree order (observable by custom 
elements)
https://bugs.webkit.org/show_bug.cgi?id=188279

Reviewed by Chris Dumez.

In order to match the spec'ed upgrade order, create a nested custom element 
reaction stack
which is used as a holding tank of upgrade reactions during 
Range::processContents.

At the end, we traverse the document fragment top-down and re-enqueue each 
element to the real
custom element reaction stack in the tree order.

* 
LayoutTests/imported/w3c/web-platform-tests/custom-elements/range-and-constructors-expected.txt:
* Source/WebCore/dom/CustomElementReactionQueue.cpp:
(WebCore::CustomElementQueue::takeElements): Added.
(WebCore::CustomElementReactionQueue::enqueueElementsOnAppropriateElementQueue):
 Added.
(WebCore::CustomElementReactionStack::takeElements): Added.
* Source/WebCore/dom/CustomElementReactionQueue.h:
* Source/WebCore/dom/Range.cpp:
(WebCore::Range::processContents):

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to