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

99 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke c6ace2f153 Bug 1673931 - Avoid including BindingDeclarations.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97612
2021-03-04 14:32:14 +00:00
alwu 95cf843de9 Bug 1678357 - part3 : modify test. r=chunmin
Because of part1, now we would activate controller in different momemt, so we have to modify our test to make them work or reduce the possible intermittent failure.

Depends on D98830

Differential Revision: https://phabricator.services.mozilla.com/D98831
2020-12-12 03:26:09 +00:00
Simon Giesecke 4cab6ac723 Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8
This moves parts of IPCMessageUtils.h to two new header files and adapts
the include directives as necessary. The new header files are:
- EnumSerializer.h, which defines the templates for enum serializers
- IPCMessageUtilsSpecializations.h, which defines template specializations
  of ParamTraits with extra dependencies (building upon both IPCMessageUtils.h
  and EnumSerializer.h)

This should minimize the dependencies pulled in by every consumer of
IPCMessageUtils.h

Differential Revision: https://phabricator.services.mozilla.com/D94459
2020-12-10 11:09:21 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
alwu b017db4b60 Bug 1673613 - part3 : do not notify media session attributes change from inactive document, but will notify them once document becomes active. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D97721
2020-11-21 05:12:18 +00:00
alwu ff5fa5f914 Bug 1673613 - part2 : wrap the process of updating playback state into a function. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D97719
2020-11-22 08:00:19 +00:00
alwu 8f7e3d1c6f Bug 1673613 - part1 : add a crashtest. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D97718
2020-11-22 07:54:58 +00:00
alwu 26511feeb0 Bug 1673509 - part6 : remove 'createTabAndLoad' function. r=chunmin
All media control browser tests are already using new method to create tab, so we don't need the old method anymore.

As `browser_active_mediasession_among_tabs.js` is using them and import media control's `head.js`, remove the usage and use `BrowserTestUtils` method instead.

Differential Revision: https://phabricator.services.mozilla.com/D95362
2020-11-19 00:33:39 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
alwu d87f6fb19c Bug 1673521 - move all browser tests into browser folder in order to adopt browser-test eslint setting automatically. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D94872
2020-10-29 19:32:26 +00:00
Razvan Maries 30f21fe657 Backed out changeset f1c833a3cffb (bug 1673521) for Gecko Decision Task bustage. CLOSED TREE 2020-10-29 21:25:52 +02:00
alwu d4db5c9d04 Bug 1673521 - move all browser tests into browser folder in order to adopt browser-test eslint setting automatically. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D94872
2020-10-29 19:06:44 +00:00
alwu 8bdf11efef Bug 1672876 - run shutdown during unlink. r=mccr8
When unlink happens, we should also run `Shutdown()` which should also ensure the member variables are still existing before running corresponding methods.

Differential Revision: https://phabricator.services.mozilla.com/D94609
2020-10-27 21:15:06 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
alwu 18f0229b8f Bug 1665527 - part2 : notify media session status based on its document's activity state. r=chunmin
Because of D90771, we need media session to notifty its status correctly in order to deactivate the controller. Therefore, when its document becomes inactive (in bfcahce), we should treat media session as inactive and notify it to `MediaStatusManager` in order to clear the active media session if needed.

In addition, add some assertions to ensure we won't modify or set any attributes on media session when its document is inactive.

Differential Revision: https://phabricator.services.mozilla.com/D90926
2020-09-23 19:43:46 +00:00
Narcis Beleuzu 691fd66153 Backed out 4 changesets (bug 1665527) for wpt leakchecks on setactionhandler.html . CLOSED TREE
Backed out changeset 216b96d6a2b3 (bug 1665527)
Backed out changeset a683efbf01c1 (bug 1665527)
Backed out changeset a18103008464 (bug 1665527)
Backed out changeset b97b8759b686 (bug 1665527)
2020-09-23 15:06:17 +03:00
alwu ad52a54195 Bug 1665527 - part2 : notify media session status based on its document's activity state. r=chunmin
Because of D90771, we need media session to notifty its status correctly in order to deactivate the controller. Therefore, when its document becomes inactive (in bfcahce), we should treat media session as inactive and notify it to `MediaStatusManager` in order to clear the active media session if needed.

In addition, add some assertions to ensure we won't modify or set any attributes on media session when its document is inactive.

Differential Revision: https://phabricator.services.mozilla.com/D90926
2020-09-22 21:46:13 +00:00
alwu 75773fa092 Bug 1634494 - part1 : store the active media session context Id on WindowContext. r=chunmin,farre
We determine which media session is active media session in chrome process, but the media session in content process doesn't know the detail.

This patch would store the active session context Id on the top level WindowContext, so that media session in content process can know if it's an active context or not, which helps to trigger the action handler only on active media session, after changing our propagation mechanism in following patches.

