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
Conversation
EWS run on previous version of this PR (hash 1d8c5e1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a few nits.
Source/WebCore/dom/Range.cpp
Outdated
RangeBoundaryPoint originalEnd(m_end); | ||
|
||
// what is the highest node that partially selects the start / end of the range? | ||
RefPtr<Node> partialStart = highestAncestorUnderCommonRoot(&originalStart.container(), commonRoot.get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would RefPtr
suffice instead of RefPtr<Node>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
EWS run on current version of this PR (hash fcd1be1) |
β¦ 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
fcd1be1
to
fa5a06a
Compare
Committed 259987@main (fa5a06a): https://commits.webkit.org/259987@main Reviewed commits have been landed. Closing PR #9730 and removing active labels. |
fa5a06a
fcd1be1
π wincairoπ§ͺ ios-wk2π§ͺ api-macπ§ͺ gtk-wk2π§ͺ api-iosπ§ͺ api-gtkπ§ͺ mac-AS-debug-wk2