Граф коммитов

98266 Коммитов

Автор SHA1 Сообщение Дата
Chris Peterson 4415bec7a4 Bug 1681242 - Remove obsolete CGEvent workaround needed for macOS versions < 10.10.2. r=haik,spohl
This workaround is no longer needed because Firefox >= 79 requires macOS >= 10.12.

Differential Revision: https://phabricator.services.mozilla.com/D99019
2020-12-09 19:31:23 +00:00
Bryce Seager van Dyk 3c358eec6e Bug 1675360 - Shutdown MediaKeys when parent inner window is destroyed rather than document. r=karlt
Rework the MediaKeys class to shutdown when its parent inner window is destroyed
rather than the document it's created in. This is done to mitigate the case
where a MediaKeys is created in an about:blank document that has not yet
undergone its async load (i.e. blank document that will stay blank, blank
documents loading to other pages will still clobber their keys on load). This
specifically addresses cases where sites could create an iframe, not wait for
load, create a MediaKeys in the iframe, and then find the keys had become
unusable.

This is achieved by associating MediaKeys instances with their inner window and
having the window notify keys when a window is going to be destroyed. I decided
to use this approach rather than have MediaKeys observe for window destruction
for a few reasons:
- The keys would need to support weak references to use the observer service in
  the desired way. Implementing this interface on the MediaKeys adds a
  non-trivial level of complexity and means the keys would implement the WeakPtr
  interface (already in place prior to this patch) and also the NS weak
  reference interface, which I found confusing.
- If the inner window stores pointers to MediaKeys created in it, it can be self
  aware of if EME activity is taking place within it. The allows us to better
  identify EME activity in documents. Historically one of the ways we'd
  determined EME activity by checking if media elements have MediaKeys attached,
  but this had lead to issues where if MediaKeys are created but not attached
  to a media element we overlook them. With this patch's changes, we can also
  have a document check its inner window to see if there are any MediaKeys. This
  patch uses this to extend our check to avoid bfcaching pages with EME content.
- There appears to be prior art using a similar approach for audio contexts and
  peer connections, which I assume is sensible and I'm not reinventing the wheel
  by following.

Differential Revision: https://phabricator.services.mozilla.com/D98641
2020-12-10 01:03:27 +00:00
Bryce Seager van Dyk 8ce34cc674 Bug 1675360 - Have MediaKeys::Init search for load info on the parent if the current doc doesn't have any. r=karlt
If MediaKeys::Init is called before an about:blank doc has performed its async
load, then that document will not have a channel and thus will not have a load
info. This means we cannot look up the top level principal on such a document.

Since we need the top level principal to ensure GMPs are appropriately isolated
from one another, this patch checks the document above the current doc for a
channel and load info in the case the current document does not have one. Since
an about:blank document is considered in the same origin as its parent, this
should be suitable. This process is done recursively to handle edge cases.

Differential Revision: https://phabricator.services.mozilla.com/D97322
2020-12-09 23:55:34 +00:00
Bryce Seager van Dyk 95bee43f32 Bug 1675360 - Add test coverage for createMediaKeys in iframes. r=karlt
Provide coverage that ensures we can:
- Call navigator.requestMediaKeySystemAccess() and receive access
- Call createMediaKeys on the access object
in iframes that are same and different origin.

This should work when waiting for an iframe to fire the load event, but I also
provide a case for if we do not wait for load. It's undesirable to not wait for
the load, but we've historically worked in this case (if this was intentional is
not clear to me). So providing such a test allows for coverage of this case as
long as we want to continue supporting it. Said test will be red as of this
patch, but an immediate follow up will restore our compat with this case.

Differential Revision: https://phabricator.services.mozilla.com/D97321
2020-12-09 23:55:28 +00:00
Jan Varga 67036b4b0f Bug 1665088 - QM: Extend LogError to report failures in telemetry. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D93759
2020-12-09 20:01:07 +00:00
Mihai Alexandru Michis 783558e615 Backed out changeset 547a95c0bb90 (bug 1666214) for causing talos failures.
CLOSED TREE
2020-12-09 22:08:57 +02:00
Andreas Farre 50115c2697 Bug 1682141 - Stop searching for top window if there is no top window. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D99661
2020-12-14 13:16:04 +00:00
Butkovits Atila e490a7f6ed Backed out changeset 084279c12a76 (bug 1675207) for build bustage complaining about rules.mk. CLOSED TREE 2020-12-14 15:42:52 +02:00
Emilio Cobos Álvarez e5e7d5aa3a Bug 1682159 - Do a minor cleanup of the Element clone code. r=edgar
Depends on D99632

Differential Revision: https://phabricator.services.mozilla.com/D99633
2020-12-14 12:47:04 +00:00
Emilio Cobos Álvarez b68e90741f Bug 1682159 - Copy defined state to static clones. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D99632
2020-12-14 12:48:23 +00:00
Mark Banner 3a198bf760 Bug 1680325 - Remove references to jshint from dom and layout. r=nika
Depends on D98519

Differential Revision: https://phabricator.services.mozilla.com/D98520
2020-12-02 19:39:29 +00:00
Joel Maher f4cb07df76 Bug 1681215 - skip u2f/fido tests that are not relevant on 1903. r=keeler
skip u2f/fido tests that are not relevant on 1903

Differential Revision: https://phabricator.services.mozilla.com/D98992
2020-12-09 18:03:46 +00:00
Mihai Alexandru Michis 0f41ae6c2d Backed out changeset 0d86551ac93b (bug 1665088) for causing multiple failures in dom quota.
CLOSED TREE
2020-12-09 20:19:24 +02:00
Jan Varga 70c1159f82 Bug 1665088 - QM: Extend LogError to report failures in telemetry. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D93759
2020-12-09 17:39:50 +00:00
Simon Giesecke 71e2bbe153 Bug 1680469 - Remove partial std::hash specializations. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D98604
2020-12-09 16:47:13 +00:00
Simon Giesecke c82e44aabc Bug 1678030 - Add DatabaseConnection::BorrowAndExecuteSingleStepStatement function. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D97465
2020-12-09 13:03:52 +00:00
Simon Giesecke 3023d51cea Bug 1678030 - Introduce LazyStatement::BorrowAndExecuteSingleStep function. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D97464
2020-12-09 13:03:44 +00:00
Simon Giesecke 450b013593 Bug 1666214 - Move shutdown timeout handling to QuotaManager. r=dom-workers-and-storage-reviewers,janv
Instead of having a separate timer for each quota client, we can use a single
timer in the QuotaManager for handling timeouts of all quota clients. The
original shutdown timeout of the quota manager itself can now be removed,
as AbortOperations is already called through InitiateShutdownWorkThreads on
each quota client.

This also moves MaybeRecordShutdownStep to the QuotaManager, which allows
easier access through the singleton instance returned by QuotaManager::GetRef.

Differential Revision: https://phabricator.services.mozilla.com/D98073
2020-12-09 13:03:36 +00:00
Simon Giesecke e06a2d56fc Bug 1680269 - Fix build when building without MOZ_GECKO_PROFILER. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D99063
2020-12-09 08:58:06 +00:00
Jan Varga fe7c71a9e0 Bug 1680031 - Abort operations for given directory lock ids; r=dom-workers-and-storage-reviewers,sg
This patch changes the way how we abort operations when clearing of data is
requested. Instead of aborting all operations for given origin, we now abort
all operations for given directory locks which are blocking clearing of data.

Differential Revision: https://phabricator.services.mozilla.com/D98609
2020-12-09 08:13:44 +00:00
Csoregi Natalia 652218e11d Backed out 2 changesets (bug 1679735) for failures on getdisplaymedia-user-activation-consumed.https.html. CLOSED TREE
Backed out changeset 1fcd9c941737 (bug 1679735)
Backed out changeset 5e17b1112257 (bug 1679735)
2020-12-09 09:44:11 +02:00
Makoto Kato bbb3785586 Bug 1678844 - Don't call SetInputContext on keyboard event. r=masayuki
This is another regression by bug 1658948 and Windows only.

