Commit Graph

4895 Commits

Author SHA1 Message Date
Noemi Erli
23395b20e2 Backed out 13 changesets (bug 1593843) for bustages in Logging.h CLOSED TREE
Backed out changeset b6e3fa6363bd (bug 1593843)
Backed out changeset 3db512256b0d (bug 1593843)
Backed out changeset f67081ea84ee (bug 1593843)
Backed out changeset ad02bb934459 (bug 1593843)
Backed out changeset 1a79176d3f7b (bug 1593843)
Backed out changeset 486c8562b816 (bug 1593843)
Backed out changeset 0d4313c436c5 (bug 1593843)
Backed out changeset 0c7e831d11bf (bug 1593843)
Backed out changeset 02ac8c39f46d (bug 1593843)
Backed out changeset 80895462dddf (bug 1593843)
Backed out changeset 4ab855869725 (bug 1593843)
Backed out changeset 5a24fc933cd6 (bug 1593843)
Backed out changeset f1c50ee60a78 (bug 1593843)
2019-11-23 05:18:17 +02:00
alwu
6d90addd24 Bug 1593843 - part10 : ask for the play permission when creating media element. r=bryce
For media element, as the spec requires that we should know the whether it can be allowed to play when we call `media.play()` [1], which means that we should get the result before the play invocation.

Therefore, we request for the play permission when we create media element.

Differential Revision: https://phabricator.services.mozilla.com/D52438

--HG--
extra : moz-landing-system : lando
2019-11-22 21:27:09 +00:00
alwu
f789ab1d90 Bug 1593843 - part8 : move helper functions out from 'AutoplayPolicy'. r=bryce
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
2019-11-22 09:17:35 +00:00
John Dai
0d5706ade7 Bug 1598684 - Click button element with button type should do nothing; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D54367

--HG--
extra : moz-landing-system : lando
2019-11-22 21:11:39 +00:00
Andreas Pehrson
3c385b4b80 Bug 1536156 - Stop doing EndCloningVisually in Unlink. r=mconley
Unlink must not cause an AddRef on the unlinked object, or it is at risk of
leaking. See 1593739 for an example of where this happens.

EndCloningVisually is dangerous in that it tries to do more than just unlink the
video element. It does AddRef in NotifyUAWidgetSetupOrChange, so that must be
avoided.

Previous patches to this bug make sure that MediaDecoder shutdown takes care of
clearing the secondary video container in the MediaDecoder stack, so this is not
actually necessary anymore.

Differential Revision: https://phabricator.services.mozilla.com/D53832

--HG--
extra : moz-landing-system : lando
2019-11-22 12:52:48 +00:00
Andreas Pehrson
626de4fb8d Bug 1536156 - Let cloneElementVisually() return a promise that resolves when frames have been rendered. r=alwu,mconley,bzbarsky
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
2019-11-22 12:52:48 +00:00
Andreas Pehrson
3c62bb84d8 Bug 1596777 - Hook up the SecondaryVideoContainer with state mirroring. r=alwu
This better follows how MediaDecoder and MediaDecoderStateMachine was
architected.

Differential Revision: https://phabricator.services.mozilla.com/D53710

--HG--
extra : moz-landing-system : lando
2019-11-22 00:07:04 +00:00
Daniel Varga
f12c40c242 Backed out changeset afe80b4ff889 (bug 1595934) Requested by ehsan to see if it fixex bug 1597915. On a CLOSED TREE 2019-11-22 02:01:51 +02:00
Daniel Varga
af05b317ec Backed out 7 changesets (bug 1597216, bug 1596777, bug 1536156) for reftest failures at reftest/bipbop_300_215kbps.mp4.lastframe.htm. On a CLOSED TREE
Backed out changeset a3fa99d936f3 (bug 1536156)
Backed out changeset 29dd64930421 (bug 1536156)
Backed out changeset 77c16444e714 (bug 1536156)
Backed out changeset d540f1802ff6 (bug 1536156)
Backed out changeset 8283eed414d2 (bug 1536156)
Backed out changeset 01d2c84810f0 (bug 1597216)
Backed out changeset e0184916cf37 (bug 1596777)
2019-11-22 01:58:42 +02:00
Andreas Pehrson
531a7211a9 Bug 1536156 - Stop doing EndCloningVisually in Unlink. r=mconley
Unlink must not cause an AddRef on the unlinked object, or it is at risk of
leaking. See 1593739 for an example of where this happens.

EndCloningVisually is dangerous in that it tries to do more than just unlink the
video element. It does AddRef in NotifyUAWidgetSetupOrChange, so that must be
avoided.

Previous patches to this bug make sure that MediaDecoder shutdown takes care of
clearing the secondary video container in the MediaDecoder stack, so this is not
actually necessary anymore.

Differential Revision: https://phabricator.services.mozilla.com/D53832

--HG--
extra : moz-landing-system : lando
2019-11-21 12:40:11 +00:00
Andreas Pehrson
1052205963 Bug 1536156 - Let cloneElementVisually() return a promise that resolves when frames have been rendered. r=alwu,mconley,bzbarsky
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
2019-11-20 21:51:48 +00:00
Andreas Pehrson
9d878d1ca7 Bug 1596777 - Hook up the SecondaryVideoContainer with state mirroring. r=alwu
This better follows how MediaDecoder and MediaDecoderStateMachine was
architected.

Differential Revision: https://phabricator.services.mozilla.com/D53710

--HG--
extra : moz-landing-system : lando
2019-11-20 16:32:52 +00:00
John Dai
fd9869d4f3 Bug 1551758 - Form submission reentrancy protection for 'submit' and 'invalid' event; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53696

--HG--
extra : moz-landing-system : lando
2019-11-20 19:39:38 +00:00
John Dai
3c293b08a8 Bug 1551758 - Update spec link and comments for CheckValidFormSubmission and CheckFormValidity; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53166

--HG--
extra : moz-landing-system : lando
2019-11-20 16:14:37 +00:00
John Dai
a7f881e5fc Bug 1551758 - Centralize form submission; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53165

--HG--
extra : moz-landing-system : lando
2019-11-20 16:14:39 +00:00
Arthur Iakab
29a9345cd6 Backed out 3 changesets (bug 1551758) for causing wpt failures on form-submission-algorithm.html. CLOSED TREE
Backed out changeset 7f73f8d6d3b1 (bug 1551758)
Backed out changeset 295015e6e79b (bug 1551758)
Backed out changeset 6ffaf0da08d9 (bug 1551758)

--HG--
extra : rebase_source : d86d64bed9c089190125efdd4f63d06ea9e30c97
2019-11-20 18:05:34 +02:00
Andreas Pehrson
df720f22d1 Bug 1592289 - Implement mute/unmute events for media element capture. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D52818

--HG--
extra : moz-landing-system : lando
2019-11-20 15:24:34 +00:00
Andreas Pehrson
67229e8a27 Bug 1592287 - Remove ended captureStream tracks and fire "removetrack" on MediaStream. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D52816

--HG--
extra : moz-landing-system : lando
2019-11-20 15:24:10 +00:00
John Dai
b99ae738cd Bug 1551758 - Form submission reentrancy protection for 'submit' and 'invalid' event; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53696

--HG--
extra : moz-landing-system : lando
2019-11-19 17:02:40 +00:00
John Dai
375a7b3faf Bug 1551758 - Update spec link and comments for CheckValidFormSubmission and CheckFormValidity; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53166

--HG--
extra : moz-landing-system : lando
2019-11-19 17:02:38 +00:00
John Dai
a9103e960f Bug 1551758 - Centralize form submission; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53165

--HG--
extra : moz-landing-system : lando
2019-11-20 13:09:19 +00:00
Andreas Pehrson
ef3f8a0e39 Bug 1593739 - Create a dedicated Unlink path for mSrcStream. r=bryce
Unlink of mSrcStream used to rely on EndSrcMediaStreamPlayback to unhook
everything. That method does more than necessary however, and if anything in it
creates a strong reference to the media element, we risk a leak.

This patch takes what's necessary to unhook from EndSrcMediaStreamPlayback and
runs it explicitly from Unlink, to avoid anything unnecessary being run as well.

Differential Revision: https://phabricator.services.mozilla.com/D51906

--HG--
extra : moz-landing-system : lando
2019-11-19 16:29:41 +00:00
Bogdan Tara
26742ff1c1 Backed out changeset 100092ccffcd (bug 1593739) for RefPtr mda perma-failures CLOSED TREE 2019-11-19 00:56:40 +02:00
Andreas Pehrson
daeeabf1da Bug 1593739 - Create a dedicated Unlink path for mSrcStream. r=bryce
Unlink of mSrcStream used to rely on EndSrcMediaStreamPlayback to unhook
everything. That method does more than necessary however, and if anything in it
creates a strong reference to the media element, we risk a leak.

