Bug 1940412 - Add batch removal information to nsIMutationObserver::ContentWillBeRemoved, and use it in some trivial-ish places. r=dom-core,credential-management-reviewers,sefeng

The idea is to use it on the style (via PresShell->RestyleManager) to do
invalidation faster in cases like bug 1940405.

Differential Revision: https://phabricator.services.mozilla.com/D233547
This commit is contained in:
Emilio Cobos Álvarez
2025-01-15 20:39:40 +00:00
parent 62a863ad59
commit 3c1b64acfe
54 changed files with 183 additions and 110 deletions

View File

@@ -4622,7 +4622,7 @@ MOZ_CAN_RUN_SCRIPT_BOUNDARY void PresShell::ContentInserted(
}
MOZ_CAN_RUN_SCRIPT_BOUNDARY void PresShell::ContentWillBeRemoved(
nsIContent* aChild) {
nsIContent* aChild, const BatchRemovalState*) {
MOZ_ASSERT(!nsContentUtils::IsSafeToRunScript());
MOZ_ASSERT(!mIsDocumentGone, "Unexpected ContentRemoved");
MOZ_ASSERT(aChild->OwnerDoc() == mDocument, "Unexpected document");