When user script calls element.focus() during keyboard event, our TSF client
implementation commits composition string.

It is unnecessary to call SetInputContext when real keybaord event is fired.

Because,

- If keybaord event is fired, virtual keybaord is already shown
- We don't open virtual keyboard when physical keyboard is available on Android

So I shouldn't call SetInputContext on user interaction by keyboard.

Differential Revision: https://phabricator.services.mozilla.com/D98882
2020-12-09 07:02:19 +00:00
Barret Rennie 9ff7f42366 Bug 1677000 - Address unpublished clang-tidy lints r=Gijs
There are two new lints introduced since IOUtils was written that we're hitting
now:

* IOUtils::InternalFileInfo's constructor does not initialize `mType`, `mSize`,
  `mLastModified`, and `mPermissions`; and
* We should be using a nested namespace statement.

We haven't hit them since these lines haven't been touched, but I noticed them
on the code review frontend.

Differential Revision: https://phabricator.services.mozilla.com/D99163
2020-12-09 05:48:51 +00:00
Barret Rennie 3d4c77c1f2 Bug 1677000 - Remove unused IOUtils::WriteSync(PRFileDesc* ...) declaration r=Gijs
The implementation was removed in a previous change (bug 1665172) but the
declaration stuck around.

Differential Revision: https://phabricator.services.mozilla.com/D99152
2020-12-09 05:48:48 +00:00
Barret Rennie e2fce2bed4 Bug 1677000 - Rename IOUtils.writeAtomic{,UTF8} to IOUtils.write{,UTF8} r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D99001
2020-12-09 05:48:46 +00:00
Barret Rennie 72492145e6 Bug 1677000 - Add a type alias for MozPromise<T, IOError, true> r=Gijs
To use this type alias, IOUtils::InvokeToIOPromise had to become either a
member fn or a friend.

Differential Revision: https://phabricator.services.mozilla.com/D99000
2020-12-09 05:48:44 +00:00
Barret Rennie 45f4571694 Bug 1677000 - Refactor ResolveJSPromise out of RunOnBackgroundThread r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D98999
2020-12-09 05:48:41 +00:00
Barret Rennie 9046e56316 Bug 1677000 - Pass Promise* to RejectJSPromise instead of RefPtr<Promise>& r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D98998
2020-12-09 05:47:31 +00:00
Barret Rennie d2531c0b18 Bug 1677000 - Remove IsAbsolutePath() from IOUtils.h r=Gijs
The implementation was removed in bug 1676942.

Differential Revision: https://phabricator.services.mozilla.com/D98997
2020-12-09 05:47:24 +00:00
Karl Tomlinson 7a9d51be77 Bug 1679735 require recent user gesture for getDisplayMedia() r=jib
Previous behavior was to allow requests if the user has ever interacted with
the window.  This patch changes from sticky activation to transient
activation.

WindowContext is used rather than Document for the
HasValidTransientUserGestureActivation() test because user activation is a
property of the Window/global.

The error reported when WindowContext is null is the same as that for missing
transient activation, which is keeping the existing behavior.
https://searchfox.org/mozilla-central/rev/66547980e8e8ca583473c74f207cae5bac1ed541/dom/base/Document.cpp#15806
i.e. a missing WindowContext is still treated as missing transient activation.

Depends on D98274

Differential Revision: https://phabricator.services.mozilla.com/D98275
2020-12-08 21:45:44 +00:00
Razvan Maries 9614a08d73 Backed out 7 changesets (bug 1677000) for perma failures on test_ioutils_read_write.html. CLOSED TREE
Backed out changeset 3521334cfc38 (bug 1677000)
Backed out changeset 737f380c2cf2 (bug 1677000)
Backed out changeset 9dba15fdfe1f (bug 1677000)
Backed out changeset b2fa1a061b15 (bug 1677000)
Backed out changeset a5d7845d3c0c (bug 1677000)
Backed out changeset 8e6081b0c07d (bug 1677000)
Backed out changeset 6592577cf0fa (bug 1677000)
2020-12-09 07:34:21 +02:00
Barret Rennie 10834d52a9 Bug 1677000 - Address unpublished clang-tidy lints r=Gijs
There are two new lints introduced since IOUtils was written that we're hitting
now:

* IOUtils::InternalFileInfo's constructor does not initialize `mType`, `mSize`,
  `mLastModified`, and `mPermissions`; and
* We should be using a nested namespace statement.

We haven't hit them since these lines haven't been touched, but I noticed them
on the code review frontend.

Differential Revision: https://phabricator.services.mozilla.com/D99163
2020-12-09 04:31:55 +00:00
Barret Rennie 8b5f75f647 Bug 1677000 - Remove unused IOUtils::WriteSync(PRFileDesc* ...) declaration r=Gijs
The implementation was removed in a previous change (bug 1665172) but the
declaration stuck around.

Differential Revision: https://phabricator.services.mozilla.com/D99152
2020-12-09 04:31:47 +00:00
Barret Rennie 0dc367a38f Bug 1677000 - Rename IOUtils.writeAtomic{,UTF8} to IOUtils.write{,UTF8} r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D99001
2020-12-09 04:31:40 +00:00
Barret Rennie c50f24f067 Bug 1677000 - Add a type alias for MozPromise<T, IOError, true> r=Gijs
To use this type alias, IOUtils::InvokeToIOPromise had to become either a
member fn or a friend.

Differential Revision: https://phabricator.services.mozilla.com/D99000
2020-12-09 04:31:01 +00:00
Barret Rennie 3aa75d55bb Bug 1677000 - Refactor ResolveJSPromise out of RunOnBackgroundThread r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D98999
2020-12-09 04:30:54 +00:00
Barret Rennie 5f9b9ebb3e Bug 1677000 - Pass Promise* to RejectJSPromise instead of RefPtr<Promise>& r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D98998
2020-12-09 04:30:46 +00:00
Barret Rennie 052ed397fa Bug 1677000 - Remove IsAbsolutePath() from IOUtils.h r=Gijs
The implementation was removed in bug 1676942.

Differential Revision: https://phabricator.services.mozilla.com/D98997
2020-12-09 04:30:39 +00:00
Andrew McCreight b5a782a3f1 Bug 1539948, part 1 - Implement mocked socket transport in C++. r=nika,necko-reviewers
The DOM presentation tests require an implementation of
nsISocketTransport that doesn't actually implement anything,
for some reason.

Re-implementing that in C++ allows me to make nsISocketTransport
builtinclass.

Differential Revision: https://phabricator.services.mozilla.com/D98861
2020-12-09 02:40:13 +00:00
Andrew McCreight 2bff6d8c82 Bug 1680389 - Only call SetMultiprocessMode once in the main process. r=pbone
This was being called every time we created a ContentParent, which meant
that we'd get races with non-main-thread logging in the parent
process. This patch fixes it by only calling it once during process
startup.

The original goal was to avoid making logging noisier with process
information when e10s was not enabled, but given that e10s is the default
now, that is no longer relevant.

Differential Revision: https://phabricator.services.mozilla.com/D98935
2020-12-09 00:48:51 +00:00
Razvan Maries 35ccea0325 Backed out 3 changesets (bug 1539948) for build bustages on nsISocketTransport.h. CLOSED TREE
Backed out changeset 81bed88d0adf (bug 1539948)
Backed out changeset 8bf24bdf431f (bug 1539948)
Backed out changeset ef4e49b3701d (bug 1539948)
2020-12-09 02:47:52 +02:00
Andrew McCreight a072fd3486 Bug 1539948, part 1 - Implement mocked socket transport in C++. r=nika,necko-reviewers
The DOM presentation tests require an implementation of
nsISocketTransport that doesn't actually implement anything,
for some reason.