This patch takes what's necessary to unhook from EndSrcMediaStreamPlayback and
runs it explicitly from Unlink, to avoid anything unnecessary being run as well.

Differential Revision: https://phabricator.services.mozilla.com/D51906

--HG--
extra : moz-landing-system : lando
2019-11-18 16:44:46 +00:00
Ehsan Akhgari
30cf316b38 Bug 1595934 - Make nsICookieManager cookie enumerators return Array<nsICookie> instead of nsISimpleEnumerator; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D52761

--HG--
extra : moz-landing-system : lando
2019-11-17 07:21:14 +00:00
Noemi Erli
513f38c497 Backed out changeset 0f20566c7b2f (bug 1593739) for causing assertion in StateWatching.h CLOSED TREE 2019-11-15 14:07:06 +02:00
Andreas Pehrson
a91244fa43 Bug 1593739 - Shut down the watch manager during Unlink to prevent future notify tasks. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D51906

--HG--
extra : moz-landing-system : lando
2019-11-15 09:39:15 +00:00
Emilio Cobos Álvarez
de8886fe4f Bug 1596474 - Remove GetBindingParent from nsGenericHTMLElement. r=smaug
The two loops where they're used can't walk across shadow boundaries, so we only
need to check for NAC.

We don't have forms in NAC, so avoid silly book-keeping and just return early
for those cases.

Differential Revision: https://phabricator.services.mozilla.com/D53045

--HG--
extra : moz-landing-system : lando
2019-11-14 17:16:01 +00:00
Andreas Pehrson
3f1d369bbf Bug 1302379 - Remove FinishedOnInactive hack from DOMMediaStream. r=jib
It is no longer needed with captured tracks' lifetimes spanning across seek
operations.

Differential Revision: https://phabricator.services.mozilla.com/D52051

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:16 +00:00
Andreas Pehrson
8d201eb310 Bug 1172394 - Hinge UpdateReadyStateInternal off watchables instead of direct updates. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D52047

--HG--
extra : moz-landing-system : lando
2019-11-13 22:39:55 +00:00
Andreas Pehrson
30c47c82ac Bug 1172394 - Use tail dispatching instead of mSrcStreamTracksAvailable. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D52046

--HG--
extra : moz-landing-system : lando
2019-11-13 22:39:58 +00:00
Andreas Pehrson
7fac8df54d Bug 1172394 - Merge MediaStream and MediaDecoder track sources. r=padenot
This reworks how media element captureStream works by removing the differences
between MediaStream and MediaDecoder capture. MediaDecoder capture will be
refactored so that ownership of MediaStreamTracks lies with the media element
instead of the OutputStreamManager. The internal MediaDecoder parts happen in a
later patch.

The new API for capturing a MediaDecoder involves a boolean on/off toggle, the
output tracks the decoder pipes data to, and the principal that data is tagged
with. If capturing is on but there are no output tracks, playback will not
happen, to ensure that no data gets accidentally skipped in the output tracks
while captured.

This also changes the logic for setting up MediaElementTrackSources in
HTMLMediaElement so it's triggered by the WatchManager and thus run in tail
dispatched runnables.

Differential Revision: https://phabricator.services.mozilla.com/D52040

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:09 +00:00
Andreas Pehrson
e324229af5 Bug 1172394 - Make dom::MediaTrack lifetime spec compliant. r=bryce
This makes us forget tracks at the right times. The spec also says no
removetrack events should be fired because of this, yet it seems to be something
other user agents do:
https://wpt.fyi/results/media-source/mediasource-avtracks.html

This is of low importance however, since MediaTracks are prefed off by default.

Differential Revision: https://phabricator.services.mozilla.com/D52038

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:12 +00:00
Csoregi Natalia
6ba30843e8 Backed out 15 changesets (bug 1500049, bug 1172394, bug 1546756, bug 1302379) for failures on browser_disabledForMediaStreamVideos.js. CLOSED TREE
Backed out changeset 355f090421a6 (bug 1500049)
Backed out changeset 306341d0b586 (bug 1302379)
Backed out changeset 3ff0d72d23a2 (bug 1546756)
Backed out changeset a4f256e68cef (bug 1172394)
Backed out changeset d0aa43657e8c (bug 1172394)
Backed out changeset edff95b6f724 (bug 1172394)
Backed out changeset 94bd21d9b396 (bug 1172394)
Backed out changeset 7e7baa73e1ef (bug 1172394)
Backed out changeset c3bd415507e8 (bug 1172394)
Backed out changeset 1c45b135318d (bug 1172394)
Backed out changeset c57c41e8c39e (bug 1172394)
Backed out changeset a796541fe5ef (bug 1172394)
Backed out changeset 89ad0b553b0f (bug 1172394)
Backed out changeset 744fb77a5833 (bug 1172394)
Backed out changeset afb4b226ff04 (bug 1172394)
2019-11-14 00:32:51 +02:00
Andreas Pehrson
b59f1080f0 Bug 1302379 - Remove FinishedOnInactive hack from DOMMediaStream. r=jib
It is no longer needed with captured tracks' lifetimes spanning across seek
operations.

Differential Revision: https://phabricator.services.mozilla.com/D52051

--HG--
extra : moz-landing-system : lando
2019-11-13 08:58:32 +00:00
Andreas Pehrson
af96d72e5f Bug 1172394 - Hinge UpdateReadyStateInternal off watchables instead of direct updates. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D52047

--HG--
extra : moz-landing-system : lando
2019-11-13 08:56:44 +00:00
Andreas Pehrson
8343246e20 Bug 1172394 - Use tail dispatching instead of mSrcStreamTracksAvailable. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D52046

--HG--
extra : moz-landing-system : lando
2019-11-13 08:56:31 +00:00
Andreas Pehrson
5b1bea60b3 Bug 1172394 - Merge MediaStream and MediaDecoder track sources. r=padenot
This reworks how media element captureStream works by removing the differences
between MediaStream and MediaDecoder capture. MediaDecoder capture will be
refactored so that ownership of MediaStreamTracks lies with the media element
instead of the OutputStreamManager. The internal MediaDecoder parts happen in a
later patch.

The new API for capturing a MediaDecoder involves a boolean on/off toggle, the
output tracks the decoder pipes data to, and the principal that data is tagged
with. If capturing is on but there are no output tracks, playback will not
happen, to ensure that no data gets accidentally skipped in the output tracks
while captured.

This also changes the logic for setting up MediaElementTrackSources in
HTMLMediaElement so it's triggered by the WatchManager and thus run in tail
dispatched runnables.

Differential Revision: https://phabricator.services.mozilla.com/D52040

--HG--
extra : moz-landing-system : lando
2019-11-13 08:55:29 +00:00
Andreas Pehrson
ed705988de Bug 1172394 - Make dom::MediaTrack lifetime spec compliant. r=bryce
This makes us forget tracks at the right times. The spec also says no
removetrack events should be fired because of this, yet it seems to be something
other user agents do:
https://wpt.fyi/results/media-source/mediasource-avtracks.html

This is of low importance however, since MediaTracks are prefed off by default.

Differential Revision: https://phabricator.services.mozilla.com/D52038

--HG--
extra : moz-landing-system : lando
2019-11-13 08:48:16 +00:00
Emilio Cobos Álvarez
019f75cee4 Bug 1595285 - Do not track TRANSITION_EMBED visits for link-coloring purposes. r=mak
Other browsers don't, plus it blocks work I want to do to query multiple links
at the same time.

Differential Revision: https://phabricator.services.mozilla.com/D52443

--HG--
extra : moz-landing-system : lando
2019-11-13 16:36:09 +00:00
Narcis Beleuzu
a30e00cd9c Backed out changeset b73d74bcafda (bug 1595285) for multiple bc failures. CLOSED TREE 2019-11-13 18:31:41 +02:00
Emilio Cobos Álvarez
eafae9973a Bug 1595285 - Do not track TRANSITION_EMBED visits for link-coloring purposes. r=mak
Other browsers don't, plus it blocks work I want to do to query multiple links
at the same time.

Differential Revision: https://phabricator.services.mozilla.com/D52443

--HG--
extra : moz-landing-system : lando
2019-11-12 05:06:36 +00:00
John Dai
de2c2a249a Bug 1552313 - Implement element.attachInternals; r=smaug,edgar
ElementInternals class is empty-for-now.

Differential Revision: https://phabricator.services.mozilla.com/D52158

