Backed out changeset d1343d311328 (bug 1962381) for causing build bustages @ Document.h CLOSED TREE
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user