Bug 1962381 - Sample SMIL animations along with CSS animations. r=longsonr,smaug
In order to do this and keep tests passing, we need to also recurse into external resource docs during the refresh driver tick. Otherwise, we fail dom/smil/test/test_smilExtDoc.xhtml. This used to work because the SMIL controller registered with the refresh driver directly, and resource docs share the refresh driver with the parent doc. I think it makes sense to treat them more like subdocuments, and it also matches svg-as-image better. This fixes some known SMIL bugs, too, yay. Differential Revision: https://phabricator.services.mozilla.com/D246588
This commit is contained in:
@@ -983,11 +983,6 @@ 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();
|
||||
}
|
||||
@@ -1313,8 +1308,6 @@ 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
|
||||
@@ -1322,10 +1315,6 @@ 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