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

@@ -2185,7 +2185,8 @@ void HTMLMediaElement::AddSizeOfExcludingThis(nsWindowSizes& aSizes,
}
}
void HTMLMediaElement::ContentWillBeRemoved(nsIContent* aChild) {
void HTMLMediaElement::ContentWillBeRemoved(nsIContent* aChild,
const BatchRemovalState*) {
if (aChild == mSourcePointer) {
mSourcePointer = aChild->GetPreviousSibling();
}