--HG--
extra : moz-landing-system : lando
2019-11-12 11:27:55 +00:00
Dorel Luca
be7de717dd Backed out changeset e19c5df398de (bug 1595285) for causing leaks on browser-chrome in toolkit/components/places/tests/browser/browser_bug461710.js. CLOSED TREE 2019-11-11 20:58:06 +02:00
Dorel Luca
cbf2994b14 Backed out 3 changesets (bug 1552313) for WPT failures in custom-elements/CustomElementRegistry.html. CLOSED TREE
Backed out changeset 27a01989152a (bug 1552313)
Backed out changeset 5f8c6c9f2d36 (bug 1552313)
Backed out changeset f26d61e06a9d (bug 1552313)
2019-11-11 20:55:58 +02:00
John Dai
d9933f32ad Bug 1552313 - Implement element.attachInternals; r=smaug,edgar
ElementInternals class is empty-for-now.

Differential Revision: https://phabricator.services.mozilla.com/D52158

--HG--
extra : moz-landing-system : lando
2019-11-11 15:43:03 +00:00
Emilio Cobos Álvarez
87b2a95c52 Bug 1595285 - Do not track TRANSITION_EMBED visits for link-coloring purposes. r=mak
Other browsers don't, plus it blocks work I want to do to query multiple links
at the same time.

Differential Revision: https://phabricator.services.mozilla.com/D52443

--HG--
extra : moz-landing-system : lando
2019-11-11 13:28:52 +00:00
Bogdan Tara
80377e90ee Backed out 6 changesets (bug 1552176) for causing Hazard bustages CLOSED TREE
Backed out changeset c79b90bae420 (bug 1552176)
Backed out changeset 4b970cc771ca (bug 1552176)
Backed out changeset de7aa0eaf4c8 (bug 1552176)
Backed out changeset c8e692a40cd3 (bug 1552176)
Backed out changeset 68882d1eccac (bug 1552176)
Backed out changeset 692e5e51e19e (bug 1552176)
2019-11-11 12:11:36 +02:00
Valentin Gosu
60297f04a5 Bug 1552176 - pass TRRMode into nsHTMLDNSPrefetch methods r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49159

--HG--
extra : moz-landing-system : lando
2019-11-10 17:12:19 +00:00
Bogdan Tara
8f38f4a3fb Backed out 6 changesets (bug 1552176) for bustages complaining about ServiceWorkerManager.cpp CLOSED TREE
Backed out changeset bff9110e434e (bug 1552176)
Backed out changeset ac8f8a6dbd98 (bug 1552176)
Backed out changeset 8dd630e7534a (bug 1552176)
Backed out changeset 7ce9e220cdb9 (bug 1552176)
Backed out changeset ee9911acfcd4 (bug 1552176)
Backed out changeset 652b3bd6848d (bug 1552176)
2019-11-08 22:18:05 +02:00
Valentin Gosu
4354a83c3d Bug 1552176 - pass TRRMode into nsHTMLDNSPrefetch methods r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49159

--HG--
extra : moz-landing-system : lando
2019-11-08 17:13:47 +00:00
Matt Woodrow
2704b7ceff Bug 1593560 - Adjust tests to wait for data uri to load properly, since it now includes an extra IPDL roundtrip. r=kmag,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D51548

--HG--
extra : moz-landing-system : lando
2019-11-06 22:37:07 +00:00
Brian Grinstead
d981495450 Bug 1593119 - Remove dom/xbl and the MOZ_XBL build option r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D51338

--HG--
extra : moz-landing-system : lando
2019-11-07 00:35:32 +00:00
Coroiu Cristina
cbdbc8bc4b Backed out 7 changesets (bug 1593560) for crashtest failures at tests/layout/base/crashtests/446328.html on a CLOSED TREE
Backed out changeset 7dfae085a4cb (bug 1593560)
Backed out changeset 9842c80c98d8 (bug 1593560)
Backed out changeset d67a10437af7 (bug 1593560)
Backed out changeset 3e3948e9531c (bug 1593560)
Backed out changeset a7d04e276b44 (bug 1593560)
Backed out changeset 9f52c9f6dc54 (bug 1593560)
Backed out changeset 90572c49d464 (bug 1593560)
2019-11-07 00:32:53 +02:00
Matt Woodrow
52d6e76c02 Bug 1593560 - Adjust tests to wait for data uri to load properly, since it now includes an extra IPDL roundtrip. r=kmag,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D51548

--HG--
extra : moz-landing-system : lando
2019-11-06 18:22:17 +00:00
Andreas Pehrson
ac4828baba Bug 1588840 - Make ended return true after reaching the event loop's step 1 when playing a MediaStream. r=jib
This is especially important for media elements playing MediaStreams, since the
streams can be manipulated to end playback of the elements synchronously by
either stopping or removing their tracks.

Differential Revision: https://phabricator.services.mozilla.com/D49385

--HG--
extra : moz-landing-system : lando
2019-11-06 13:06:44 +00:00
Mirko Brodesser
b2de103bf9 Bug 1593222: part 12) Rename "nsNodeUtils.*" to "MutationObservers.*". r=smaug
Depends on D51827

Differential Revision: https://phabricator.services.mozilla.com/D51828

--HG--
rename : dom/base/nsNodeUtils.cpp => dom/base/MutationObservers.cpp
rename : dom/base/nsNodeUtils.h => dom/base/MutationObservers.h
extra : moz-landing-system : lando
2019-11-06 09:08:06 +00:00
Mirko Brodesser
ba0285f534 Bug 1593222: part 9) Move non-animation notification methods from nsNodeUtils to MutationObservers. r=smaug
The remaining notification methods are moved in a separate commit. The
files are renamed to `MutationObservers.*` in a follow-up commit.

Depends on D51824

Differential Revision: https://phabricator.services.mozilla.com/D51825

--HG--
extra : moz-landing-system : lando
2019-11-05 21:32:53 +00:00
Alex Catarineu
08a431f34e Bug 1581537 - Avoid several browser language leaks r=smaug
Spoof dom/dom.properties, layout/xmlparser.properties,
layout/MediaDocument.properties to en-US if needed.

Differential Revision: https://phabricator.services.mozilla.com/D46034

--HG--
extra : moz-landing-system : lando
2019-11-04 16:56:27 +00:00
Mihai Alexandru Michis
d19c1272ca Backed out changeset 1d87c269da8a (bug 1581537) for causing bc failures in browser_misused_characters_in_strings.js CLOSED TREE
--HG--
extra : rebase_source : b9f2da6650a4213a4a9284d6dbe7ecfd97761501
extra : amend_source : b7ca833a091419a2de5904eccb2d3ce9d0fcd337
2019-11-04 16:06:37 +02:00
Andreas Pehrson
9a95077157 Bug 1577505 - Progress currentTime for a MediaStream only while potentially playing. r=jib
It started progressing as soon as we set up the rendering of the tracks in the
stream, which is too early according to the HTMLMediaElement spec.

Now it starts progressing when we're potentially playing. The difference being
that we now wait for mReadyState to go beyond HAVE_CURRENT_DATA before hooking
up the time progression mechanism.

Differential Revision: https://phabricator.services.mozilla.com/D49354

--HG--
extra : moz-landing-system : lando
2019-11-04 13:43:01 +00:00
Andreas Pehrson
0685c0e901 Bug 1577505 - Make mSrcStreamPlaybackEnded and mReadyState watchable. r=jib
This makes all inputs to IsPotentiallyPlayin() Watchable when we're playing a
MediaStream.

Differential Revision: https://phabricator.services.mozilla.com/D49353

--HG--
extra : moz-landing-system : lando
2019-11-04 13:42:58 +00:00
Andreas Pehrson
aa162c3e88 Bug 1577505 - Rename UpdateSrcTrackTime back to UpdateSrcStreamTime. r=jib
It was incorrectly included in the renaming part of bug 1454998.

Differential Revision: https://phabricator.services.mozilla.com/D49352

--HG--
extra : moz-landing-system : lando
2019-11-04 13:42:56 +00:00
Alex Catarineu
ea206b140d Bug 1581537 - Avoid several browser language leaks r=smaug
Spoof dom/dom.properties, layout/xmlparser.properties,
layout/MediaDocument.properties to en-US if needed.

Differential Revision: https://phabricator.services.mozilla.com/D46034

--HG--
extra : moz-landing-system : lando
2019-11-04 11:27:59 +00:00
Masayuki Nakano
345f0e69ba Bug 1588745 - part 7: Remove AutoScriptBlocker from TextControlState::SetValue() r=Ehsan
For allowing `TextEditor` to dispatch DOM events synchronously, we should
remove `AutoScriptBlocker` in `TextControlState::SetValue()` right now.

According to the comment around the `AutoScriptBlocker`, `PrepareEditor()`
may be called while setting value.  Therefore, this patch makes
`AutoTextControlHandlingState` call it if `PrepareEditor()` is called
while handling `SetValue()` and when the top most `SetValue()` ends its job.

Depends on D51396

Differential Revision: https://phabricator.services.mozilla.com/D51397

