Initially this was going to be a simple cleanup: Remove some useless namespaces
here and there and so on, remove `using` statements from the header and so on.
But unfortunately, DOMIntersectionObserver.h (which is included in Element.h,
unnecessarily) ended up exposing `Element` unnamespaced to a lot of code, so I
had to fix that.
Differential Revision: https://phabricator.services.mozilla.com/D55316
--HG--
extra : moz-landing-system : lando
MessagePort::Dispatch(), for example, uses NS_DispatchToCurrentThread(), which
assumes nsThread.
Differential Revision: https://phabricator.services.mozilla.com/D53128
--HG--
extra : moz-landing-system : lando
This patch centralizes the checking for discarded browsing contexts
for the media IPC messages. It also adds a check that the top BC is
not discarded, which seems to be causing crashes. A BC can be
non-discarded when its parent is discarded because discarding a BC
tree is not atomic.
This changes the BC we log the id of, but hopefully that is okay.
The patch also fixes the 'Browing' typo in the method name.
Differential Revision: https://phabricator.services.mozilla.com/D54635
--HG--
extra : moz-landing-system : lando
The coming updated libsoundtouch will use ST_THROW_RT_ERROR in several
places built without setting ST_NO_EXCEPTION_HANDLING.
ST_NO_EXCEPTION_HANDLING is only set in libsoundtouch/src/moz.build. To
avoid using `throw`, we should `#define` ST_NO_EXCEPTION_HANDLING before
`#include` soundtouch headers.
Differential Revision: https://phabricator.services.mozilla.com/D52932
--HG--
extra : moz-landing-system : lando
According to the nit in patch2, rearrange included files by their alphabet order.
Differential Revision: https://phabricator.services.mozilla.com/D53883
--HG--
extra : moz-landing-system : lando
If we enabled the request asking on GV, then we would have a different way to check if the media is allowed to play or not.
Differential Revision: https://phabricator.services.mozilla.com/D52794
--HG--
extra : moz-landing-system : lando
If we don't enable blocking web audio, then we have no need to check other conditions, so we should check that earlier.
Differential Revision: https://phabricator.services.mozilla.com/D53878
--HG--
extra : moz-landing-system : lando
Move helper functions out from `AutoplayPolicy`, makes us clearly know which one could really be used to determine the blocking autoplay result. It also give other classes an ability to use those helper functions if they have a need.
Differential Revision: https://phabricator.services.mozilla.com/D52432
--HG--
extra : moz-landing-system : lando
`media.geckoview.autoplay.request` is used to control whether we send the play request.
`media.geckoview.autoplay.request.testing` is used to control the request result in testing.
Differential Revision: https://phabricator.services.mozilla.com/D52605
--HG--
extra : moz-landing-system : lando
`GVAutoplayPermissionRequestor` provides a method to request autoplay permission for a page, which would be used to decide if media is allowed to autoplay or not on GeckoView.
Differential Revision: https://phabricator.services.mozilla.com/D52434
--HG--
extra : moz-landing-system : lando
If the page has already had same type pending request, then we don't want to send another request. If the page has already got the response from the request, we also don't want to send another request again.
In order to achieve that, we decide to store the request's staus on the top-browsing context to make sure that all media elements in the same browsing context tree can share the same status. Thereforw, we could avoid sending redudant request when there is a pending request, and reuse the previous request's result.
Differential Revision: https://phabricator.services.mozilla.com/D52431
--HG--
extra : moz-landing-system : lando
As we added new files, which affects the build bundle created by unified build. Therefore, add missing scope definition and included header to pass the build.
Differential Revision: https://phabricator.services.mozilla.com/D52430
--HG--
extra : moz-landing-system : lando
Implement `GVAutoplayPermissionRequest`, that is used to provide an ability for GeckoView (GV) to allow its embedder (application) to decide whether the autoplay media should be allowed or denied on the page.
We have two types of request, one for audible media, another one for inaudible media. Each page would at most have one request per type at a time, and the result of request would be effective on that page until the page gets reloaded or closed.
Differential Revision: https://phabricator.services.mozilla.com/D52428
--HG--
extra : moz-landing-system : lando
According to the nit in patch2, rearrange included files by their alphabet order.
Differential Revision: https://phabricator.services.mozilla.com/D53883
--HG--
extra : moz-landing-system : lando
If we enabled the request asking on GV, then we would have a different way to check if the media is allowed to play or not.
Differential Revision: https://phabricator.services.mozilla.com/D52794
--HG--
extra : moz-landing-system : lando
If we don't enable blocking web audio, then we have no need to check other conditions, so we should check that earlier.
Differential Revision: https://phabricator.services.mozilla.com/D53878
--HG--
extra : moz-landing-system : lando
Move helper functions out from `AutoplayPolicy`, makes us clearly know which one could really be used to determine the blocking autoplay result. It also give other classes an ability to use those helper functions if they have a need.
Differential Revision: https://phabricator.services.mozilla.com/D52432
--HG--
extra : moz-landing-system : lando
`media.geckoview.autoplay.request` is used to control whether we send the play request.
`media.geckoview.autoplay.request.testing` is used to control the request result in testing.
Differential Revision: https://phabricator.services.mozilla.com/D52605
--HG--
extra : moz-landing-system : lando
`GVAutoplayPermissionRequestor` provides a method to request autoplay permission for a page, which would be used to decide if media is allowed to autoplay or not on GeckoView.
Differential Revision: https://phabricator.services.mozilla.com/D52434
--HG--
extra : moz-landing-system : lando
If the page has already had same type pending request, then we don't want to send another request. If the page has already got the response from the request, we also don't want to send another request again.
In order to achieve that, we decide to store the request's staus on the top-browsing context to make sure that all media elements in the same browsing context tree can share the same status. Thereforw, we could avoid sending redudant request when there is a pending request, and reuse the previous request's result.
Differential Revision: https://phabricator.services.mozilla.com/D52431
--HG--
extra : moz-landing-system : lando
As we added new files, which affects the build bundle created by unified build. Therefore, add missing scope definition and included header to pass the build.
Differential Revision: https://phabricator.services.mozilla.com/D52430
--HG--
extra : moz-landing-system : lando
Implement `GVAutoplayPermissionRequest`, that is used to provide an ability for GeckoView (GV) to allow its embedder (application) to decide whether the autoplay media should be allowed or denied on the page.
We have two types of request, one for audible media, another one for inaudible media. Each page would at most have one request per type at a time, and the result of request would be effective on that page until the page gets reloaded or closed.
Differential Revision: https://phabricator.services.mozilla.com/D52428
--HG--
extra : moz-landing-system : lando
This patch does the following:
- Makes cloneElementVisually() return a promise
- Plumbs an event from the MediaDecoderStateMachine's VideoSink to
HTMLVideoElement
- Hooks the event up to resolve the promise from cloneElementVisually()
- Updates tests and their expectations.
Differential Revision: https://phabricator.services.mozilla.com/D53831
--HG--
extra : moz-landing-system : lando
This better follows how MediaDecoder and MediaDecoderStateMachine was
architected.
Differential Revision: https://phabricator.services.mozilla.com/D53710
--HG--
extra : moz-landing-system : lando
This is similar to [[current frame]] in Web Audio, but is in GraphTime,
not AudioContext-specific time.
Depends on D54083
Differential Revision: https://phabricator.services.mozilla.com/D54084
--HG--
extra : moz-landing-system : lando