Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range APIs do not construct / move trees in tree order (observable by custom elements) #9730

Merged
merged 1 commit into from
Feb 8, 2023

Commits on Feb 8, 2023

  1. 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
    rniwa committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    fa5a06a View commit details
    Browse the repository at this point in the history