Bug 1914321 - Build view transition pseudo-element tree. r=view-transitions-reviewers,boris

Reuse the editor's manual NAC machinery for now, and hook it into
StyleChildrenIterator and co.

We might need to slightly tweak the setup for selector-matching, not
sure yet, but that should be fine.

Differential Revision: https://phabricator.services.mozilla.com/D228255
This commit is contained in:
Emilio Cobos Álvarez
2024-11-13 22:11:58 +00:00
parent 0eb900dcfb
commit f475361154
8 changed files with 182 additions and 52 deletions

View File

@@ -4620,8 +4620,7 @@ MOZ_CAN_RUN_SCRIPT_BOUNDARY void PresShell::ContentRemoved(
// frame reconstruction.
nsIContent* oldNextSibling = nullptr;
// Editor calls into here with NAC via HTMLEditor::DeleteRefToAnonymousNode.
// This could be asserted if that caller is fixed.
// Editor and view transitions code call into here with NAC.
if (MOZ_LIKELY(!aChild->IsRootOfNativeAnonymousSubtree())) {
oldNextSibling = aPreviousSibling ? aPreviousSibling->GetNextSibling()
: container->GetFirstChild();