Re-implementing that in C++ allows me to make nsISocketTransport
builtinclass.

Differential Revision: https://phabricator.services.mozilla.com/D98861
2020-12-08 21:18:58 +00:00
Razvan Maries 4b5dec5070 Backed out changeset 0c3bb21d00d4 (bug 1675857) for multiple wpt perma failures at HTMLDialogElement. CLOSED TREE 2020-12-09 01:25:42 +02:00
Sean Feng 335e125bcb Bug 1675857 - Update <dialog> internal styles for spec alignment r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D99146
2020-12-08 22:29:44 +00:00
Kagami Sascha Rosylight 5a089f37d3 Bug 1680596 - Part 1: Hide <menuitem> behind a flag r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D98684
2020-12-08 05:36:27 +00:00
Chris Martin 46c9b248e1 Bug 1680955 - Update FallbackGamepad to use new GamepadHandle type r=handyman
Starting with one of my earlier patches in Bug 1657404, FreeBSD started seeing
an error,

```
ld.lld: error: undefined hidden symbol:
  mozilla::dom::SetGamepadLightIndicatorColor
```

We don't build this codepath as part of our regular Firefox testing, and so I
didn't see the issue.

Luckily, Jan Beich <jbeich@FreeBSD.org> noticed the issue and offered up this
patch. They unfortunately can't be given credit because they are protesting
our requirement for 2FA in Phabricator.

Differential Revision: https://phabricator.services.mozilla.com/D98973
2020-12-08 17:27:04 +00:00
Simon Giesecke 22bdbd13f8 Bug 1678030 - Introduce LazyStatement class. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D97463
2020-12-08 18:00:08 +00:00
Simon Giesecke b2d834a030 Bug 1680724 - Use ToMaybeRef or SafeRefPtr::maybeDeref where possible. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D98784
2020-12-08 17:49:30 +00:00
Martin Stransky 4f499c0c54 Bug 1660336 Build ffvpx FFmpegVideoDecoder module with VAAPI support, r=jya,glandium,jgilbert
- Remove MOZ_WAYLAND_CFLAGS and /ipc/chromium/chromium-config.mozbuild from ffmpeg58/moz.build
- Build ffvpx with vaapi support at ffvpx/moz.build
- Move gfx related headers from DMABUFSurfaceImage.h to DMABUFSurfaceImage.cpp and implement
  the gfx methods there.
- Remove GL headers from DMABufSurface.h and forward declare GLuint/GLContext there.
- Move mutex/MessageLoop/task related headers from nsWaylandDisplay.h to nsWaylandDisplay.cpp.
- Move mozva.cpp to mozva.c due to linking issues

Depends on D90556

Differential Revision: https://phabricator.services.mozilla.com/D90557
2020-12-08 15:26:09 +00:00
Martin Stransky 2ebeaa8e32 Bug 1660336 Implement FFmpegLibWrapper::LinkVAAPILibs() to link VAAPI libraries and use at at FFmpegRuntimeLinker/FFVPXRuntimeLinker, r=jya
Depends on D90555

Differential Revision: https://phabricator.services.mozilla.com/D90556
2020-12-08 15:26:02 +00:00
Martin Stransky 51599b42c4 Bug 1660336 Implement DMABufSurfaceWrapper and VAAPIDisplayHolder as templates, r=jya
Implemented DMABufSurfaceWrapper and VAAPIDisplayHolder as a versioned class templates
as they are going to be used by both system ffmpeg and bundled ffvpx decoders.

Depends on D90554

Differential Revision: https://phabricator.services.mozilla.com/D90555
2020-12-08 15:26:19 +00:00
Simon Giesecke f21fb24f3f Bug 1666214 - Don't crash if the shutdown already completed when the shutdown timeout event is processed. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D99066
2020-12-08 13:00:12 +00:00
Butkovits Atila c405a6ab26 Backed out changeset 29bbd5887d66 (bug 1680951) for failure on browser_blockingCookies.js. CLOSED TREE 2020-12-08 14:46:48 +02:00
Emilio Cobos Álvarez 4fd5d13610 Bug 1680721 - Grant a single iframe without user interaction to top windows. r=smaug,johannh
Only for top windows because for nested iframes they could get around
this without being noticed by reloading themselves which is not great.

Differential Revision: https://phabricator.services.mozilla.com/D98775
2020-12-08 10:15:18 +00:00
Kagami Sascha Rosylight f7757cbe10 Bug 1680951 - Do not scroll when calling select() r=masayuki
This is intended to be a hotfix for the URL bar regression. Ideally there should be a spec or this behavior should be removed completely.

Previously select() scrolled back to the start position before the regression, but this fix does not restore that behavior.

Differential Revision: https://phabricator.services.mozilla.com/D98972
2020-12-08 07:52:07 +00:00
Henri Sivonen 48ac14fba8 Bug 1663853 - Assume that different-origin iframes are focusable even in the in-process case. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98044
2020-12-07 16:38:17 +00:00
Henri Sivonen e0bd11a140 Bug 1660805 - In OOP iframes, run window raising to completion synchronously to ensure correct order of focus and mouseup when focusing an OOP iframe by click. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97553
2020-12-07 16:29:16 +00:00
Andreas Pehrson 6a217d23a6 Bug 1489160 - Check mCloseCalled instead of mAudioContextState when checking for a closed AudioContext. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D98316
2020-12-07 20:48:50 +00:00
Andreas Pehrson 321d0d9ea2 Bug 1489160 - Add crashtest. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D98315
2020-12-07 20:48:35 +00:00
Butkovits Atila 5d023187bb Backed out 2 changesets (bug 1679084, bug 1677948) for failures on rtp-payloadtypes.html. CLOSED TREE
Backed out changeset a8fd99eecdcd (bug 1677948)
Backed out changeset dc0ed46b7d16 (bug 1679084)
2020-12-08 09:12:33 +02:00
Jean-Yves Avenard 771993d760 Bug 1672087 - P2. Recreate remote decoder when parent dies. r=mattwoodrow,bryce
The RDD process startup being asynchronous make the operation trivial. Unlike with the GPU process, we can immediately tell the MediaFormatDecoder that a new decoder is needed when the RDD died.

Recovery will immediately occur with little visible interruption.

Differential Revision: https://phabricator.services.mozilla.com/D98571
2020-12-08 06:42:51 +00:00
Jean-Yves Avenard 9cf6c54ce4 Bug 1672087 - P1. Remove unused value. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D98570
2020-12-04 00:59:04 +00:00
Nico Grunbaum f49d1f1a7b Bug 1679084 - fix default H264 channels in RTPMAP;r=drno
Differential Revision: https://phabricator.services.mozilla.com/D97898
2020-11-24 03:17:33 +00:00
Jean-Yves Avenard 94e076388b Bug 1679283 - P2. Always store the init segment just appended. r=bryce,alwu
different init segment may yield the same AudioInfo object; so we can't rely on the AudioInfo value to determine if we should use the new init segment or not.

Depends on D98874

Differential Revision: https://phabricator.services.mozilla.com/D98875
2020-12-08 01:36:02 +00:00
Jean-Yves Avenard 453d2dadcc Bug 1679283 - P1. Add test. r=bryce,alwu
Differential Revision: https://phabricator.services.mozilla.com/D98874
2020-12-08 01:40:19 +00:00
Bogdan Tara 17450d98a6 Backed out 2 changesets (bug 1679283) for segment related bustage CLOSED TREE
DONTBUILD
Backed out changeset f4f27247a27c (bug 1679283)
Backed out changeset 489d44c5eb47 (bug 1679283)
2020-12-08 03:31:46 +02:00
Jean-Yves Avenard 31a7ba7269 Bug 1679283 - P2. Always store the init segment just appended. r=bryce,alwu
different init segment may yield the same AudioInfo object; so we can't rely on the AudioInfo value to determine if we should use the new init segment or not.