--HG--
extra : moz-landing-system : lando
2019-11-01 21:10:17 +00:00
Masayuki Nakano
129b58687c Bug 1588745 - part 6: Post processing of setting value with TextEditor should be done before dispatching "input" event r=Ehsan
Currently, "input" event is fired when the `AutoScriptBlocker` in `SetValue()`
is deleted.  So, for keeping same behavior, the post processing after calling
`TextEditor` methods should be done before editor dispatches "input" event.

Fortunately, `TextInputListener::OnEditActionHandled()` is a good chance to
do that.  Therefore, this patch makes it notify `TextControlState` and
`AutoTextControlHandlingState`.

Note that ideally, each method of `TextEditor` should return
`NS_ERROR_OUT_OF_MEMORY` coming from
`AutoTextControlHandlingState::OnEditActionHandled()`.  However, it requires
a lot of changes in editor classes, and the case is really rare since editor
does not use fallible allocation.  Therefore, it must be okay to crash in
editor if `OnEditActionHandled()` returns `NS_ERROR_OUT_OF_MEMORY`.

Depends on D51395

Differential Revision: https://phabricator.services.mozilla.com/D51396

--HG--
extra : moz-landing-system : lando
2019-11-03 02:50:00 +00:00
Masayuki Nakano
4ea46b632e Bug 1588745 - part 5: Split TextControlState::SetValue() r=Ehsan
`TextControlState::SetValue()` does 4 things.
1. Committing composition if there is and if possible.
2. Setting value with `TextEditor` if text editor and frame are available.
3. Setting value without `TextEditor` otherwise.
4. Notifying value changed.

We can split #2 and #3 from it now because `AutoTextControlHandlingState`
manages nested actions.  Therefore, this patch creates
`SetValueWithTextEditor()` and `SetValueWithoutTextEditor()` which take
`AutoTextControlHandlingState`.

Depends on D51394

Differential Revision: https://phabricator.services.mozilla.com/D51395

--HG--
extra : moz-landing-system : lando
2019-11-02 23:23:54 +00:00
Masayuki Nakano
3b61d80b0e Bug 1588745 - part 4: Make TextControlState reuse its instance by itself r=Ehsan
Currently, only `HTMLInputElement` reuses `TextControlState` instance since
`HTMLTextAreaElement` had the instance as a member rather than allocate it.

Now, all instances are allocated in the heap independently for guaranteeing
their lifetime.  So, the reuse mechanism should be managed by
`TextControlState` itself.

Depends on D51393

Differential Revision: https://phabricator.services.mozilla.com/D51394

--HG--
extra : moz-landing-system : lando
2019-11-01 20:51:48 +00:00
Masayuki Nakano
f3bf8ed506 Bug 1588745 - part 3: Make TextControlState not deleted actually while it handles something r=Ehsan
Currently, nobody guarantees that `TextControlState` won't be deleted while
it handles something with `MOZ_CAN_RUN_SCRIPT` methods.

This patch hides its destructor (and constructor) for making only
`TextControlState` itself can delete its instances.  Then, if instance owner
wants to delete it while handling action(s), the oldest `AutoHandlingState`
will delete the `TextControlState`.

Depends on D51392

Differential Revision: https://phabricator.services.mozilla.com/D51393

--HG--
extra : moz-landing-system : lando
2019-11-01 20:49:12 +00:00
Masayuki Nakano
e2c6cf597d Bug 1588745 - part 2: Move some TextControlState members to stack only class r=Ehsan
Some members of `TextControlState` are initialized and restored in same block
scopes.  Therefore, with creating new stack only class and storing latest one
with a new member variable, we can store all of them in the stack.

Depends on D51391

Differential Revision: https://phabricator.services.mozilla.com/D51392

--HG--
extra : moz-landing-system : lando
2019-11-01 20:47:35 +00:00
Masayuki Nakano
91b4aa6851 Bug 1588745 - part 1: Rename nsTextEditorState to mozilla::TextControlState r=Ehsan
It should be in `mozilla` namespace and it manages not only `TextEditor`,
manages selection, selection controller and callback from editor. so that
I think it stores state of "text control widget". Therefore, I name it to
`TextControlState`.

And cleaning up the cpp file.

Differential Revision: https://phabricator.services.mozilla.com/D51391

--HG--
rename : dom/html/nsTextEditorState.cpp => dom/html/TextControlState.cpp
rename : dom/html/nsTextEditorState.h => dom/html/TextControlState.h
extra : moz-landing-system : lando
2019-11-01 20:43:11 +00:00
Noemi Erli
853acdf360 Backed out 5 changesets (bug 1552176) for causing multiple build bustages CLOSED TREE
Backed out changeset 203060e4af95 (bug 1552176)
Backed out changeset b52f0ff800c8 (bug 1552176)
Backed out changeset 9f8d159fe252 (bug 1552176)
Backed out changeset 751b518e08fa (bug 1552176)
Backed out changeset a11ffd474c0c (bug 1552176)
2019-11-02 23:20:28 +02:00
Valentin Gosu
27377bc488 Bug 1552176 - pass TRRMode into nsHTMLDNSPrefetch methods r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49159

--HG--
extra : moz-landing-system : lando
2019-11-02 20:43:30 +00:00
Edgar Chen
acd2114113 Bug 1580491 - Use Element::HasNonEmptyAttr in various places; r=bzbarsky
This was done by reviewing the results of
https://searchfox.org/mozilla-central/search?q=%2F*GetAttr%5C(.%2B(%26%26%7C%5C%7C%5C%7C)&case=true&regexp=true
one by one and replacing them with Element::HasNonEmptyAttr if possible.

Differential Revision: https://phabricator.services.mozilla.com/D51241

--HG--
extra : moz-landing-system : lando
2019-11-01 15:24:25 +00:00
Edwin Takahashi
c0f93ea425 Bug 1591641 - annotate select-load.html with fuzzy-if condition for Android r=gbrown
Changes:
- annotate select-load.html test with `fuzzy-if(Android)`

Differential Revision: https://phabricator.services.mozilla.com/D51181

--HG--
extra : moz-landing-system : lando
2019-10-30 21:25:22 +00:00
Daosheng Mu
21480b57c1 Bug 1565268 - Recovering VRDisplay status after VRService is shutdown. r=kip,jgilbert
When JS is paused, VRService will automatically shutdown because the timer is not updated,
we used to create a new VRDisplay to JS. However, the page is still using the older VRDisplay,
so it can't get the newest VRDisplayInfo status. We should exit presentation and
apply the VRDisplayInfo status to the original VRDisplay instead of creating new one.

Besides, we also need to release the VR screen buffer after exiting the immersive mode to avoid eglMakeCurrent error.

Differential Revision: https://phabricator.services.mozilla.com/D50558

--HG--
extra : moz-landing-system : lando
2019-10-29 00:35:35 +00:00
John Dai
3a77b15ccb Bug 1589027 - Fix object.tabIndex should return 0 by default; r=smaug
The spec change HTMLObjectElement tabIndex default to 0, but `test_object_plugin_nav.html` will fail due to HTMLObjectElement’s sequence focus and .focus() rely on default tabIndex. In this patch I separate the logic to not rely on default tabIndex for HTMLObjectElement's plugin type and align the spec.

Differential Revision: https://phabricator.services.mozilla.com/D50801

--HG--
extra : moz-landing-system : lando
2019-10-28 15:50:59 +00:00
Masayuki Nakano
a434f646f8 Bug 1577058 - part 2: Make nsFrameSelection::CommonPageMove() handle nsFrameSelection::ScrollSelectionIntoView() too r=smaug
Currently, `nsFrameSelection::CommonPageMove()` is called before every caller
calls `nsFrameSelection::ScrollSelectionIntoView()`.  However, when an editing
host has focus, the scroll target may be outside of it.  In such case, without
moving caret, user may want only to scroll the scrollable element.

Chrome behaves like so.  Chrome also can scroll outside scrollable element
of focused editing host.  However, it scrolls caret into view only when
caret is moved actually.  Therefore, it makes sense to follow this behavior.

This patch makes `nsFrameSelection::CommonPageMove()` also call
`nsFrameSelection::ScrollSelectionIntoView()`.  However, it newly takes
`SelectionIntoView` flag for making callers can choose the condition.  I.e.,
`ScrollSelectionIntoView()` should be called always, or only when selection
is actually changed, or shouldn't be called.

Differential Revision: https://phabricator.services.mozilla.com/D50178

--HG--
extra : moz-landing-system : lando
2019-10-28 10:03:37 +00:00
Cosmin Sabou
3c54e28fc8 Backed out 2 changesets (bug 1577058) for causing bug 1541915 to nearly permafail.
Backed out changeset c556c5228132 (bug 1577058)
Backed out changeset d00a7e091efd (bug 1577058)
2019-10-27 17:38:58 +02:00
Masayuki Nakano
7a894386f2 Bug 1577058 - part 2: Make nsFrameSelection::CommonPageMove() handle nsFrameSelection::ScrollSelectionIntoView() too r=smaug
Currently, `nsFrameSelection::CommonPageMove()` is called before every caller
calls `nsFrameSelection::ScrollSelectionIntoView()`.  However, when an editing
host has focus, the scroll target may be outside of it.  In such case, without
moving caret, user may want only to scroll the scrollable element.

