Bug 1931301 - Notify of removals on a stable state, not mid-remove. r=smaug,masayuki,dshin

This simplifies some observers, and makes others a bit more subtle, but I think
over-all it is an improvement.

Differential Revision: https://phabricator.services.mozilla.com/D229008
This commit is contained in:
Emilio Cobos Álvarez
2024-11-26 09:39:52 +00:00
parent da26186211
commit 539611ead9
68 changed files with 415 additions and 665 deletions

View File

@@ -2179,10 +2179,9 @@ void HTMLMediaElement::AddSizeOfExcludingThis(nsWindowSizes& aSizes,
}
}
void HTMLMediaElement::ContentRemoved(nsIContent* aChild,
nsIContent* aPreviousSibling) {
void HTMLMediaElement::ContentWillBeRemoved(nsIContent* aChild) {
if (aChild == mSourcePointer) {
mSourcePointer = aPreviousSibling;
mSourcePointer = aChild->GetPreviousSibling();
}
}