Depends on D98874

Differential Revision: https://phabricator.services.mozilla.com/D98875
2020-12-08 01:14:59 +00:00
Jean-Yves Avenard fcd9bc6cd7 Bug 1679283 - P1. Add test. r=bryce,alwu
Differential Revision: https://phabricator.services.mozilla.com/D98874
2020-12-08 01:19:47 +00:00
Dan Minor 0b1722fcb7 Bug 1635561 - Use RegionalPrefLocales rather than AppLocale in xpc_LocalizeRuntime; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D98390
2020-12-07 19:27:36 +00:00
Cosmin Sabou 48ced6860f Backed out 2 changesets (bug 1680596) for xpcshell and mochitest plain failures. CLOSED TREE
Backed out changeset a5fce6a4b5b9 (bug 1680596)
Backed out changeset 8ea7d760b4a8 (bug 1680596)
2020-12-07 22:02:46 +02:00
Cosmin Sabou 27e4755fb2 Bug 1680596 - Move the pref at the begining of the manifest. a=trivial-fix CLOSED TREE 2020-12-07 21:25:33 +02:00
Jeff Gilbert b25e9ba943 Bug 1681147 - Don't IPC_FAIL for context creation failure. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D98835
2020-12-07 19:00:12 +00:00
Bogdan Tara ade4d82c59 Backed out changeset 98c3e6255c58 (bug 1597600) for browser_installssl.js failures CLOSED TREE 2020-12-07 21:01:50 +02:00
Jeff Gilbert 77070731a2 Bug 1680595 - Point users towards "webgl.disable-fail-if-major-performance-caveat" if failIfMajorPerformanceCaveat: true causes failure. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D98824
2020-12-07 05:35:57 +00:00
Christoph Kerschbaumer 01b80dad31 Bug 1680768: Remove unused argument aPrincipal within closeAlert() in nsIAlertsService.idl r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98776
2020-12-07 17:44:34 +00:00
R. Martinho Fernandes c99fe51d2d Bug 1597600 - make certificate overrides depend on origin attributes r=keeler,geckoview-reviewers,smaug,agi
Differential Revision: https://phabricator.services.mozilla.com/D91962
2020-12-07 17:10:52 +00:00
Kagami Sascha Rosylight 5b5178d70c Bug 1680596 - Hide <menuitem> behind a flag r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D98684
2020-12-07 17:03:27 +00:00
Geoff Brown bebfc32efd Bug 1643448 - Add ACCESS_WIFI_STATE permission and disable failing tests in dom/presentation; r=geckoview-reviewers,bc,agi
Add the permission to the geckoview manifest, as previously attempted. Also disable failing tests
to enable a green test run. Add permission to adb.py grants list for good measure.

Differential Revision: https://phabricator.services.mozilla.com/D98809
2020-12-07 16:09:06 +00:00
Edgar Chen fddfd41f71 Bug 1659940 - Use mLastOverElement to notify the mouse leaving for an iframe; r=smaug
mLastOverFrame is a WeakFrame, it could possibly be nulled-out, for example
after restyling, and the sub-document won't be able to be notified the mouse
leaving.

Differential Revision: https://phabricator.services.mozilla.com/D98787
2020-12-07 14:51:23 +00:00
Simon Giesecke a95d13467c Bug 1666214 - Perform shutdown of all quota clients in parallel. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D96082
2020-12-07 14:49:36 +00:00
Simon Giesecke c368d437ee Bug 1680269 - Fix includes for ScriptLoadHandler. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D98492
2020-12-07 14:21:35 +00:00
Simon Giesecke 8c2c2388e6 Bug 1679273 - Fix bustage when building without MOZ_GECKO_PROFILER. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D97966
2020-12-07 14:21:28 +00:00
Simon Giesecke 1c53236b70 Bug 1679272 - Include ScopeExit.h exactly where used. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98888
2020-12-07 14:25:59 +00:00
Sylvestre Ledru bbb5f8a339 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D98301
2020-12-07 10:17:57 +00:00
Makoto Kato 37eea06fae Bug 1660932 - Don't use element bounding for ZoomToFocusedInput when focused element isn't single line control. r=botond
When show virtual keyboard, we calls ZoomToFocusedInput to scroll to focused
element. But this method only consider single line control. It means that this
doesn't scroll better position when focused element is multiple such as
content editable. Because we use element rectangle foo zoom to rect.

So I would like to change this for <textarea> and contenteditable.

If <textarea> or contenteditable, we should use caret frame to scroll to
better position.

Differential Revision: https://phabricator.services.mozilla.com/D96374
2020-12-07 05:05:48 +00:00
Bogdan Tara 007e18402d Backed out changeset 18c139fe8859 (bug 1675894) for selectionchange.tentative.html failures CLOSED TREE 2020-12-05 14:45:37 +02:00
Kagami Sascha Rosylight a8b38a9593 Bug 1680548 - Cache the max length in TextControlState::SelectionProperties r=masayuki
GetValue() is not a cheap operation, and this allows to skip it in SetSelectionRange.

Differential Revision: https://phabricator.services.mozilla.com/D98659
2020-12-05 09:34:59 +00:00
Razvan Maries a970215194 Bug 1678060 - Disabled test_getUserMedia_basicTabshare.html on Windows 10. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D98701
2020-12-04 00:30:12 +00:00
Bogdan Tara a32cbcf59f Backed out changeset b9fa2c214287 (bug 1680548) for multiple mochitest failures 2020-12-05 10:52:56 +02:00
Kagami Sascha Rosylight 5cae826a74 Bug 1680798 - Assign forward selection in Select() before bug 1541454 r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D98823
2020-12-05 07:47:50 +00:00
Kagami Sascha Rosylight 0ee9083699 Bug 1675894 - Fire selectionchange from disconnected text controls r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D98810
2020-12-05 07:50:41 +00:00
Kagami Sascha Rosylight 551f1c01d0 Bug 1680548 - Cache the max length in TextControlState::SelectionProperties r=masayuki
GetValue() is not a cheap operation, and this allows to skip it in SetSelectionRange.

Differential Revision: https://phabricator.services.mozilla.com/D98659
2020-12-05 07:34:41 +00:00
Mihai Alexandru Michis dbc93934c8 Backed out changeset 651187869807 (bug 1680548) for causing valgrid bustages in nsTextControlFrame. 2020-12-05 03:15:59 +02:00
Kagami Sascha Rosylight 4379c3417b Bug 1680548 - Cache the max length in TextControlState::SelectionProperties r=masayuki
GetValue() is not a cheap operation, and this allows to skip it in SetSelectionRange.

Differential Revision: https://phabricator.services.mozilla.com/D98659
2020-12-04 22:19:33 +00:00
Andrew Sutherland 175070c565 Bug 1674278 - Improve BodyConsumer worker shutdown. r=ytausky,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D97108
2020-12-04 17:49:46 +00:00
Dale Harvey bea62c168a Bug 1663501 - Use geolocation monitor for region updates r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D91214
2020-12-04 17:46:03 +00:00
Steve Fink 515d10f4bb Bug 1678416 - Remove a couple of calls to TimeStamp::Now() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90900
2020-12-04 16:03:13 +00:00
Steve Fink bd6330b7a4 Bug 1678416 - Merge ICCRunner and CCRunner into a single CCRunner r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90633
2020-12-04 16:03:07 +00:00
Steve Fink 630f77d442 Bug 1678416 - Move more state to CCGCScheduler r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97692
2020-12-04 16:02:59 +00:00
Steve Fink 68bc625380 Bug 1678416 - Implement IdleTaskRunner::SetBudget() and add some comments. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97670
2020-12-04 16:02:52 +00:00
Simon Giesecke 50e7efd650 Bug 1680760 - Allow SafeRefPtr construction to derive template argument type from a CheckedUnsafePtr. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D98769
2020-12-04 15:16:12 +00:00
Simon Giesecke 0acc527c9e Bug 1678030 - Generalize CreateAndExecuteSingleStepStatement to accept an optional bind functor. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D97462
2020-12-04 15:15:31 +00:00
Simon Giesecke 1ff0e248eb Bug 1678030 - Support multiple variants of hasResult expectations in CreateAndExecuteSingleStepStatement. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D97461
2020-12-04 15:10:07 +00:00
Simon Giesecke e6b749fc81 Bug 1678030 - Move CreateAndExecuteSingleStepStatement to QuotaCommon and use in all quota clients. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D97460
2020-12-04 14:56:18 +00:00
Emilio Cobos Álvarez 2e9947a755 Bug 1680566 - Reformat sanitizer API test. r=freddyb
Just remove a bunch of indentation and use 2-spaces like the usual Gecko / JS
style.