Chrome behaves like so.  Chrome also can scroll outside scrollable element
of focused editing host.  However, it scrolls caret into view only when
caret is moved actually.  Therefore, it makes sense to follow this behavior.

This patch makes `nsFrameSelection::CommonPageMove()` also call
`nsFrameSelection::ScrollSelectionIntoView()`.  However, it newly takes
`SelectionIntoView` flag for making callers can choose the condition.  I.e.,
`ScrollSelectionIntoView()` should be called always, or only when selection
is actually changed, or shouldn't be called.

Differential Revision: https://phabricator.services.mozilla.com/D50178

--HG--
extra : moz-landing-system : lando
2019-10-27 01:44:55 +00:00
Jeff Walden
3e64c882fe Bug 1591655 - Remove the unnecessary |proto| argument from |JS::NewPromiseObject| and its callers, seeing as all callers pass |nullptr| (and therefore uniformly request the default prototype). r=jandem,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D50695

--HG--
extra : moz-landing-system : lando
2019-10-26 08:14:05 +00:00
Brian Grinstead
ec30cc58df Bug 1587142 - Remove most XBL tests in dom/ r=bzbarsky
The following tests are not removed and need to be ported to Shadow DOM:
- test_bug330925.xhtml
- test_bug372086.html
- test_bug319374.xhtml

Differential Revision: https://phabricator.services.mozilla.com/D50650

--HG--
extra : moz-landing-system : lando
2019-10-25 22:38:08 +00:00
Edwin Takahashi
a5bb04283f Bug 1591257 - remove skiaContent fuzzy condition from dom/html/reftests/autofocus/reftest.list r=gbrown
Changes:
- remove skiaContent from `dom/html/reftests/autofocus/reftest.list`

Differential Revision: https://phabricator.services.mozilla.com/D50543

--HG--
extra : moz-landing-system : lando
2019-10-25 20:19:41 +00:00
alwu
11341ad999 Bug 1590579 - part2 : update controller's audible state when it starts. r=chunmin
Everytime when we start a controller, we should also update its audible state correctly, in order to request audio focus correctly.

Differential Revision: https://phabricator.services.mozilla.com/D50151

--HG--
extra : moz-landing-system : lando
2019-10-24 20:18:47 +00:00
Matthew Noorenberghe
19fc89710d Bug 1583957 - Indicate support for autocomplete=(username|new-password|current-password). r=farre
Bug 917325 started using the `username` token.
Bug 1119063 started using the `new-password` token. This patch also adds support for `current-password` since it's the counterpart to `new-password` and we plan to use it as a signal eventually so want to encourage its use.

Differential Revision: https://phabricator.services.mozilla.com/D50351

--HG--
extra : moz-landing-system : lando
2019-10-24 12:45:24 +00:00
Rob Wu
9502c5460b Bug 1590417 - Remove unused HTMLMediaElement::GetTopLevelPrincipal r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D50069

--HG--
extra : moz-landing-system : lando
2019-10-23 18:13:40 +00:00
Thomas Nguyen
cf2f2ec008 Bug 1580462 - Store iframe's FeaturePolicy in browsingContext to inherit cross origin document. r=baku,farre
Differential Revision: https://phabricator.services.mozilla.com/D48825

--HG--
extra : moz-landing-system : lando
2019-10-23 19:39:00 +00:00
Razvan Maries
7fb625f8cf Backed out changeset ae33b9c001e5 (bug 1580462) for build bustages on nsWindow.cpp. CLOSED TREE 2019-10-23 11:07:00 +03:00
Thomas Nguyen
a220530f6b Bug 1580462 - Store iframe's FeaturePolicy in browsingContext to inherit cross origin document. r=baku,farre
Differential Revision: https://phabricator.services.mozilla.com/D48825

--HG--
extra : moz-landing-system : lando
2019-10-22 14:36:00 +00:00
Emilio Cobos Álvarez
602ba56e1f Bug 1590366 - Remove accessibility.heading-element-level-changes.enabled. r=MarcoZ
Well that was short :D

Differential Revision: https://phabricator.services.mozilla.com/D50047

--HG--
extra : moz-landing-system : lando
2019-10-22 13:51:41 +00:00
Andrea Marchesini
410cb724a7 Bug 1585284 - Force global in Blob CTOR, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49629

--HG--
extra : moz-landing-system : lando
2019-10-21 05:33:19 +00:00
Andrea Marchesini
6797e45278 Bug 1585284 - Use nsIGlobalObject in any Blob/File CTOR, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49392

--HG--
extra : moz-landing-system : lando
2019-10-21 05:33:33 +00:00
Geoff Brown
32490358c2 Bug 1585119 - Re-enable many more mochitests on Android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
I intend to enable still more mochitests in a future patch.

Differential Revision: https://phabricator.services.mozilla.com/D49524

--HG--
extra : moz-landing-system : lando
2019-10-18 14:35:20 +00:00
Masayuki Nakano
023906f104 Bug 1584963 - Make nsTextEditorState not manage TextInputListener by itself when chrome script emulates user input r=m_kato
When `nsTextEditorState::SetValue()` is called with `eSetValue_BySetUserInput`,
we emulate user input.  I.e., keep using transaction manager of the editor,
events fired while handling user input should be fired.

Currently, `nsTextEditorState::SetValue()` suppresses multiple state handling
while setting value with calling `mTextListener->SettingValue(true)`.  This
is why `"input"` event listeners cannot retrieve the latest state of validation
if `inputType` is `"insertReplacementText"`.

This patch makes it keep managing `mTextListener` when setting the value
programatically.   Otherwise, i.e., it emulates user input, editor should
manage it from `EditorBase::NotifyEditorObservers()` instead so that this
patch makes it not managing `mTextListener` in such case.

Differential Revision: https://phabricator.services.mozilla.com/D49571

--HG--
extra : moz-landing-system : lando
2019-10-18 09:18:40 +00:00
Ryan VanderMeulen
1cb9560b83 Bug 1587622 - Use MOZ_ASSERT_UNREACHABLE() instead of double-conversion's UNREACHABLE() in DOM media code. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D48880

--HG--
extra : moz-landing-system : lando
2019-10-18 01:49:06 +00:00
Andreas Pehrson
ace14cf90c Bug 1587248 - Adequately guard mMediaStreamRenderer usage. r=bryce
It can be unset by NotifyShutdown, to release the VideoFrameContainer in time.
This is unexpected for all paths assuming it will be unset by
EndSrcMediaStreamPlayback().

Depends on D49573

Differential Revision: https://phabricator.services.mozilla.com/D49574

--HG--
extra : moz-landing-system : lando
2019-10-17 18:31:22 +00:00
Andreas Pehrson
fe804f1c14 Bug 1587248 - Remove unnecessary legacy window guard. r=bryce
Depends on D49572

Differential Revision: https://phabricator.services.mozilla.com/D49573

--HG--
extra : moz-landing-system : lando
2019-10-17 18:25:26 +00:00
Emilio Cobos Álvarez
441f9a401b Bug 998590 - Prototype accessibility level changes for headings behind a pref. r=MarcoZ
I don't think these need invalidation of any sort since they only depend on
ancestors, and we recreate accessibles when the element's ancestor chain changes.

Differential Revision: https://phabricator.services.mozilla.com/D49408

--HG--
extra : moz-landing-system : lando
2019-10-16 12:31:21 +00:00
Emilio Cobos Álvarez
5ffa02e5a8 Bug 998590 - Factor out heading accessibility level into HTMLHeadingElement. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D49407

--HG--
extra : moz-landing-system : lando
2019-10-16 12:32:10 +00:00
Emilio Cobos Álvarez
2ec3bb2b4f Bug 998590 - Cleanup HTMLHeadingElement, and add HTMLHeadingElement::FromNode. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D49406

--HG--
extra : moz-landing-system : lando
2019-10-16 14:25:05 +00:00
Geoff Brown
c906073cd5 Bug 1585119 - Re-enable many mochitests on android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
With the additional tests running, task times increase; I have added one
more test chunk for android mochitest-plain.
These tests were identified from a random sampling of mochitest manifests;
I intend to enable more mochitests in future patches.

Differential Revision: https://phabricator.services.mozilla.com/D48912

--HG--
extra : moz-landing-system : lando
2019-10-15 15:07:09 +00:00
Emilio Cobos Álvarez
9eb8be65f7 Bug 1576714 - Don't update scrollbar visibility for non-top-level remote browsers. r=nika
This flag is only meant for window.open() stuff, so not relevant to iframes at
all.

