Get all the statistics in one call, under the same mutex, and extract from them the decoded and total frames. The individual getters were previously used, created uncertainty since they lock the mutex separately.
Differential Revision: https://phabricator.services.mozilla.com/D75096
For now, only test_listOrigins.js, test_originWithCaret.js and test_simpledb.js
can run in a child process because they don't need to set preferences or access
files in the profile directory.
We will be able to run more tests in a child process once we have SpecialPowers
for xpcshell implemented using JSProcessActors and when we expose the base
directory used by QuotaManager through a new QuotaManagerService method (to
avoid getting the profile directory using nsIDirectoryService because that
doesn't work in a child process).
Differential Revision: https://phabricator.services.mozilla.com/D75281
Per https://html.spec.whatwg.org/#selector-read-write:
> The :read-write pseudo-class must match any element falling into one
> of the following categories [...]:
>
> * input elements to which the readonly attribute applies, and that
> are mutable (i.e. that do not have the readonly attribute
> specified and that are not disabled)
>
> * textarea elements that do not have a readonly attribute, and
> that are not disabled.
>
> * elements that are editing hosts or editable and are neither
> input elements nor textarea elements.
This fixes the `:disabled` bits.
This matches Safari behavior and the spec, but not Chrome, which has our
behavior.
Fix the WPT, which had multiple issues, as :read-only is defined to be
just the opposite of :read-write. This will pass as soon as I unprefix
the pseudo-class.
Differential Revision: https://phabricator.services.mozilla.com/D75230
Allows RemoteWorkerChild to clean up its data appropriately - objects
that must be released on the worker thread should never outlive the worker
thread, and the StrongWorkerRef/WorkerControlRunnable helps guarantee that.
Differential Revision: https://phabricator.services.mozilla.com/D72798
In RFP mode, canvas image extraction leads to an all-white image, replace that
with a random (sample 32 bytes of randomness and fill the buffer with that)
'poison pill'. This helps defeat naive fingerprinters by producing a random
image on every try. This feature is toggled using a new, default on, pref
`privacy.resistFingerprinting.randomDataOnCanvasExtract`.
Updated `browser_canvas_fingerprinting_resistance.js` to test this new feature
as well.
Updates and replaces D66308.
Differential Revision: https://phabricator.services.mozilla.com/D72716
Bug 1594572 attempted to fix a shutdown edge-case where a worker that was
started late enough would fail to create a PBackground connection and
early return. This early return, however, left the worker never scheduled
for deletion, resulting in a shutdown hang. See my restating block at
https://phabricator.services.mozilla.com/D73134#2224963 for more context.
The problem with this was that the attempt to clear the main event queue
ran afoul of pre/post event-processing hooks intended to ensure that control
runnables are processed if some non-worker code goes and spins a nested
event loop on the worker thread. But because we never got around to
creating a cycle collected JS runtime on the thread, the call to get it
would return null and when we tried to get the recursion depth of a null
pointer, we would crash a little.
This patch addresses the immediate regression by adding a helper that returns
a depth of 1 in this edge-case. It also fixes another problem with the fix
that is now more obvious having reviewed bug 1636147... we were failing to
mark the status of the worker as dead and drain any control runnables, which
could have resulted in the CrashIfHangingRunnable usage not working out right.
(Note that CrashIfHangingRunnable does handle Cancel() correctly, so the
fact that we end up canceling the runnable shouldn't break things.)
Differential Revision: https://phabricator.services.mozilla.com/D75185
The location wasn't used from the caller of
`GetTableCellLocationFromRange`.
However, `GetTableCellLocationFromRange`
included flushing frames, this is now done in
`HTMLEditor::CellIndexes::Update`.
Differential Revision: https://phabricator.services.mozilla.com/D75098
This patch will do :
- remove audible check from the logic of registering controller
- include audio channel affect on the media element's audible state
The advantage of doing so :
- it can help to reduce the intermittent failure during testing by earlier hooking media elements in the content process to the media controller in the chrome process
More details :
In D72497, we have added the audible check to postpone the activation of the media controller, which would ensure that we only control media after it become audible. Therefore, we can remove the previous implementation which we use to achieve that in media element.
When having that audible check in media element, it would postpone the timing of adding media element to `ContentMediaController` that causes some intermitent failures when I was writing test for bug1633565. When removing those checks, we can ensure that the media element would have always been added into `ContentMediaController` after calling `video.play()`. If the element haven't been added into `ContentMediaController`, then it would miss to handle the media key events when test generates a fake media key event, which causes an intermitent failure.
Differential Revision: https://phabricator.services.mozilla.com/D73335
This patch will do :
- add test cases
- introduce the test-only notification `media-displayed-metadata-changed` when the event source updates its metadata
The advantage of doing so :
- increase test coverage
Differential Revision: https://phabricator.services.mozilla.com/D72501
This patch will do :
- play media from different frame, rather than alway playing media from the main frame
The advantage of doing so :
- to make the media session in child frame become the active media session because that can only be the context with the audio focus
Differential Revision: https://phabricator.services.mozilla.com/D72500
This patch will do :
- remove out-of-date test that uses the previous implementation of determining the active media session
The advantage of doing so :
- prevent the failure causing by out-of-date test
Differential Revision: https://phabricator.services.mozilla.com/D72499
This patch will do :
- listen to the playback change from the event source directly
The advantage of doing so :
- more close to the real situation because the event source is where we decide the information that should be displayed the virtual control interface
Differential Revision: https://phabricator.services.mozilla.com/D72498
This patch will do :
- postpone the timing of activating the media controller. Activate the controller after it first time becomes audible.
The advantage of doing so :
- prevent setting incorrect media metadata before the controller becomes audible
---
More details about this change :
The active media session would be chose after the context owns the audio focus. Therefore, if we would like to get the correct metadata from the media session, we should postpone the timimg of activate controller and wait until we decide the active media session then we can get the correct metadata.
Differential Revision: https://phabricator.services.mozilla.com/D72497
This patch will do :
- using the audio focus to decide which media session is the active media session. That is a recommend way of the spec [1].
The advantage of doing so :
- prevent to routing media control keys to incorrect media session
- prevent showing the incorrect metadata on the virtual control interface
[1] https://w3c.github.io/mediasession/#active-media-session
Differential Revision: https://phabricator.services.mozilla.com/D72496
This patch will do :
- introduce a concept `audio focus` among different contexts within a tab
- determine the audio focus owner when the context becomes audible or the owner destroys
The advantage of doing so :
- the audio focus helps us to decide the active media session that would be implemented in the following part
More details:
When there are serveral contexts playing at the same time within a tab, we would like to determine an audible context from them to represent the tab, and that is the `audio focus` we mean in this bug.
Differential Revision: https://phabricator.services.mozilla.com/D72495
This looks like it was necessary a long time ago, but now just runs the same calls as the calling code, so unnecessarily splits the logic into two.
Differential Revision: https://phabricator.services.mozilla.com/D75020
WebXR has a lot of short living objects. The ProbablyShortLivingWrapper should help a bit to improve the GC performance of those objects.
Differential Revision: https://phabricator.services.mozilla.com/D74423