Remove unneeded setBoolPref (pushPrefEnv takes care of that).

Differential Revision: https://phabricator.services.mozilla.com/D98676
2020-12-04 11:52:17 +00:00
Butkovits Atila 6772473e85 Backed out 4 changesets (bug 1660336) for causing build bustage on libmozavcodec.so. CLOSED TREE
Backed out changeset 13936ff79b4c (bug 1660336)
Backed out changeset 7315e7b327f7 (bug 1660336)
Backed out changeset b6ca98c5a3cc (bug 1660336)
Backed out changeset fb8fee4471de (bug 1660336)
2020-12-04 12:40:28 +02:00
Martin Stransky ae3e1f1aac Bug 1660336 Build ffvpx FFmpegVideoDecoder module with VAAPI support, r=jya,glandium,jgilbert
- Remove MOZ_WAYLAND_CFLAGS and /ipc/chromium/chromium-config.mozbuild from ffmpeg58/moz.build
- Build ffvpx with vaapi support at ffvpx/moz.build
- Move gfx related headers from DMABUFSurfaceImage.h to DMABUFSurfaceImage.cpp and implement
  the gfx methods there.
- Remove GL headers from DMABufSurface.h and forward declare GLuint/GLContext there.
- Move mutex/MessageLoop/task related headers from nsWaylandDisplay.h to nsWaylandDisplay.cpp.

Depends on D90556

Differential Revision: https://phabricator.services.mozilla.com/D90557
2020-12-04 09:41:46 +00:00
Martin Stransky ece6b57b31 Bug 1660336 Implement FFmpegLibWrapper::LinkVAAPILibs() to link VAAPI libraries and use at at FFmpegRuntimeLinker/FFVPXRuntimeLinker, r=jya
Depends on D90555

Differential Revision: https://phabricator.services.mozilla.com/D90556
2020-12-04 09:41:31 +00:00
Martin Stransky 46886a9bae Bug 1660336 Implement DMABufSurfaceWrapper and VAAPIDisplayHolder as templates, r=jya
Implemented DMABufSurfaceWrapper and VAAPIDisplayHolder as a versioned class templates
as they are going to be used by both system ffmpeg and bundled ffvpx decoders.

Depends on D90554

Differential Revision: https://phabricator.services.mozilla.com/D90555
2020-12-04 09:41:54 +00:00
Butkovits Atila df75ae580c Backed out changeset 8c0e2919f6b2 (bug 1678684) for causing Bug 1680661. CLOSED TREE 2020-12-04 11:26:44 +02:00
yulia 02bcdf5bde Bug 1519100 - Use pref to completely pref-off top-level await in the browser; r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D97184
2020-12-04 08:54:10 +00:00
yulia 0d160e1e0d Bug 1519100 - Implement module promises in html r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D95885
2020-12-04 08:54:03 +00:00
yulia 21b5f80d1d Bug 1519100 - Add flag for experimental Top Level Await feature; r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D97180
2020-12-04 08:52:29 +00:00
Barret Rennie 72dbca0048 Bug 1680449 - Clean up after test_setPermissions on Windows r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D98672
2020-12-03 23:58:39 +00:00
alwu 532535f040 Bug 1634489 - part3 : update ID3 link to ID3v2.4. r=jya
We've been using `footer` which is an attribute from v2.4, so we should keep the link up to date as well.

Differential Revision: https://phabricator.services.mozilla.com/D98653
2020-12-04 01:53:31 +00:00
alwu 3b7cdfa5d4 Bug 1634489 - part2 : add test. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D98652
2020-12-04 01:53:33 +00:00
alwu 28ab67bbfa Bug 1634489 - part1 : allow ID3 parser to parse multiple ID3 headers and store the latest one. r=jya
Most of time, mp3 file should only have one or none ID3v2 header, but sometime we can see a file incorrectly containing multiple ID3v2 headers where the second one is following by the first one.

Therefore, in this situation, we should keep parsing following ID3v2 header, even if we've parsed one, and report multiple headers size together in order to skip correct offset for finding the correct first frame.

Differential Revision: https://phabricator.services.mozilla.com/D98651
2020-12-04 01:51:35 +00:00
Razvan Maries 016881a724 Backed out 5 changesets (bug 1678416) for build bustages on CCGCScheduler.h. CLOSED TREE
Backed out changeset cc5f7ecb3922 (bug 1678416)
Backed out changeset 61d9f960b80e (bug 1678416)
Backed out changeset 882f7ebe33fe (bug 1678416)
Backed out changeset e845a32a60bd (bug 1678416)
Backed out changeset 85f35f5749a0 (bug 1678416)
2020-12-04 04:55:39 +02:00
Steve Fink 4ce6b7b08c Bug 1678416 - Remove a couple of calls to TimeStamp::Now() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90900
2020-12-04 02:40:22 +00:00
Steve Fink 8f26e5c1b2 Bug 1678416 - Merge ICCRunner and CCRunner into a single CCRunner r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D90633
2020-12-04 02:40:14 +00:00
Steve Fink 393195efb8 Bug 1678416 - Move more state to CCGCScheduler r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97692
2020-12-04 02:40:13 +00:00
Matt Woodrow d58b85c3c9 Bug 1678684 - Initialize DXVA on the media thread, remove the mostly-unused dll blocklist, and the crashguard. r=jya
The main-thread requirements for DXVA appear to have been needed when we initialized a crash guard. We now only run DXVA in the GPU and RDD processes, which don't support crash guards. This removes the main thread dispatch and the crashguard code, and enforces that we're in the GPU/RDD process to init DXVA.

