Backed out changeset d1343d311328 (bug 1962381) for causing build bustages @ Document.h CLOSED TREE

This commit is contained in:
Alexandru Marc
2025-04-28 15:23:11 +03:00
parent 0e467518b7
commit 05265244cb
8 changed files with 114 additions and 86 deletions

View File

@@ -983,6 +983,11 @@ void PresShell::Init(nsPresContext* aPresContext, nsViewManager* aViewManager) {
}
#endif
if (mDocument->HasAnimationController()) {
SMILAnimationController* animCtrl = mDocument->GetAnimationController();
animCtrl->NotifyRefreshDriverCreated(GetPresContext()->RefreshDriver());
}
for (DocumentTimeline* timelines : mDocument->Timelines()) {
timelines->UpdateLastRefreshDriverTime();
}
@@ -1308,6 +1313,8 @@ void PresShell::Destroy() {
mViewManager = nullptr;
}
nsRefreshDriver* rd = GetPresContext()->RefreshDriver();
// This shell must be removed from the document before the frame
// hierarchy is torn down to avoid finding deleted frames through
// this presshell while the frames are being torn down
@@ -1315,6 +1322,10 @@ void PresShell::Destroy() {
NS_ASSERTION(mDocument->GetPresShell() == this, "Wrong shell?");
mDocument->ClearServoRestyleRoot();
mDocument->DeletePresShell();
if (mDocument->HasAnimationController()) {
mDocument->GetAnimationController()->NotifyRefreshDriverDestroying(rd);
}
}
if (mPresContext) {