Differential Revision: https://phabricator.services.mozilla.com/D88106
2020-08-27 14:11:05 +00:00
alwu 5a98feea06 Bug 1658075 - part2 : use testing functions from 'MediaControlService'. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D86621
2020-08-14 01:31:49 +00:00
alwu e398ca4d46 Bug 1621403 - part3 : add test. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D82817
2020-07-15 21:02:08 +00:00
alwu 1493d7798d Bug 1621403 - part2 : implement `seekto` action. r=chunmin,emilio
Implement `Seekto` action [1]. In addtion, as `seekto` can go with additional properties, we create a new structure `MediaControlAction` to wrap `MediaControlKey` and `SeekDetails`, which can be sent with `seekto`.

[1] https://w3c.github.io/mediasession/#dom-mediasessionaction-seekto

Differential Revision: https://phabricator.services.mozilla.com/D82816
2020-07-16 00:16:33 +00:00
alwu 20f7602472 Bug 1582569 - part2 : modify tests. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D82580
2020-07-10 16:19:43 +00:00
alwu f7b14399a5 Bug 1643513 - part2 : notify position state change when media session updates the position state. r=chunmin
What this patch do are
- propagate the position state change from the media session

The advantage of doing so is
- to allow us to notify this change to `MediaController` and eventually would notify that to `MediaControlKeySource`

Differential Revision: https://phabricator.services.mozilla.com/D80790
2020-07-02 01:23:24 +00:00
alwu 934302cd0d Bug 1640998 - part9 : use `MediaControlKey` to replace `MediaControlKeysEvent` r=chunmin,agi,geckoview-reviewers
This patch will
- remove `MediaControlKeysEvent` and use `MediaControlKey` to replace it
- rename names for all `MediaControlKey` related methods, functions, classes and descriptions

The advantage of doing so are
- remove the duplicated type so that we only need to maintain `MediaControlKey`

Differential Revision: https://phabricator.services.mozilla.com/D78140
2020-06-09 02:59:57 +00:00
alwu d05ba91da0 Bug 1640998 - part4 : update supported action changes from the content process. r=chunmin
This patch will
- tell the media controll supported action changes when media session updates its action handler

The advantage of doing so are
- to sync the status between media session in content process and the `MediaSessionInfo` in chrome process

Differential Revision: https://phabricator.services.mozilla.com/D77199
2020-06-08 22:16:46 +00:00
alwu 337718365e Bug 1640998 - part2 : use `ContentMediaAgent` to update media session's related information. r=chunmin
This patch will
- `ContentMediaAgent` as the only class to propagate the information to chrome process

The advantage of doing so are
- to group all methods involving IPC in one place, that would be easier to see what information would be propagated to chrome process

Differential Revision: https://phabricator.services.mozilla.com/D77197
2020-06-08 18:50:45 +00:00
alwu fa7fe1ff9d Bug 1627999 - part6 : modify 'test_trigger_actionhanlder.html'. r=bryce
This patch will do :
- play media from different frame, rather than alway playing media from the main frame

The advantage of doing so :
- to make the media session in child frame become the active media session because that can only be the context with the audio focus

Differential Revision: https://phabricator.services.mozilla.com/D72500
2020-05-15 21:49:54 +00:00
alwu b37d0955bb Bug 1627999 - part5 : remove out-of-date test. r=bryce
This patch will do :
- remove out-of-date test that uses the previous implementation of determining the active media session

The advantage of doing so :
- prevent the failure causing by out-of-date test

Differential Revision: https://phabricator.services.mozilla.com/D72499
2020-05-15 21:49:56 +00:00
Csoregi Natalia b6df18cc7a Backed out 9 changesets (bug 1627999) for bustages on HTMLMediaElement.cpp. CLOSED TREE
Backed out changeset 05ba58699a1b (bug 1627999)
Backed out changeset b9025bab4036 (bug 1627999)
Backed out changeset 2e1c8f9e8f88 (bug 1627999)
Backed out changeset 55ac831f54f3 (bug 1627999)
Backed out changeset e0fa806a6942 (bug 1627999)
Backed out changeset f4d85f0b61d9 (bug 1627999)
Backed out changeset 84434656006c (bug 1627999)
Backed out changeset 021c014ba882 (bug 1627999)
Backed out changeset 76c6b64928e9 (bug 1627999)
2020-05-16 00:22:23 +03:00
alwu 973d534b7f Bug 1627999 - part6 : modify 'test_trigger_actionhanlder.html'. r=bryce
This patch will do :
- play media from different frame, rather than alway playing media from the main frame

The advantage of doing so :
- to make the media session in child frame become the active media session because that can only be the context with the audio focus

Differential Revision: https://phabricator.services.mozilla.com/D72500
2020-05-14 09:33:35 +00:00
alwu 129153228a Bug 1627999 - part5 : remove out-of-date test. r=bryce
This patch will do :
- remove out-of-date test that uses the previous implementation of determining the active media session

The advantage of doing so :
- prevent the failure causing by out-of-date test

