gecko-dev/dom/interfaces
alwu f6f59cedd1 Bug 1625615 - part0 : create and set the flag `suspendMediaWhenInactive` on docShell. r=baku,farre
Implemecurnt a flag `suspendMediaWhenInactive` on the docShell that indicates media in that shell should be suspended when the shell is inactive. Currently, only GeckoView is using this flag.

---

The reason of implementing this flag is because in bug1577890 we remove the old way to suspend/resume the media, and I thought setting docshell to inactive is enough to suspend the media because we already have a mechanism which would suspend/resume media when document becomes inactive/active [1].

However, the active state of document is actually different from what I thought it was. Setting docshell to inactive won't change the document's active state, because that indicates if the document is the current active document for the docshell [2] (docshell can have multiple documents), instead of indicating if the docshell is active or not.

Therefore, we have to add another flag to indicate if the docshell wants to suspend its media when it's inactive, in order to use current mechanism to suspend/resume media.

[1] https://searchfox.org/mozilla-central/rev/4d2a9d5dc8f0e65807ee66e2b04c64596c643b7a/dom/html/HTMLMediaElement.cpp#6453
[2] https://searchfox.org/mozilla-central/rev/4d2a9d5dc8f0e65807ee66e2b04c64596c643b7a/dom/base/Document.h#2627-2633

Differential Revision: https://phabricator.services.mozilla.com/D69669
2020-04-20 21:19:56 +00:00
..
base Bug 1625615 - part0 : create and set the flag `suspendMediaWhenInactive` on docShell. r=baku,farre 2020-04-20 21:19:56 +00:00
events
geolocation Bug 1575144 - Update Geolocation implementation to match latest spec r=baku,marcosc 2019-11-06 12:35:42 +00:00
html
notification
payments
push
security Bug 1627963: Remove requestContext from CSP shouldload and replace with fission friendly primitives. r=mattwoodrow 2020-04-10 10:56:57 +00:00
sidebar
storage Bug 1558420 - Part 1: Add an API for creating a sessionstorage manager and a cache object; r=baku 2019-11-12 15:40:02 +00:00
xul Bug 1626539 - Remove the dlgType property from XUL buttons. r=bgrins 2020-04-01 15:08:08 +00:00