The way we compute the flatten tree ancestors and offsets for serializing seems wrong, https://searchfox.org/firefox-main/rev/b67c6262ecbe7d4c9385a1bd335fd7dd1d3f887d/dom/serializers/nsDocumentEncoder.cpp#1415-1420. The way we compute the flatten tree ancestors and offsets for serializing seems wrong, https://searchfox.org/firefox-main/rev/b67c6262ecbe7d4c9385a1bd335fd7dd1d3f887d/dom/serializers/nsDocumentEncoder.cpp#1415-1420.
Bug 1994763 Comment 2 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
This is an issue of serializing a shadow DOM selection, <details> use the shadow tree, https://searchfox.org/firefox-main/rev/b67c6262ecbe7d4c9385a1bd335fd7dd1d3f887d/dom/html/HTMLDetailsElement.cpp#94. The way we compute the flatten tree ancestors and offsets for serializing seems wrong, https://searchfox.org/firefox-main/rev/b67c6262ecbe7d4c9385a1bd335fd7dd1d3f887d/dom/serializers/nsDocumentEncoder.cpp#1415-1420.
<details> use the shadow tree, https://searchfox.org/firefox-main/rev/b67c6262ecbe7d4c9385a1bd335fd7dd1d3f887d/dom/html/HTMLDetailsElement.cpp#94, this is an issue of serializing a shadow DOM selection. The way we compute the flatten tree ancestors and offsets for serializing seems wrong, https://searchfox.org/firefox-main/rev/b67c6262ecbe7d4c9385a1bd335fd7dd1d3f887d/dom/serializers/nsDocumentEncoder.cpp#1415-1420.