This preserves the current fission behavior (which is quite broken) of always
showing scrollbars.

The way to control scrollbars for iframes (the scrolling attribute) is not
handled at all for Fission, I filed a bug and left a few FIXMEs.

Differential Revision: https://phabricator.services.mozilla.com/D49292

--HG--
extra : moz-landing-system : lando
2019-10-15 14:32:18 +00:00
Emilio Cobos Álvarez
58050e8a18 Bug 1555947 - Be consistent in using composed / uncomposed doc for <link rel=localization>. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49180

--HG--
extra : moz-landing-system : lando
2019-10-15 14:15:14 +00:00
Andreea Pavel
c45f72ed14 Bug 1533759 - update test_window_open_close.html disable condition for windows64 debug. r=bc
Differential Revision: https://phabricator.services.mozilla.com/D48925

--HG--
extra : moz-landing-system : lando
2019-10-11 13:45:19 +00:00
Emilio Cobos Álvarez
135388d85f Bug 1587457 - Remove Element::GetTokenList. r=bzbarsky
Looks like this used to be more generic, looking at:

https://hg.mozilla.org/mozilla-central/rev/263812990c503f6e238b33b2fd3314284ac1be3e

But now only specific element subclasses use it, and the token lists can just be
members in the relevant subclasses.

Differential Revision: https://phabricator.services.mozilla.com/D48710

--HG--
extra : moz-landing-system : lando
2019-10-11 04:09:40 +00:00
Ehsan Akhgari
ff268df84b Bug 1546112 - Remove the code for XMLDocument.load/async; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D48877

--HG--
extra : moz-landing-system : lando
2019-10-10 18:20:34 +00:00
Brendan Dahl
237d762715 Bug 1510785 - Skip all XBL related tests when XBL is disabled. r=bzbarsky
XBL will be disabled on android, so these tests must be skipped. Where possible
tests are copied to create shadow DOM tests.

Depends on D45615

Differential Revision: https://phabricator.services.mozilla.com/D45616

--HG--
rename : layout/inspector/tests/test_bug522601.xhtml => layout/inspector/tests/test_bug522601-shadow.xhtml
rename : layout/inspector/tests/test_bug609549.xhtml => layout/inspector/tests/test_bug609549-shadow.xhtml
rename : layout/reftests/bugs/334829-1a.xhtml => layout/reftests/bugs/334829-1a-shadow.xhtml
rename : layout/reftests/bugs/334829-1b.xhtml => layout/reftests/bugs/334829-1b-shadow.xhtml
rename : layout/reftests/bugs/386310-1b.html => layout/reftests/bugs/386310-1b-shadow.html
rename : layout/reftests/bugs/386310-1c.html => layout/reftests/bugs/386310-1c-shadow.html
rename : layout/reftests/bugs/386310-1d.html => layout/reftests/bugs/386310-1d-shadow.html
rename : layout/reftests/bugs/482592-1a.xhtml => layout/reftests/bugs/482592-1a-shadow.xhtml
rename : layout/reftests/bugs/482592-1b.xhtml => layout/reftests/bugs/482592-1b-shadow.xhtml
rename : layout/reftests/css-selectors/sibling-combinators-on-anon-content-1.xhtml => layout/reftests/css-selectors/sibling-combinators-on-anon-content-1-shadow.xhtml
rename : layout/reftests/css-selectors/sibling-combinators-on-anon-content-2.xhtml => layout/reftests/css-selectors/sibling-combinators-on-anon-content-2-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-appendmultiple.xhtml => layout/reftests/dom/multipleinsertionpoints-appendmultiple-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-appendsingle-1.xhtml => layout/reftests/dom/multipleinsertionpoints-appendsingle-1-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-appendsingle-2.xhtml => layout/reftests/dom/multipleinsertionpoints-appendsingle-2-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-insertmultiple.xhtml => layout/reftests/dom/multipleinsertionpoints-insertmultiple-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-insertsingle-1.xhtml => layout/reftests/dom/multipleinsertionpoints-insertsingle-1-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-insertsingle-2.xhtml => layout/reftests/dom/multipleinsertionpoints-insertsingle-2-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-ref2.xhtml => layout/reftests/dom/multipleinsertionpoints-ref2-shadow.xhtml
rename : layout/reftests/ib-split/insert-into-split-inline-5.html => layout/reftests/ib-split/insert-into-split-inline-5-shadow.html
extra : moz-landing-system : lando
2019-10-08 23:52:46 +00:00
Brendan Dahl
c68cd30ef2 Bug 1510785 - Only build XBL related code when MOZ_XBL is defined. r=bzbarsky
When XBL is disabled, no code in dom/xbl will be built. Also, adds ifdefs
to remove any of the XBL related code elsewhere. There's definitely more
that can be done here, but I think it's better to wait to do the rest of
the cleanup when we actually remove the code.

Depends on D45612

Differential Revision: https://phabricator.services.mozilla.com/D45613

--HG--
extra : moz-landing-system : lando
2019-10-08 23:52:14 +00:00
Emma Malysz
dd0ffd6562 Bug 1586862, replace XUL textbox with HTML input and generic XUL box in testcases within dom directory r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D48450

--HG--
extra : moz-landing-system : lando
2019-10-08 21:09:48 +00:00
Cosmin Sabou
73c11d0ebd Backed out changeset 388dbc366e53 (bug 1586862) for mochitest failures on test_focus_docnav.xul CLOSED TREE 2019-10-08 21:04:02 +03:00
Emma Malysz
2e3c4bba36 Bug 1586862, replace XUL textbox with HTML input and generic XUL box in testcases within dom directory r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D48450

--HG--
extra : moz-landing-system : lando
2019-10-08 15:32:07 +00:00
Edgar Chen
534d501cf9 Bug 1129227 - Part 3: Add test for requesting fullscreen in async callback; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47152

--HG--
extra : moz-landing-system : lando
2019-10-07 08:54:40 +00:00
Edgar Chen
37dc0de88e Bug 1129227 - Part 2: Switch Fullscreen to use transient-user-activation API; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47151

--HG--
extra : moz-landing-system : lando
2019-09-30 13:42:40 +00:00
Sylvestre Ledru
f12b9fa5c3 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D47737

--HG--
extra : moz-landing-system : lando
2019-10-06 18:29:55 +00:00
Frederic Wang
de2b53a526 Bug 1586008 - Factor out IsNodeInEditableRegion. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D48174

--HG--
extra : moz-landing-system : lando
2019-10-05 11:39:16 +00:00
Andreas Pehrson
1bdb34c6ec Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug
This renames the following (in alphabetical order, non-exhaustive):

AudioCaptureStream -> AudioCaptureTrack
AudioNodeStream -> AudioNodeTrack
AudioNodeExternalInputStream -> AudioNodeExternalInputTrack
DirectMediaStreamTrackListener -> DirectMediaTrackListener
MediaStream -> MediaTrack
  - Note that there's also dom::MediaTrack. Namespaces differentiate them.
MediaStreamGraph -> MediaTrackGraph
MediaStreamTrackListener -> MediaTrackListener
MSG -> MTG (in comments)
ProcessedMediaStream -> ProcessedMediaTrack
SharedDummyStream -> SharedDummyTrack
SourceMediaStream -> SourceMediaTrack
StreamTime -> TrackTime
TrackUnionStream -> ForwardedInputTrack
  - Because this no longer takes a union of anything, but only a single track
    as input.

Other minor classes, members and comments have been updated to reflect these
name changes.

Differential Revision: https://phabricator.services.mozilla.com/D46146

--HG--
rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp
rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h
rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp
rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h
rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp
rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h
rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h
rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp
rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h
rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp
rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h
rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp
rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h
extra : moz-landing-system : lando
2019-10-02 10:23:02 +00:00
Andreas Pehrson
8028758d0e Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt
This change mainly removes the `mTracks` member from MediaStream and moves all
associated members up a level, so that a MediaStream in practice represents a
single track.

Classes will be renamed in a future patch to reflect this.

Other changes include:

The new `mEnded` member of MediaStream changes meaning to only become true when
all data in the stream has been processed. It stems from
StreamTracks::Track::mEnded which used to become true as soon as the last bit of
data had been added to a track, and there could still be data in the track that
would get processed in future iterations. We are moving towards not having any
future data in tracks, which is why this change is ok to make -- keeping the old
behavior will soon not make sense.

TrackUnionStream is changed to no longer take a list of streams as input and
forward the union of their tracks to itself. Instead it's limited to having one
track as input at a time.

The autofinishing functionality that TrackUnionStream had before has been
transformed into an autoending functionality to allow it to defer ending until
its been told that it's ok to end through the control API. This lets a single
TrackUnionStream span the lifetime of multiple inputs, which will be useful for
making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and
for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name
a few potential use cases.

