Bug 1727514 - media playback should stop in the bfcache, r=peterv
SetContainer handling is similar to what DocumentViewer does for the old bfcache implementation. (The old implementation hides it quite well). The changes to HTMLMediaElement are needed to ensure page can enter bfcache. Removed erroneous MOZ_ASSERT in nsPresContext, it is ok to trigger that code path in the new implementation. And the Run() method of the relevant nsIRunnable already deals with that case. Differential Revision: https://phabricator.services.mozilla.com/D124684
This commit is contained in:
@@ -1161,6 +1161,7 @@ void nsDocShell::FirePageHideShowNonRecursive(bool aShow) {
|
||||
mFiredUnloadEvent = false;
|
||||
RefPtr<Document> doc = contentViewer->GetDocument();
|
||||
if (doc) {
|
||||
doc->SetContainer(this);
|
||||
RefPtr<nsGlobalWindowInner> inner =
|
||||
mScriptGlobal ? mScriptGlobal->GetCurrentInnerWindowInternal()
|
||||
: nullptr;
|
||||
|
||||
Reference in New Issue
Block a user