Differential Revision: https://phabricator.services.mozilla.com/D72499
2020-05-14 09:33:37 +00:00
Cosmin Sabou 3ed8e5317b Backed out 8 changesets (bug 1627999) for wpt failures on MediaPlaybackStatus.h. CLOSED TREE
Backed out changeset 98e98e2ecb56 (bug 1627999)
Backed out changeset 5533b1c9e3ed (bug 1627999)
Backed out changeset c9c9f78e131d (bug 1627999)
Backed out changeset 37b8f7a47ede (bug 1627999)
Backed out changeset 433a0eb70fc6 (bug 1627999)
Backed out changeset 72a1340bc112 (bug 1627999)
Backed out changeset 10e3550226eb (bug 1627999)
Backed out changeset 039ecd63e3fb (bug 1627999)
2020-05-14 12:29:01 +03:00
alwu 9262f91450 Bug 1627999 - part6 : modify 'test_trigger_actionhanlder.html'. r=bryce
This patch will do :
- play media from different frame, rather than alway playing media from the main frame

The advantage of doing so :
- to make the media session in child frame become the active media session because that can only be the context with the audio focus

Differential Revision: https://phabricator.services.mozilla.com/D72500
2020-05-13 22:01:07 +00:00
alwu 8fe88f56fa Bug 1627999 - part5 : remove out-of-date test. r=bryce
This patch will do :
- remove out-of-date test that uses the previous implementation of determining the active media session

The advantage of doing so :
- prevent the failure causing by out-of-date test

Differential Revision: https://phabricator.services.mozilla.com/D72499
2020-05-12 18:23:44 +00:00
alwu ef4977969c Bug 1633010 - part8 : rename `MediaSessionController` to `MediaStatusManager` r=chunmin
This patch will do :
- rename `MediaSessionController` to `MediaStatusManager`
- move `MediaStatusManager.*` to the folder under `mediacontrol`
- update the comment for `MediaStatusManager`

The advantage of doing so :
- increase the readability

More details :
We've extended the responsibility of `MediaSessionController` and it now handle a broader concept of media related status, not just media session related. Therefore, renaming it to precisely represent o its responsibility.

Differential Revision: https://phabricator.services.mozilla.com/D73493
2020-05-13 22:09:23 +00:00
alwu 97b23b9267 Bug 1633010 - part7 : rename variables and remove unnecessary spaces r=chunmin
This patch will do :
- rename variables and remove unnecessary spaces

The advantage of doing so :
- increase the readability

Differential Revision: https://phabricator.services.mozilla.com/D73491
2020-05-13 22:08:40 +00:00
alwu 2ae724e750 Bug 1633010 - part6 : use `IMediaController` if we only want to access control related methods r=chunmin
This patch will do :
- create an interface `IMediaController` including only control related methods

The advantage of doing so :
- It's clear to use `IMediaController` as the only surface to control media
- explictly restrict which functions are available which can avoid using control related functions on those situations

Differential Revision: https://phabricator.services.mozilla.com/D73490
2020-05-13 22:08:01 +00:00
alwu af00afa1f0 Bug 1633010 - part5 : extend `IMediaInfoUpdater`. r=chunmin
This patch will do :
- make all functions which are used to update information from the content process become a part of `IMediaInfoUpdater`

The advantage of doing so :
- It's clear to use `IMediaInfoUpdater` as the only surface to update the media related status
- explictly restrict which functions are available which can avoid using control related functions on those situations

Differential Revision: https://phabricator.services.mozilla.com/D73489
2020-05-13 22:07:44 +00:00
alwu 12e184256b Bug 1633010 - part4 : move declared and guessed playback state into `MediaSessionController`. r=chunmin
This patch will do :
- move the logic of determining `actual playback state` to `MediaSessionController`

The advantage of doing so :
- increate the cohesion of `MediaSessionController` because it should be the class to determine the final playback status, not `MediaController`

Differential Revision: https://phabricator.services.mozilla.com/D73488
2020-05-13 21:18:06 +00:00
alwu 329f82761a Bug 1633010 - part3 : move MediaPlaybackStatus to MediaSessionController. r=chunmin
This patch will do :
- move the instance of `MediaPlaybackStatus` to the `MediaSessionController` to allow `MediaSessionController` handle all media related status

The advantage of doing so :
- encapsulate all media related status details to `MediaSessionController` and simplify the code in `MediaController`

Differential Revision: https://phabricator.services.mozilla.com/D73487
2020-05-13 20:58:02 +00:00
Neil Deakin c0e5a6c003 Bug 1594752, expose WindowGlobalParent's document title attribute to script, and fire a pagetitlechanged event on the frame/browser when it changes, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D72561
2020-05-13 19:25:45 +00:00
Mihai Alexandru Michis 7686b00958 Backed out 2 changesets (bug 1594752) for causing failures in browser_e10s_switchbrowser.js
CLOSED TREE

Backed out changeset b54107a687e4 (bug 1594752)
Backed out changeset 801d1e226947 (bug 1594752)
2020-05-11 18:11:24 +03:00
Neil Deakin effc8401b2 Bug 1594752, expose WindowGlobalParent's document title attribute to script, and fire a pagetitlechanged event on the frame/browser when it changes, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D72561
2020-05-11 11:24:16 +00:00