Use `MediaControlKeysEventHandler` to handle the control keys event, which can always find corresponding controlled media if there are some.
Differential Revision: https://phabricator.services.mozilla.com/D57575
--HG--
extra : moz-landing-system : lando
Introduce `ControlledMediaState` to media controller, so now we can now how many controlled media are playing, which allow us to update `mIsPlaying` correctly.
Differential Revision: https://phabricator.services.mozilla.com/D57574
--HG--
extra : moz-landing-system : lando
Modify IPC method to support notify `ControlledMediaState` to the media controller, and remove the previous implementation.
Differential Revision: https://phabricator.services.mozilla.com/D57572
--HG--
extra : moz-landing-system : lando
We create `MediaControlEventListener` to register itself to the `MediaControlAgent` that is an event source, so that we can receive the media control event from the evnet source and operate media according to different types of event.
`MediaControlEventListener` is also used to notify controlled media state to the media controller. When media first starts playing, or leaves bfcache and has created listener before, we would notify `eStarted`. Notify `eStopped` when media destroys, or enter bfcache and has created listener before. When media's playing state changes, we would notifty `ePlayed` or `ePaused` depeding on media's `mPaused`.
Differential Revision: https://phabricator.services.mozilla.com/D57571
--HG--
extra : moz-landing-system : lando
Implement class `ContentMediaController` that is used to dispatch media controls key events to those media which would like to be controlled.
`ContentMediaController` is inherited from two classes, `MediaControlAgent` and `MediaControlKeysEventHandler`. The former one is used for controlled media, the controlled media can register itself to `MediaControlAgent` to receive events and do corresponding operations depending on the event type. The latter one is used to handle events sent from chrome process and dispatch them to the corresponding controlled media.
Differential Revision: https://phabricator.services.mozilla.com/D57570
--HG--
extra : moz-landing-system : lando
This patch adds the following functionality to the CSSStyleSheet WebIDL API
under the feature flag layout.css.constructable-stylesheets.enabled:
- constructor()
- replace()
- replaceSync()
constructor(), replace() and replaceSync() are currently stubs that lack full
functionality.
Differential Revision: https://phabricator.services.mozilla.com/D58326
--HG--
extra : source : 6e675d6399cee28f204b3501de3475ea3febd12c
This patch adds the following functionality to the CSSStyleSheet WebIDL API
under the feature flag layout.css.constructable-stylesheets.enabled:
- constructor()
- replace()
- replaceSync()
constructor(), replace() and replaceSync() are currently stubs that lack full
functionality.
Differential Revision: https://phabricator.services.mozilla.com/D58326
--HG--
extra : moz-landing-system : lando
On macOS 10.12.1+, we use `MediaPlayer` library, which has better media key integration, to replace the implementation of `CG EventLoop`.
Differential Revision: https://phabricator.services.mozilla.com/D46890
--HG--
extra : moz-landing-system : lando
This is an optimization to avoid getting the preference value for each http load when COOP is enabled, because that needs to check secure context state for all loads.
Depends on D57579
Differential Revision: https://phabricator.services.mozilla.com/D57580
--HG--
extra : moz-landing-system : lando
Changes:
- use separate directory for testing of telemetry
- use separate zip packages
- test entire histogram snapshots (not just particular key)
- a test doesn't need to do own cleanup anymore
- general cleanup
Differential Revision: https://phabricator.services.mozilla.com/D58382
--HG--
rename : dom/quota/test/unit/head.js => dom/quota/test/unit/head-shared.js
rename : dom/quota/test/unit/test_qm_first_initialization_attempt.js => dom/quota/test/unit/telemetry/test_qm_first_initialization_attempt.js
rename : dom/quota/test/unit/version2_0upgrade_profile.zip => dom/quota/test/unit/telemetry/version1_0_profile.zip
rename : dom/quota/test/unit/version2_1upgrade_profile.zip => dom/quota/test/unit/telemetry/version2_0_profile.zip
rename : dom/quota/test/unit/version2_2upgrade_profile.zip => dom/quota/test/unit/telemetry/version2_1_profile.zip
extra : moz-landing-system : lando
The sample we got from demuxer are all guaranteed to be valid because they are returned in a `SamplesHolder`, which has assertion to make sure all samples appended are valid [1].
`ProcessFrame()` might be a possible place where we incorrectly change sample from valid to invalid, because we modify sample's time and duration there. Therefore, adding an assertion to make sure all samples are still valid.
[1] https://searchfox.org/mozilla-central/source/dom/media/MediaDataDemuxer.h#103-106
Differential Revision: https://phabricator.services.mozilla.com/D58393
--HG--
extra : moz-landing-system : lando
All usage of `synthesizeDragStart()` is, starting drag, cancel `dragstart`,
and finally compares `dataTransfer` items and given expected data. So,
we can make the users use `synthesizePlainDragAndDrop()` instead. It's
better API because it computes position of mouse operations at runtime and
checks whether the drag start was succeeded with optional logging feature
(i.e., it's easier to debug of intermittent failures).
This patch creates `synthesizePlainDragAndCancel()` for convenience. It
handles `dragstart` instead of the callers.
Differential Revision: https://phabricator.services.mozilla.com/D58214
--HG--
extra : moz-landing-system : lando
Most tests which use these APIs don't want to distinguish difference of
linebreaks (i.e., CRLF vs. CR vs. LF). And also most tests don't want to
check prefix and postfix of HTML data in clipboard on Windows.
Therefore, this patch makes them compare clipboard data with expected string
smarter. Every linebreak in clipboard data are treated as LF. Expected
HTML data is wrapped with `<html>`, `<body>` and comment nodes only on
Windows at comparing with clipboard data.
Differential Revision: https://phabricator.services.mozilla.com/D57963
--HG--
extra : moz-landing-system : lando
We have no plan to use those functions, so remove them in order to keep code clean.
Differential Revision: https://phabricator.services.mozilla.com/D58172
--HG--
extra : moz-landing-system : lando
When a function returning a pointer, returning a raw pointer is enough. The callers should use `RefPtr` to store this pointer explicitly if they do need to add a refcounting.
In addition, using `RefPtr` in the parameter cannot prevent anything as well.
Differential Revision: https://phabricator.services.mozilla.com/D58171
--HG--
extra : moz-landing-system : lando
We have no plan to use those functions, so remove them in order to keep code clean.
Differential Revision: https://phabricator.services.mozilla.com/D58172
--HG--
extra : moz-landing-system : lando
When a function returning a pointer, returning a raw pointer is enough. The callers should use `RefPtr` to store this pointer explicitly if they do need to add a refcounting.
In addition, using `RefPtr` in the parameter cannot prevent anything as well.
Differential Revision: https://phabricator.services.mozilla.com/D58171
--HG--
extra : moz-landing-system : lando
This matches other browsers.
Keep the restriction just to chrome nodes, and in that case, avoid getting into
the broken state, which is what causes the issue. I'm not sure if this even
matters anymore given e10s but...
Differential Revision: https://phabricator.services.mozilla.com/D57475
--HG--
extra : moz-landing-system : lando
We then convert that to `#aarrggbb` in GeckoView for convenient use
with `android.graphics.Color`.
Differential Revision: https://phabricator.services.mozilla.com/D57689
--HG--
extra : moz-landing-system : lando
`synthesizePlainDragAndDrop()` synthesizes drag events with `DataTransfer`
object which is set to `DragEvent.dataTransfer` of `dragstart` after starting
drag session explicitly. However, this causes
`EventStateManager::DoDefaltDragStart()` does not initialize `nsIDragService`
instance. Therefore, synthesized drag events cannot work with editor because
`DragEvent::GetMozSourceNode()` returns `nullptr` due to
`nsIDragSession::GetSourceNode()` returning `nullptr`.
On the other hand, synthesized drag events cannot use
`nsIDragService::InvodeDragSession()` normally because of hitting an assertion.
https://searchfox.org/mozilla-central/rev/690e903ef689a4eca335b96bd903580394864a1c/widget/nsBaseDragService.cpp#230-233
This patch does:
- mark drag events caused by synthesized mouse events as "synthesized for tests"
- make `synthesizePlainDragAndDrop()` stop using
`nsIDragService.startDragSession()`
- make `nsBaseDragService` initialize and start session even for synthesized
`dragstart` event
- make `synthesizePlainDragAndDrop()` stop synthesizing drag events with
`DataTransfer` object since it's normal behavior and it'll be initialized
with `nsIDragService::GetDataTransfer()`
- make `nsBaseDragService` store `effectAllowed` for the session only when
it's synthesized session because it's required at initializing synthesized
default `dropEffect` value of `dragenter`, `dragover`, `dragexit` and `drop`
events' `dataTransfer`
- make all tests which use `nsIDragService.startDragSession()` use new
API, `nsIDragService.startDragSessionForTests()` to initialize session's
`effectAllowed` value
- make `EventStateManager::PostHandleEvent()` set drag end point of the test
session to `eDrop` event's screen point
- make `synthesizePlainDragAndDrop()` set drag end point of the session if
it does not synthesize `drop` event because following `endDragSession()`
use it at dispatching `dragend` event on the source element
Additionally, this adds `dumpFunc` new param to `synthesizePlainDragAndDrop()`
because it's really useful to investigate the reason why requesting DnD isn't
performed as expected.
Differential Revision: https://phabricator.services.mozilla.com/D57425
--HG--
extra : moz-landing-system : lando
Remove the security.sandbox.gmp.mac.earlyinit pref now that GMP early sandbox init is the default on release.
Remove the old unused code paths for initializing the GMP sandbox later during process startup (only used when security.sandbox.gmp.mac.earlyinit=false).
Differential Revision: https://phabricator.services.mozilla.com/D54968
--HG--
extra : moz-landing-system : lando
Remove the security.sandbox.rdd.mac.earlyinit pref now that RDD early sandbox init is the default on release.
Remove the old unused code paths for initializing the RDD sandbox later during process startup (only used when security.sandbox.rdd.mac.earlyinit=false).
Differential Revision: https://phabricator.services.mozilla.com/D54967
--HG--
extra : moz-landing-system : lando