AudioNodeStreams used to only have a track (and thus an AudioSegment) if the
EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing
a track, AudioNodeStreams inherently have an AudioSegment as a member. It is
however only used with data if the EXTERNAL_OUTPUT flag is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D45821

--HG--
extra : moz-landing-system : lando
2019-10-02 10:22:53 +00:00
Andreas Pehrson
a639f42a0e Bug 1454998 - Remove track blocking from MediaInputPort. r=karlt
This functionality is not used since we moved to only having a single track per
MediaStream (bug 1493613).

Differential Revision: https://phabricator.services.mozilla.com/D47686

--HG--
extra : moz-landing-system : lando
2019-10-02 10:22:49 +00:00
Gurzau Raul
40dae37e00 Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE.
Backed out changeset 80417bdfa721 (bug 1454998)
Backed out changeset 8ff03f2f4ca2 (bug 1454998)
Backed out changeset ae6056b748d1 (bug 1454998)
Backed out changeset ab721cb2066b (bug 1454998)
Backed out changeset d0e8d413cd1c (bug 1454998)
Backed out changeset 3ce4dc7e9ae2 (bug 1454998)
Backed out changeset 6105a4176729 (bug 1454998)

--HG--
rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp
rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h
rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp
rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h
rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h
rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp
rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h
rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp
rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h
rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp
rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h
rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp
rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Andreas Pehrson
36d89d91c8 Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug
This renames the following (in alphabetical order, non-exhaustive):

AudioCaptureStream -> AudioCaptureTrack
AudioNodeStream -> AudioNodeTrack
AudioNodeExternalInputStream -> AudioNodeExternalInputTrack
DirectMediaStreamTrackListener -> DirectMediaTrackListener
MediaStream -> MediaTrack
  - Note that there's also dom::MediaTrack. Namespaces differentiate them.
MediaStreamGraph -> MediaTrackGraph
MediaStreamTrackListener -> MediaTrackListener
MSG -> MTG (in comments)
ProcessedMediaStream -> ProcessedMediaTrack
SharedDummyStream -> SharedDummyTrack
SourceMediaStream -> SourceMediaTrack
StreamTime -> TrackTime
TrackUnionStream -> ForwardedInputTrack
  - Because this no longer takes a union of anything, but only a single track
    as input.

Other minor classes, members and comments have been updated to reflect these
name changes.

Differential Revision: https://phabricator.services.mozilla.com/D46146

--HG--
rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp
rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h
rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp
rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h
rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp
rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h
rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h
rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp
rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h
rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp
rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h
rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp
rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h
extra : moz-landing-system : lando
2019-10-02 08:18:16 +00:00
Andreas Pehrson
1bc37d8ea4 Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt
This change mainly removes the `mTracks` member from MediaStream and moves all
associated members up a level, so that a MediaStream in practice represents a
single track.

Classes will be renamed in a future patch to reflect this.

Other changes include:

The new `mEnded` member of MediaStream changes meaning to only become true when
all data in the stream has been processed. It stems from
StreamTracks::Track::mEnded which used to become true as soon as the last bit of
data had been added to a track, and there could still be data in the track that
would get processed in future iterations. We are moving towards not having any
future data in tracks, which is why this change is ok to make -- keeping the old
behavior will soon not make sense.

TrackUnionStream is changed to no longer take a list of streams as input and
forward the union of their tracks to itself. Instead it's limited to having one
track as input at a time.

The autofinishing functionality that TrackUnionStream had before has been
transformed into an autoending functionality to allow it to defer ending until
its been told that it's ok to end through the control API. This lets a single
TrackUnionStream span the lifetime of multiple inputs, which will be useful for
making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and
for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name
a few potential use cases.

AudioNodeStreams used to only have a track (and thus an AudioSegment) if the
EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing
a track, AudioNodeStreams inherently have an AudioSegment as a member. It is
however only used with data if the EXTERNAL_OUTPUT flag is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D45821

--HG--
extra : moz-landing-system : lando
2019-10-02 08:17:51 +00:00
Andreas Pehrson
778a50400e Bug 1454998 - Remove track blocking from MediaInputPort. r=karlt
This functionality is not used since we moved to only having a single track per
MediaStream (bug 1493613).

Differential Revision: https://phabricator.services.mozilla.com/D47686

--HG--
extra : moz-landing-system : lando
2019-10-02 08:12:28 +00:00
Mike Conley
090db13fda Bug 1583882 - Fire an event when a <video> being visually cloned is removed from the DOM. r=dminor
Depends on D47611

Differential Revision: https://phabricator.services.mozilla.com/D47612

--HG--
extra : moz-landing-system : lando
2019-09-30 15:49:56 +00:00
Mike Conley
a220f3e4c9 Bug 1583882 - Remove vestigial TogglePictureInPicture privileged method on HTMLVideoElement. r=webidl,dminor,smaug*
Differential Revision: https://phabricator.services.mozilla.com/D47611

--HG--
extra : moz-landing-system : lando
2019-09-30 15:34:43 +00:00
Gabriele Svelto
10d41866a5 Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47678

--HG--
extra : moz-landing-system : lando
2019-09-30 22:06:47 +00:00
Cosmin Sabou
cb6b4f7b5b Bug 1533759 - Disable test_window_open_close.html on windows64 debug. r=bc
Differential Revision: https://phabricator.services.mozilla.com/D47570

--HG--
extra : moz-landing-system : lando
2019-09-30 13:10:06 +00:00
Anny Gakhokidze
f1c694e18f Bug 1582531 - Update fission annotations for skipped tests that are now passing succesfully, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47347

--HG--
extra : moz-landing-system : lando
2019-09-27 14:25:10 +00:00
Brindusan Cristian
1991bac5a6 Backed out 3 changesets (bug 1129227) for wpt failures at active-lock.html. CLOSED TREE
Backed out changeset 44219f4bafb0 (bug 1129227)
Backed out changeset 69f7db4e75bf (bug 1129227)
Backed out changeset 3edc8921609b (bug 1129227)
2019-09-27 03:53:36 +03:00
Edgar Chen
5925e241a9 Bug 1129227 - Part 3: Add test for requesting fullscreen in async callback; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47152

--HG--
extra : moz-landing-system : lando
2019-09-26 21:15:47 +00:00
Edgar Chen
7bf4c68bf5 Bug 1129227 - Part 2: Switch Fullscreen to use transient-user-activation API; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47151

--HG--
extra : moz-landing-system : lando
2019-09-26 21:15:43 +00:00
alwu
2e38d31eb1 Bug 1584215 - complete the request once promise is resolved. r=chunmin
The request is used to track if the promise is resolved or not, so we should call its `Complete()` method once promise is resolved, in order to keep the state of the request correct.

Differential Revision: https://phabricator.services.mozilla.com/D47331

--HG--
extra : moz-landing-system : lando
2019-09-26 21:54:05 +00:00
Sebastian Streich
88670a47e9 Bug 1580782 - Change Callsites to use nsIPrincipal->SchemeIs r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D45654

--HG--
extra : moz-landing-system : lando
2019-09-26 10:47:16 +00:00
Emilio Cobos Álvarez
e4c23e97da Bug 1583980 - Restrict mapping of width and height to aspect-ratio for <img> for now. r=bzbarsky
This is an easier thing to implement interoperably than what we implement now,
which is basically "whatever goes through this function".

Differential Revision: https://phabricator.services.mozilla.com/D47145

--HG--
extra : moz-landing-system : lando
2019-09-25 22:33:47 +00:00
alwu
8d8222b8a9 Bug 1578615 - part11 : remove usages of 'AudibleState::eMaybeAudible' in media element. r=chunmin
In bug1583978, we are going to remove `AudibleState::eMaybeAudible`. But before that, as `AudibleState::eMaybeAudible` is only used for delaying media playback, so we can remove its usage from media element and move it to the dedicated class to reduce confusion about how and when we should use `AudibleState::eMaybeAudible` or `AudibleState::eNotAudible`.

Differential Revision: https://phabricator.services.mozilla.com/D47153

--HG--
extra : moz-landing-system : lando
2019-09-25 23:55:42 +00:00
alwu
991ba4c203 Bug 1578615 - part4 : remove SUSPENDED_BLOCK related logic in AudioChannelWrapper. r=chunmin
Now `AudioChannelWrapper` would only start `AudioChannelAgent` when media starts and stop the agent when media stops. It won't handle any case with `SUSPENDED_BLOCK`.

It's clearer to know when we would start or stop the agent in AudioChannelWrapper.

In addition, in bug1577890, we will remove more unnecessary logic which is used for Fennec only in order to make `AudioChannelWrapper` cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D44747