This also removes the DLL blocklist code. This was disabled via pref when in the GPU process, which should be the majority of the time. In rare cases we would have been running DXVA in the RDD process (on older win7 when the GPU process isn't available). In these cases we can just do the same as the GPU process, allowing crashes and recovering from them (and disabling DXVA).

Differential Revision: https://phabricator.services.mozilla.com/D98036
2020-12-04 00:49:27 +00:00
Emilio Cobos Álvarez 75be5de2e1 Bug 1666739 - Add an optional opacity threshold for visibility hit-test. r=mconley,miko
This is a best-effort thing of course, but so is the rest of the
visibility threshold stuff in practice and this should be good enough.

Differential Revision: https://phabricator.services.mozilla.com/D98360
2020-12-04 00:48:45 +00:00
Kagami Sascha Rosylight 296459ef20 Bug 1680167 - Part 9: Mark setFocus() as [can_run_script] r=masayuki
Depends on D98631

Differential Revision: https://phabricator.services.mozilla.com/D98632
2020-12-03 22:15:52 +00:00
Kagami Sascha Rosylight cd517fc839 Bug 1680167 - Part 5: MOZ_CAN_RUN_SCRIPT_BOUNDARY in dom/* r=masayuki
Depends on D98627

Differential Revision: https://phabricator.services.mozilla.com/D98628
2020-12-03 21:34:06 +00:00
Kagami Sascha Rosylight 00c44d3b04 Bug 1680167 - Part 4: MOZ_CAN_RUN_SCRIPT in dom/xul r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D98627
2020-12-03 22:08:44 +00:00
Kagami Sascha Rosylight 8ab2900b08 Bug 1680167 - Part 3: MOZ_CAN_RUN_SCRIPT_BOUNDARY in dom/base r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D98626
2020-12-03 22:08:36 +00:00
Kagami Sascha Rosylight 1e9bd44120 Bug 1680167 - Part 2: MOZ_CAN_RUN_SCRIPT in dom/html r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D98625
2020-12-03 22:15:56 +00:00
Karl Tomlinson b0be138f26 Bug 1119956 don't pretend to implement nsICancelableRunnable::Cancel() r=gsvelto,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D98119
2020-12-02 06:32:39 +00:00
Karl Tomlinson 88c7f3ad66 Bug 1119956 derive from DiscardableRunnable instead of CancelableRunnable when Cancel() is not supported r=asuth,sg
Differential Revision: https://phabricator.services.mozilla.com/D98118
2020-12-03 09:04:44 +00:00
Hiroyuki Ikezoe 870c98bec4 Bug 1615151 - Don't set the chrome offset for OOP iframe's browser. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D98557
2020-12-03 10:42:55 +00:00
Razvan Maries fd89df3f6d Backed out changeset 432c83951167 (bug 1662265) for perma failures on test_sync_xhr_event_handling_switch_bcg.html. CLOSED TREE 2020-12-03 23:03:05 +02:00
Kershaw Chang 628b4518df Bug 1667743 - Remove unused esni code r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D98023
2020-12-03 12:17:12 +00:00
Razvan Maries 8cbedc3a4d Backed out 15 changesets (bug 1519100) as per Yulia's request. CLOSED TREE
Backed out changeset 16dc37dadf05 (bug 1519100)
Backed out changeset 019b00c63941 (bug 1519100)
Backed out changeset 1155eecec034 (bug 1519100)
Backed out changeset 53a792431e11 (bug 1519100)
Backed out changeset 55918f941155 (bug 1519100)
Backed out changeset 683743bd0395 (bug 1519100)
Backed out changeset 63d506024693 (bug 1519100)
Backed out changeset 8b5244786634 (bug 1519100)
Backed out changeset 3a0a021acc08 (bug 1519100)
Backed out changeset d5bff6c95feb (bug 1519100)
Backed out changeset bab7e81a6c2c (bug 1519100)
Backed out changeset b521ccd694f8 (bug 1519100)
Backed out changeset 9f559a616909 (bug 1519100)
Backed out changeset 98146209da6f (bug 1519100)
Backed out changeset a3ea6c49dbf7 (bug 1519100)
2020-12-03 20:37:45 +02:00
yulia f710026703 Bug 1519100 - Use pref to completely pref-off top-level await in the browser; r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D97184
2020-12-03 15:26:04 +00:00
yulia 4883191845 Bug 1519100 - Implement module promises in html r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D95885
2020-12-03 15:25:54 +00:00
yulia 517283f821 Bug 1519100 - Add flag for experimental Top Level Await feature; r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D97180
2020-12-03 15:24:22 +00:00
Sean Feng f521450d39 Bug 1662265 - Fix input events handling for sync XHR when both TaskController and e10s are enabled r=smaug
There are two issues in our current setup

1) Input events which are occurring in the same tab are going to be lost
because sync XHR. We have event handling suppression for synx XHR, so input
events are going to be discarded.

2) Input events that are happening in another tab (same process as the
synx XHR tab) are not going to be delayed. This is not correct since
sync XHR should block the Javascript execution.

This patches fixes the above cases for when both TaskController and e10s are
enabled by suspending the InputTaskManager during sync XHR, which
delays the input event handling and keeps the events around.

Differential Revision: https://phabricator.services.mozilla.com/D90780
2020-12-03 03:13:04 +00:00
Tom Tung 80a5716001 Bug 1656768 - Propagate SessionStorage data in BackgroundSessionStorageManager to the new top browsing context while replacing the top context id; r=nika,dom-workers-and-storage-reviewers,asuth
### Story

While the exisiting top browsing context is replaced, SessionStorage relies on
itself been propagated by SessionStore. However, this has been disabled in
SessionHistory in the parent process.

Therefore, we need to propagate SessionStorage data by propagating
BackgroundSessionStorageManager.

### Notes

This patch assumes that the target top-level browsing context shouldn't have
been registered to BackgroundSessionStorageManager. If this can happen, we will
either need to merge SessionStorage data into it or find a proper (earlier)
place to update sManagers.

### Test Plan

Test: D97763
Try: https://treeherder.mozilla.org/jobs?repo=try&revision=2acc7b393fb80b640f4fbe3ade1da7dd440c380e&selectedTaskRun=KK6XhR-sQuqv5lcntVLc2w.0

Differential Revision: https://phabricator.services.mozilla.com/D98082
2020-12-03 14:19:35 +00:00
Tom Tung bc86e6cbe8 Bug 1656768 - Add a test to ensure sessionStorage is propagated from non-cross-origin-isolated to cross-origin-isolated window and vice versa; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97763
2020-11-30 08:56:42 +00:00
Jan Varga e3bd5ca4f2 Bug 1680031 - LSNG: Change InvalidatePrepareDatastoreOpsMatching and InvalidatePreparedDatastoresMatching to free functions; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D98345
2020-12-03 09:22:34 +00:00
Jan Varga 523b9b97de Bug 1680031 - SDB: Change AllowToCloseConnectionsMatching to a free function; r=dom-workers-and-storage-reviewers,sg
Depends on D98345

Differential Revision: https://phabricator.services.mozilla.com/D98566
2020-12-03 09:22:22 +00:00
Jan Varga 5bb23684e2 Bug 1680031 - IDB: Change InvalidateLiveDatabasesMatching to a free function; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D98347
2020-12-03 09:22:14 +00:00
Jan Varga c0397c29f3 Bug 1680031 - LSNG: Various cleanup related to abort operations methods; r=dom-workers-and-storage-reviewers,sg
The cleanup mostly includes:
- changing the suffix of iteration methods from "If" to "Matching"
- changing the argument type of Condition from a raw pointer to a reference
- changing output parameters to return values
- changing iter-based for loops to range-based for loops
- renaming ForceKillDatabases to ForceKillAllDatabases

Differential Revision: https://phabricator.services.mozilla.com/D98346
2020-12-03 12:22:55 +00:00
Jan de Mooij 4dd5ca7fdd Bug 1673553 part 74 - Remove NewSingletonProxyObject. r=iain
Depends on D98505

Differential Revision: https://phabricator.services.mozilla.com/D98506
2020-12-02 20:38:21 +00:00
Jan de Mooij a24d6b0558 Bug 1673553 part 67 - Remove JS_NewObjectWithUniqueType. r=iain
We no longer need this API to create singleton objects. It was used to prevent
polluting type information.

Differential Revision: https://phabricator.services.mozilla.com/D98499
2020-12-03 07:54:00 +00:00
Barret Rennie 1cf888ecaf Bug 1678415 - Support setting file mode in IOUtils.createDirectory on non-Windows platforms r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D97691
2020-12-03 05:38:11 +00:00
Barret Rennie ae7c7ad4a2 Bug 1678471 - Implement IOUtils::Exists r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D97690
2020-12-03 05:38:03 +00:00
Barret Rennie 47793f361c Bug 1673019 - Get and set file permissions in IOUtils r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D97689
2020-12-03 05:37:45 +00:00
Barret Rennie 69d3035e96 Bug 1660843 - Return creation time from IOUtils.stat() on supported platforms r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D96890
2020-12-03 05:37:33 +00:00
Barret Rennie 3ab2f47c1c Bug 1679873 - Pass closures to IOUtils::RunOnBackgroundThread r=nika
Passing in a callable and its arguments to RunOnBackgroundThread was fine
before we started passing in already_AddRefed<nsIFile>. However, if we fail to
get an event target, then we drop all our arguments and in debug builds
already_AddRefed<T> asserts that it was moved out of.

Now we require callers of RunOnBackgroundThread to pass in a closure that
contains all the bindings they require, which has the added bonus of making
lifetimes more explicit. As part of this refactor, all the `ReadSync` etc
methods now take raw nsIFile* pointers since they are called in a scope that
has them refcounted.

Differential Revision: https://phabricator.services.mozilla.com/D98273
2020-12-03 04:10:30 +00:00
Dave Townsend 26af9ac6e2 Bug 1659949: Fix is atom setting for elements within localized elements. r=smaug
When re-creating element prototypes for elements within localized elements we
must set the mIsAtom correctly on the prototype.

Differential Revision: https://phabricator.services.mozilla.com/D97799
2020-12-03 00:53:18 +00:00
Kagami Sascha Rosylight 954d954d28 Bug 1677263 - Add a test for select event being async r=masayuki
The asynchronous behavior is introduced by using SetSelectionRange inside Select(). This adds a test for that.

Differential Revision: https://phabricator.services.mozilla.com/D98186
2020-12-03 02:27:01 +00:00
Kagami Sascha Rosylight aa1ea75c3a Bug 1679460 - Call Get/SetSelectionRange even when cached r=masayuki
No need to special case here as both already use cached selection. This makes it consistent with SetSelectionStart etc.

Differential Revision: https://phabricator.services.mozilla.com/D98185
2020-12-02 19:26:49 +00:00
Kagami Sascha Rosylight a2aec71886 Bug 1679461 - Use SetSelectionRange in Select(), regardless of focus state r=masayuki
SelectAll() also is no-op without a frame, so this replaces it with SetSelectionRange.

Differential Revision: https://phabricator.services.mozilla.com/D98184
2020-12-02 19:27:19 +00:00
Karl Tomlinson fe53cdd395 Bug 1119956 introduce DiscardableRunnable for tasks that might not run but might not implement cancellation r=asuth,sg
Classes that inherit from DiscardableRunnable are only promising that it is OK
for Run() to be skipped, rather than promising that Cancel() is effective.

Differential Revision: https://phabricator.services.mozilla.com/D98117
2020-12-02 09:36:25 +00:00
Jan Varga 690ebc1e14 Bug 1680031 - SDB: Change argument type of Condition in AllowToCloseConnectionsMatching to a reference; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D98431
2020-12-02 16:48:54 +00:00
Jan Varga 6aee31c945 Bug 1680031 - DOMCACHE: Change argument type of Condition in AbortMatching to a reference; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D98430
2020-12-02 16:48:45 +00:00
Jan Varga efa2aff0d0 Bug 1680031 - IDB: Change argument type of Condition in InvalidateLiveDatabasesMatching to a reference; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D98348
2020-12-02 16:48:36 +00:00
Jan Varga ccea28442b Bug 1680031 - Introduce Client::AbortAllOperations; r=dom-workers-and-storage-reviewers,sg
Client::AbortOperations no longer supports the case when an empty origin string
is passed (which was used to abort all operations).

Differential Revision: https://phabricator.services.mozilla.com/D98344
2020-12-02 16:38:07 +00:00
Jan Varga 27b3a276a4 Bug 1680031 - QM: Give ids to all directory locks; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D98343
2020-12-02 16:34:27 +00:00
Bogdan Tara 520f54fb37 Backed out changeset 117da9de7f66 (bug 1667743) for handshakeSucceeded related bustage CLOSED TREE 2020-12-03 03:44:59 +02:00
Akihiko Odaki 5568524e05 Bug 1605305 - Origin header field is not set to HTTP request in cases where it is required, r=ckerschb,necko-reviewers,JuniorHsu,valentin
***

***

Differential Revision: https://phabricator.services.mozilla.com/D80905
2020-12-03 00:56:22 +00:00
Chris Martin 886c2c65a8 Bug 1657404 - Implement a strongly-typed, service-dependent gamepad handle r=handyman,aklotz
Currently, the gamepad code uses a uint32_t as a handle and does some trickery
with it by trying to create a unique ID and adding an offset to it for VR code.

This can (and has) led to errors where the developer forgets to perform the
arithmetic and sends the wrong number to the wrong manager.

This change created a strongly-typed handle that remembers which service it
belongs to. This should eliminate such accidents.

Differential Revision: https://phabricator.services.mozilla.com/D96273
2020-12-02 23:06:05 +00:00
Chris Martin 9191a21a16 Bug 1657404 - Refactor GamepadPlatformService r=handyman
A substantial refactor of GamepadPlatformService:
1. Easier to understand lifetime
2. Correct usage of mutexes to protect shared state
3. Clear separation of "service owner" and "service user"
4. Simplify logic in some places
5. Better variable names

Differential Revision: https://phabricator.services.mozilla.com/D96664
2020-12-02 22:36:35 +00:00
Chris Martin 6ecf1f1858 Bug 1657404 - Gamepad: Make a singleton to hold monitoring observers r=handyman
Currently, the list of monitoring observers is stored in the
GamepadPlatformService. But it's possible for testing to start before an
event channel has been created, or to exist longer. That could result in the
GamepadPlatformManager being created-destroyed multiple times along with
this list.

Probably the simplest thing to do here is just have the list be its own
indepedent entity

Differential Revision: https://phabricator.services.mozilla.com/D96663
2020-12-02 22:32:30 +00:00
Kershaw Chang 14d936a94d Bug 1667743 - Remove unused esni code r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D98023
2020-12-02 23:18:38 +00:00
Emilio Cobos Álvarez a49800a500 Bug 1679706 - Communicate to the front-end whether there are no visible pages at all. r=jfkthame
This will allow them to react however they want to empty page ranges as
a result of another setting change.

Differential Revision: https://phabricator.services.mozilla.com/D98183
2020-12-02 21:48:03 +00:00
Byron Campen [:bwc] 2a7961a0ac Bug 1626278: Make this test-case function dispatch to STS like it is supposed to. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D97173
2020-11-19 19:08:17 +00:00
Byron Campen [:bwc] 7a97aae8de Bug 1626278: Stop requiring additional dispatches to STS for ICE ctx teardown. r=mjf
Also some improvements in discipline wrt bare pointers.

Differential Revision: https://phabricator.services.mozilla.com/D97016
2020-11-19 19:08:30 +00:00
Byron Campen [:bwc] d9e2987cba Bug 1626278: Shutdown MediaTransportHandlerSTS on STS shutdown. Also add some logging. r=mjf,valentin
Differential Revision: https://phabricator.services.mozilla.com/D93655
2020-11-19 18:57:42 +00:00
Byron Campen [:bwc] d16631f547 Bug 1626278: Remove transports from main, just like we do under normal circumstances. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D93262
2020-11-19 19:20:54 +00:00
Byron Campen [:bwc] 7b6da84c38 Bug 1626278: Ensure that pcid is unique. r=mjf
This fixes a failure in browser_WebrtcGlobalInformation.js on windows opt.

Differential Revision: https://phabricator.services.mozilla.com/D93261
2020-11-19 18:57:03 +00:00
Byron Campen [:bwc] 0f1c30e0fa Bug 1626278: Move sigslot stuff to STS, and ensure we disconnect before releasing our ref to the MediaTransportHandler. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D90626
2020-11-19 18:50:25 +00:00
Byron Campen [:bwc] 62f4ec2f1e Bug 1626278: Stash for ICE logs, and move log filtering into a single place. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D89677
2020-11-19 18:51:52 +00:00
Byron Campen [:bwc] 6ca5f94584 Bug 1626278: Filter stats for closed PeerConnections the same way we do for live ones. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D88498
2020-11-19 18:50:10 +00:00
Byron Campen [:bwc] 7adbc30c40 Bug 1626278: Add a stats stash to WebrtcGlobalInformation, to avoid stats from being lost when a content process goes away. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D88497
2020-11-19 18:47:25 +00:00
Byron Campen [:bwc] b755ba26c6 Bug 1626278: Simplify/promisify PWebrtcGlobal. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D88496
2020-11-19 18:48:54 +00:00
Byron Campen [:bwc] 9599563a0c Bug 1626278: Use NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_DESTROY to ensure that MediaTransportHandler stays around long enough to finish pending stats queries. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D87180
2020-11-19 18:44:02 +00:00
Bogdan Tara 225a24f0bc Backed out 3 changesets (bug 1677263, bug 1679460, bug 1679461) for test_focus.xhtml failures CLOSED TREE
Backed out changeset 03db12dabc63 (bug 1677263)
Backed out changeset 75de13448090 (bug 1679460)
Backed out changeset 4f4fd8e7ce93 (bug 1679461)
2020-12-02 21:16:28 +02:00
Bogdan Tara c1b7803fbd Backed out 15 changesets (bug 1519100) for wpt leaks CLOSED TREE
Backed out changeset 7302ebdbaa35 (bug 1519100)
Backed out changeset 5b89081f0f08 (bug 1519100)
Backed out changeset ee02050e3c97 (bug 1519100)
Backed out changeset 47cf4bde107e (bug 1519100)
Backed out changeset bfd96f55a3bd (bug 1519100)
Backed out changeset c9afefd66eb7 (bug 1519100)
Backed out changeset 90b61247d071 (bug 1519100)
Backed out changeset e0250e4cba61 (bug 1519100)
Backed out changeset 5f90543431cb (bug 1519100)
Backed out changeset d7f3440addc7 (bug 1519100)
Backed out changeset 10194540aff0 (bug 1519100)
Backed out changeset 880873b815a4 (bug 1519100)
Backed out changeset d99f0109da7a (bug 1519100)
Backed out changeset c723f6b16b67 (bug 1519100)
Backed out changeset da24af409d92 (bug 1519100)
2020-12-02 21:14:35 +02:00
Kagami Sascha Rosylight 14ef7ee9e2 Bug 1677263 - Add a test for select event being async r=masayuki
The asynchronous behavior is introduced by using SetSelectionRange inside Select(). This adds a test for that.

Differential Revision: https://phabricator.services.mozilla.com/D98186
2020-12-02 01:28:43 +00:00
Kagami Sascha Rosylight 3a7f9322e4 Bug 1679460 - Call Get/SetSelectionRange even when cached r=masayuki
No need to special case here as both already use cached selection. This makes it consistent with SetSelectionStart etc.

Differential Revision: https://phabricator.services.mozilla.com/D98185
2020-12-02 02:21:13 +00:00
Kagami Sascha Rosylight b581a12705 Bug 1679461 - Use SetSelectionRange in Select(), regardless of focus state r=masayuki
SelectAll() also is no-op without a frame, so this replaces it with SetSelectionRange.

Differential Revision: https://phabricator.services.mozilla.com/D98184
2020-12-02 02:16:52 +00:00
yulia 7a2f0f89ab Bug 1519100 - Use pref to completely pref-off top-level await in the browser; r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D97184
2020-12-02 12:40:21 +00:00
yulia 21104289bb Bug 1519100 - Implement module promises in html r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D95885
2020-12-02 12:40:08 +00:00
yulia 521140ab44 Bug 1519100 - Add flag for experimental Top Level Await feature; r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D97180
2020-12-02 12:38:17 +00:00
Edgar Chen 4d02a166ec Bug 1678349 - Part 2: Suppress additional blur/focus event on OOP iframe; r=hsivonen
for the case that framer calls iframe.focus() on OOP iframe and the OOP iframe
already has the focus.

Differential Revision: https://phabricator.services.mozilla.com/D98304
2020-12-02 13:03:58 +00:00
Edgar Chen d48fbe94ab Bug 1678349 - Part 1: Compute focus-in-other-content-process flag in nsFocusManager::Focus; r=hsivonen
This simplify the code a bit and also fix FocusIsOutOfProcess isn't set correctly
for a certain case, e.g. framer calls iframe.focus() on a OOP iframe.

Differential Revision: https://phabricator.services.mozilla.com/D96720
2020-12-02 12:59:59 +00:00
Emilio Cobos Álvarez 7ccf1e693a Bug 1676785 - Fix platform detection in a test.
CLOSED TREE

MANUAL PUSH: orange fixup
2020-12-02 14:24:24 +01:00
Emilio Cobos Álvarez a0c580e9a2 Bug 1676785 - Simplify XUL special code-path for <input> value setter. r=masayuki
This allows us to remove nsISelectionController.selectAll() and related
code too, and should not change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D97011
2020-12-02 12:48:41 +00:00
Mihai Alexandru Michis 89a2d40ee0 Backed out changeset 93cf5f317f98 (bug 1676785) for causing mochitest failures in test_input_value_set_preserve_undo.xhtml
CLOSED TREE
2020-12-02 14:05:18 +02:00
Emilio Cobos Álvarez 2b6c54e6c1 Bug 1676785 - Simplify XUL special code-path for <input> value setter. r=masayuki
This allows us to remove nsISelectionController.selectAll() and related
code too, and should not change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D97011
2020-12-02 10:44:25 +00:00
Masayuki Nakano fcb32b803d Bug 1678553 - part 14: Make `nsQueryContentEventResult` store some results with `Maybe` r=m_kato
Depends on D98264

Differential Revision: https://phabricator.services.mozilla.com/D98265
2020-12-02 07:09:46 +00:00
Robert Mader 5d2847fe7f Bug 1645528 - Code cleanups r=mattwoodrow
Remove dead code that was left in D93173 so file histories would
get preserved.

Depends on D93173

Differential Revision: https://phabricator.services.mozilla.com/D96934
2020-12-02 09:02:45 +00:00
Robert Mader 529f433f65 Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. Do that by transimitting the vsync rate `SendNotify()`.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Depends on D98254

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-12-02 09:47:53 +00:00
Emilio Cobos Álvarez 5f931a6c28 Bug 1680158 - Expose focused content browsing context to chrome code. r=hsivonen
This is useful for printing. Naming is confusing IMO, but my read of the
docs and experimentation agree this is what we want :)

Differential Revision: https://phabricator.services.mozilla.com/D98415
2020-12-02 08:50:45 +00:00
Alexis Beingessner 061c96851f Bug 1619094 - Properly explain our fork of libudev-sys. r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D98406
2020-12-02 06:59:57 +00:00
Masayuki Nakano 912a5bc76d Bug 1678553 - part 13: Make `WidgetQueryContentEvent` use `Maybe` to store some data r=m_kato,geckoview-reviewers
Sorry for this big patch.

This makes `WidgetQueryContentEvent::Reply` is stored with `Maybe` to get
rid of `WidgetQueryContentEvent`.  And `Reply` stores offset and string
with `Maybe` and ``OffsetAndData<uint32_t>`, and also tentative caret offset
with `Maybe`.  Then, we can get rid of `WidgetQueryContentEvent::NOT_FOUND`.

Note that I tried to make `OffsetAndData` have a method to create `NSRange`
for cocoa widget.  However, it causes the column limit`to 100 or longer
and that causes unrelated changes in `TextEvents.h` and `IMEData.h`.
Therefore, I create an inline function in `TextInputHandler.mm` instead.

Differential Revision: https://phabricator.services.mozilla.com/D98264
2020-12-02 05:32:19 +00:00
Byron Campen [:bwc] dd46ef8cfe Bug 1678484: Start the grace period timer before pairing a candidate, just in case that candidate fails immediately. r=drno
Differential Revision: https://phabricator.services.mozilla.com/D97701
2020-12-01 22:51:41 +00:00