--HG--
extra : moz-landing-system : lando
2019-09-25 02:08:39 +00:00
alwu
93ee16c385 Bug 1578615 - part3 : implement delay media playback policy. r=chunmin
Separate the logic of delaying media playback from `HTMLMediaElement`'s `mAudioChannelWrapper` to a new class, because delaying media playback is a special usage of using `AudioChannelAgent`.

It would make the code cleaner and separate the normal usage and the special usage, to reduce confusion.

We usually start `AudioChannelAgent` when media playback starts and stop it when media playback stops, however, in this case, we would start the agent even if media hasn't be started yet, because we would like to use the agent as a connection with `AudioChannelService` in order to receive the resume command when we're able to play delayed playback.

Differential Revision: https://phabricator.services.mozilla.com/D44746

--HG--
extra : moz-landing-system : lando
2019-09-25 23:41:23 +00:00
alwu
549eca85d5 Bug 1578615 - part1 : provide function GetAudibleState() on media element. r=chunmin
As we have another usage to know whether media is audible or not, we remove this function from AudioChannelWrapper and make it as media element's function.

In addition, it also makes sense to have this function for media element, because the result is decided by media element's own attributes.

Differential Revision: https://phabricator.services.mozilla.com/D44744

--HG--
extra : moz-landing-system : lando
2019-09-25 20:07:06 +00:00
alwu
1cd30cecd2 Bug 1578615 - part0.5 : simply the logic of "IsOwnerAudible()". r=chunmin
There are some checking conditions can be reordered or simplified in order to remove some unnecessary check.

Differential Revision: https://phabricator.services.mozilla.com/D47027

--HG--
extra : moz-landing-system : lando
2019-09-25 20:32:46 +00:00
alwu
e3fa191af4 Bug 1580659 - part6 : remove input config parameter from 'NotifyStartedPlaying()'. r=Ehsan
After applying patch4, now we would pull the change from `AudioChannelService` everytime after starting the agent, so we don't need to rely on letting `NotifyStartedPlaying()` to modify the config and use it to update our state.

Differential Revision: https://phabricator.services.mozilla.com/D45753

--HG--
extra : moz-landing-system : lando
2019-09-24 21:18:07 +00:00
Alastor Wu
330adf4d9e Bug 1580659 - part5 : stop audio capturing explicitly. r=chunmin,karlt
As we start audio capturing explicitly, we should also take responsibility to stop audio capturing when we don't need it.

We were hiding too many details on `AudioChannelAgent` before, which allow us hard to know who and where we handle audio capturing.

Differential Revision: https://phabricator.services.mozilla.com/D45752

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:39 +00:00
alwu
d158e0c4b2 Bug 1580659 - part4 : pulling the intial update after starting AudioChannelAgent. r=chunmin
Instead of calling those callback functions seperately, we could provide a function to pull those changes at once after starting the agent.

In addition, `WindowXXXChanged` are callback functions of `nsIAudioChannelAgentCallback`, so they should only be called by `AudioChannelAgent`, to indicate receiving the change from `AudioChannelService`. We should not call them directly.

Differential Revision: https://phabricator.services.mozilla.com/D45751

--HG--
extra : moz-landing-system : lando
2019-09-24 21:17:59 +00:00
Alastor Wu
5d31bee21f Bug 1580659 - part3 : call 'WindowAudioCaptureChanged()' explicitly. r=chunmin,karlt
Previously `AudioChannelService` called `WindowAudioCaptureChanged()` implicitly whenever we added the agent to the service [1], which made the audio capturing callback happen before finishing registration.

There are two drawbacks,
(1) it's hard to be aware of that the audio capturing callback would be called before finishing `AudioChannelAgent::NotifyStartedPlaying()` [2], which causes unclear call flow.

(2) If someone checks `AudioChannelAgent::IsPlayingStarted()` [3] inside audio capturing callback, then we would find that the `mIsRegToService` is false even if we have registered the agent to `AudioChannelService` because `mIsRegToService` is updated in the last line in the `AudioChannelAgent::NotifyStartedPlaying()`, but the audio capturing callback could be executed before that.

[1] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelService.cpp#723
[2] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#144
[3] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#285

Differential Revision: https://phabricator.services.mozilla.com/D45750

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:43 +00:00
Alastor Wu
08fa1387dc Bug 1580659 - part2 : remove redundant checking. r=chunmin
We have already had the same checking in `AudioCaptureStreamChange()`, so we can remove the checking in `AudioCaptureStreamChangeIfNeeded()`.

Differential Revision: https://phabricator.services.mozilla.com/D45749

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:27 +00:00
shindli
bfa22f415b Backed out 9 changesets (bug 1580659) for causing linting failure in /builds/worker/checkouts/gecko/dom/plugins/base/nsNPAPIPluginInstance.cpp CLOSED TREE
Backed out changeset b8c46aaec410 (bug 1580659)
Backed out changeset fd31977767d5 (bug 1580659)
Backed out changeset 8b9f61694270 (bug 1580659)
Backed out changeset 276827f54c71 (bug 1580659)
Backed out changeset ecb2bf9fb452 (bug 1580659)
Backed out changeset b712f15af619 (bug 1580659)
Backed out changeset c25bfc8b31b1 (bug 1580659)
Backed out changeset 20cfcd96a40e (bug 1580659)
Backed out changeset e92ff4ac7f43 (bug 1580659)
2019-09-24 09:50:42 +03:00
Alastor Wu
b3e82e167d Bug 1580659 - part6 : remove input config parameter from 'NotifyStartedPlaying()'. r=Ehsan
After applying patch4, now we would pull the change from `AudioChannelService` everytime after starting the agent, so we don't need to rely on letting `NotifyStartedPlaying()` to modify the config and use it to update our state.

Differential Revision: https://phabricator.services.mozilla.com/D45753

--HG--
extra : moz-landing-system : lando
2019-09-18 00:03:14 +00:00
Alastor Wu
eaf6b8ef6e Bug 1580659 - part5 : stop audio capturing explicitly. r=chunmin,karlt
As we start audio capturing explicitly, we should also take responsibility to stop audio capturing when we don't need it.

We were hiding too many details on `AudioChannelAgent` before, which allow us hard to know who and where we handle audio capturing.

Differential Revision: https://phabricator.services.mozilla.com/D45752

--HG--
extra : moz-landing-system : lando
2019-09-21 02:21:58 +00:00
Alastor Wu
17d1e17425 Bug 1580659 - part4 : pulling the intial update after starting AudioChannelAgent. r=chunmin
Instead of calling those callback functions seperately, we could provide a function to pull those changes at once after starting the agent.

In addition, `WindowXXXChanged` are callback functions of `nsIAudioChannelAgentCallback`, so they should only be called by `AudioChannelAgent`, to indicate receiving the change from `AudioChannelService`. We should not call them directly.

Differential Revision: https://phabricator.services.mozilla.com/D45751

--HG--
extra : moz-landing-system : lando
2019-09-23 17:44:21 +00:00
Alastor Wu
f74da16941 Bug 1580659 - part3 : call 'WindowAudioCaptureChanged()' explicitly. r=chunmin,karlt
Previously `AudioChannelService` called `WindowAudioCaptureChanged()` implicitly whenever we added the agent to the service [1], which made the audio capturing callback happen before finishing registration.

There are two drawbacks,
(1) it's hard to be aware of that the audio capturing callback would be called before finishing `AudioChannelAgent::NotifyStartedPlaying()` [2], which causes unclear call flow.

(2) If someone checks `AudioChannelAgent::IsPlayingStarted()` [3] inside audio capturing callback, then we would find that the `mIsRegToService` is false even if we have registered the agent to `AudioChannelService` because `mIsRegToService` is updated in the last line in the `AudioChannelAgent::NotifyStartedPlaying()`, but the audio capturing callback could be executed before that.

[1] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelService.cpp#723
[2] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#144
[3] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#285

Differential Revision: https://phabricator.services.mozilla.com/D45750

--HG--
extra : moz-landing-system : lando
2019-09-18 21:59:32 +00:00
Alastor Wu
9f046cf28c Bug 1580659 - part2 : remove redundant checking. r=chunmin
We have already had the same checking in `AudioCaptureStreamChange()`, so we can remove the checking in `AudioCaptureStreamChangeIfNeeded()`.

Differential Revision: https://phabricator.services.mozilla.com/D45749

--HG--
extra : moz-landing-system : lando
2019-09-17 23:04:12 +00:00
Emilio Cobos Álvarez
678c18063d Bug 1583203 - Annotate nsINode::OwnerDoc() as MOZ_NONNULL_RETURN. r=smaug
People keep adding useless null-checks and it was not clear what the consensus
was from bug 1441165, but this should be unobjectionable I guess.

Differential Revision: https://phabricator.services.mozilla.com/D46781

--HG--
extra : moz-landing-system : lando
2019-09-23 18:12:19 +00:00