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

93148 Коммитов

Автор SHA1 Сообщение Дата
Botond Ballo 9193635dca Bug 1638458 - Do not use ignoreRootScrollFrame when dispatching a contextmenu event in APZEventState. r=tnikkel
The patch also removes the ignoreRootScrollFrame option from
APZCCallbackHelper::DispatchMouseEvent() altogether as it is
no longer used.

Depends on D75735

Differential Revision: https://phabricator.services.mozilla.com/D75736
2020-05-18 03:07:12 +00:00
Botond Ballo ba458447b3 Bug 1638458 - Remove the ignoreRootScrollFrame parameter of FrameLoader.sendCrossProcessMouseEvent(). r=tnikkel
No one is setting this parameter to true any more.

Depends on D75734

Differential Revision: https://phabricator.services.mozilla.com/D75735
2020-05-18 03:05:32 +00:00
Emilio Cobos Álvarez a0a895f5d1 Bug 1638677 - Remove some minor dead code in Document::QueryCommandState. r=masayuki
Local compiler warns about the return being unreached. Remove one of the
two copy-pasta links.

Differential Revision: https://phabricator.services.mozilla.com/D75708
2020-05-17 23:52:05 +00:00
Gijs Kruitbosch 72186b2199 Bug 1638092 - do not require a browsingcontext to call the external protocol service's loadURI method, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D75543
2020-05-17 22:54:30 +00:00
Brindusan Cristian 09b8072a54 Bug 1637715 - Disable test_upgrade_add_index.html for frequent failures on Linux and Windows. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D75667
2020-05-16 09:51:08 +00:00
Nicklas Boman 4f2fa0cfa7 Bug 1515419 - fixing ToNewCString (and ToNewUnicode as well) xpcom/string/nsReadableUtils.cpp r=froydnj,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D17411
2020-05-17 06:58:48 +00:00
Cosmin Sabou b93117dadd Bug 1614436 - Disable browser_ConsoleStorageAPITests.js on linux asan for frequent failures. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D75686
2020-05-16 20:24:47 +00:00
alwu e55212e5f4 Bug 1612557 - part5 : use `MediaSampleMarkerPayload` in VideoSink. r=jolin
This patch will do :
- use `MediaSampleMarkerPayload` to replace `VideoFrameMarkerPayload`

The advantage of doing so :
- after finishing a support for `MediaSampleMarkerPayload` in profiler front-end side, we can show the sample's start and end time when hovering on the marker icon.

Differential Revision: https://phabricator.services.mozilla.com/D75469
2020-05-15 23:51:14 +00:00
alwu fd606724bc Bug 1612557 - part4 : use `Media` category for markers r=bryce,gerald,canaltinova
This patch will do :
- add `Media` markers in related codes
- implement `MediaSampleMarkerPayload` to record the media sample

The advantage of doing so :
- using markers can help us know what happens on the media by a glance without expanding the call stack
- adding sample markers allows us compare the speed of decoding sample in `MediaDecoderStataMachine` and rendering sample in `VideoSink`

Differential Revision: https://phabricator.services.mozilla.com/D74174
2020-05-16 19:58:25 +00:00
alwu 0bccc7a4cf Bug 1612557 - part2 : create a sub-category 'Cubeb'. r=padenot
This patch will do :
- create a sub-category `Cubeb`
- add  `Cubeb` profiling labels in related codes

The advantage of doing so :
- allow us to know the percentage of time respectively we spend on cubeb and non-cubeb codes

More details :
The profiling code would include `<atomic>` which is C++ only, so I can't use the label in `cubeb.c` directly. Instead, I add labels on the `AudioStream` and `AudioCallbackDriver` where we would call cubeb related methods.

Differential Revision: https://phabricator.services.mozilla.com/D74172
2020-05-11 14:08:10 +00:00
alwu 8dda6be6ef Bug 1612557 - part1 : create a profiling category `Media`. r=bryce,gerald
This patch will do :
- create a profiling category `Media`
- add  `Media` profiling labels in related codes

The advantage of doing so :
- allow us to easily see what operations are related to media playback from the profiled report

More details :
According to the description in the `ProfilingCategory.h`, `topmost profiler label frame in the label stack determines the category pair of that stack`. Therefore, most labels I added are the first task would run on the thread, in order to ensure all its following tasks can be marked as the media playback label as well.

Differential Revision: https://phabricator.services.mozilla.com/D74171
2020-05-12 17:35:19 +00:00
Emilio Cobos Álvarez 74f2dc7de8 Bug 1638127 - Remove nsGlobalWindowInner::mShowFocusRingForContent. r=edgar
Instead move the check to the focus manager, more similar to how
focus-visible works.

Now nsGlobalWindowInner::ShouldShowFocusRing means "Should we show focus
ring for anything in this window", that is: Have we keyboard-navigated
in this window, or do we have a pref that says that we should always
show focus rings.

Fix some callers appropriately (some of them that were not properly
accounting for the element being focused in the first place...).

Differential Revision: https://phabricator.services.mozilla.com/D75504
2020-05-16 18:03:54 +00:00
David Teller a0afcb3d4b Bug 1638138 - Restoring missing thread names in requestProcInfo;r=tarek
ChromeUtils::requestProcInfo was dropping thread names for the process process. This patch restores them and tests that at least *one* thread is named. Unfortunately, at the time of this writing, we cannot assume that *all*
threads are named. Investigation pending.

Differential Revision: https://phabricator.services.mozilla.com/D75420
2020-05-15 20:19:25 +00:00
Narcis Beleuzu 0c898075c2 Bug 1604538 - Disable browser_destroy_callbacks.js on OSX. r=egao
Differential Revision: https://phabricator.services.mozilla.com/D75663
2020-05-16 07:18:15 +00:00
alwu 386dc9b342 Bug 1627999 - part9 : handle the owner browsing context change for the media element. r=chunmin
This patch will do :
- update the media status when media changes its owner browsing context

The advantage of doing so :
- make the media status in `ContextMediaInfo` correcly

More details :
`ContextMediaInfo` stores the media status of each browsing context, but actually the media doesn't always need to stay in one browsing context. We can move it to other browsing contexts (iframe) by appending it to other browsing context's document body.
For example, in [1], we move the video from the main frame to another iframe.

Therefore, when we move the media to a new browsing context, we should also update its media status (controlledMedia/playing/audio number) for its previous owner browsing context.

[1] https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-move-to-other-document.html

Differential Revision: https://phabricator.services.mozilla.com/D75477
2020-05-16 00:26:20 +00:00
alwu 3c416fbc0a Bug 1627999 - part8 : remove audible check in media element. r=bryce
This patch will do :
- remove audible check from the logic of registering controller
- include audio channel affect on the media element's audible state

The advantage of doing so :
- it can help to reduce the intermittent failure during testing by earlier hooking media elements in the content process to the media controller in the chrome process

More details :
In D72497, we have added the audible check to postpone the activation of the media controller, which would ensure that we only control media after it become audible. Therefore, we can remove the previous implementation which we use to achieve that in media element.

When having that audible check in media element, it would postpone the timing of adding media element to `ContentMediaController` that causes some intermitent failures when I was writing test for bug1633565. When removing those checks, we can ensure that the media element would have always been added into `ContentMediaController` after calling `video.play()`. If the element haven't been added into `ContentMediaController`, then it would miss to handle the media key events when test generates a fake media key event, which causes an intermitent failure.

Differential Revision: https://phabricator.services.mozilla.com/D73335
2020-05-15 21:50:10 +00:00
alwu eac28634c9 Bug 1627999 - part7 : add test. r=bryce
This patch will do :
- add test cases
- introduce the test-only notification `media-displayed-metadata-changed` when the event source updates its metadata

The advantage of doing so :
- increase test coverage

Differential Revision: https://phabricator.services.mozilla.com/D72501
2020-05-15 21:50:12 +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
alwu b80c125661 Bug 1627999 - part4 : listen to the playback change from the event source. r=bryce
This patch will do :
- listen to the playback change from the event source directly

The advantage of doing so :
- more close to the real situation because the event source is where we decide the information that should be displayed the virtual control interface

Differential Revision: https://phabricator.services.mozilla.com/D72498
2020-05-15 21:49:58 +00:00
alwu 45e722d39f Bug 1627999 - part3 : activate controller when it first time becomes audible. r=bryce
This patch will do :
- postpone the timing of activating the media controller. Activate the controller after it first time becomes audible.

The advantage of doing so :
- prevent setting incorrect media metadata before the controller becomes audible

---

More details about this change :

The active media session would be chose after the context owns the audio focus. Therefore, if we would like to get the correct metadata from the media session, we should postpone the timimg of activate controller and wait until we decide the active media session then we can get the correct metadata.

Differential Revision: https://phabricator.services.mozilla.com/D72497
2020-05-15 21:50:01 +00:00
alwu 1c063b25ca Bug 1627999 - part2 : update the active media session when the owner of the audio focus changes. r=bryce
This patch will do :
- using the audio focus to decide which media session is the active media session. That is a recommend way of the spec [1].

The advantage of doing so :
- prevent to routing media control keys to incorrect media session
- prevent showing the incorrect metadata on the virtual control interface

[1] https://w3c.github.io/mediasession/#active-media-session

Differential Revision: https://phabricator.services.mozilla.com/D72496
2020-05-15 21:50:03 +00:00
alwu 7316002adb Bug 1627999 - part1 : manage the audio focus in `MediaPlaybackStatus` r=bryce
This patch will do :
- introduce a concept `audio focus` among different contexts within a tab
- determine the audio focus owner when the context becomes audible or the owner destroys

The advantage of doing so :
- the audio focus helps us to decide the active media session that would be implemented in the following part

More details:
When there are serveral contexts playing at the same time within a tab, we would like to determine an audible context from them to represent the tab, and that is the `audio focus` we mean in this bug.

Differential Revision: https://phabricator.services.mozilla.com/D72495
2020-05-15 21:50:05 +00:00
Jeff Gilbert 13e67cc06b Bug 1638163 - Reduce unnecessary GeckoContentController.h includes. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D75433
2020-05-15 21:20:48 +00:00
alwu be6b3fe17f Bug 1597450 - part2 : check autoplay permission via the top-level window context. r=bryce
This patch will do :
- replace the usage of `nsIDocShellTreeItem` with accessing the permission stored in the `WindowContext`

The advantage of doing so :
- determine the correct result for the blocking autoplay because `nsIDocShellTreeItem` is not always possible to be accessed after we enable Fission

More details :
When determining the result of the blocking autoplay, we would always check if the page is in user customized whitelist or blacklist in which we store sites domain, and the domain we check is always the top level window's domain.

For example, a page (foo.com) has an iframe (bar.com), and we allow `foo.com` to autoplay. Then, if the iframe `bar.com` wants to  autoplay from this page, we would also allow it because the main page is `foo.com`.

However, the current way of checking `nsIDocShellTreeItem` is not Fission compatible, because you can't access `nsIDocShellTreeItem` in the different process if the iframe is cross-origin. Therefore, we should remove its usage.

Differential Revision: https://phabricator.services.mozilla.com/D74512
2020-05-13 21:20:58 +00:00
alwu f9e89ee7ae Bug 1597450 - part1 : store autoplay permission on the WindowContext. r=nika
This patch will do :
- create a sync field `AutoplayPermission` on WindowContext
- update the field whenever site's the autoplay permission changes

The advantage of doing so :
- to help determine the result of the blocking autoplay correctly.

More details :
As the field would be automatically synced between processes, then we can know the correct site's autoplay permission for the whole page even if we're in the different process if the iframe is in different origin after we enable Fission.

Differential Revision: https://phabricator.services.mozilla.com/D74511
2020-05-15 21:18:07 +00:00
Csoregi Natalia 4302fa80f7 Backed out changeset a8850a0ffab1 (bug 1638127) for failures on test_focusrings.xhtml. CLOSED TREE 2020-05-16 00:44:59 +03: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 e71fdbe9e6 Bug 1627999 - part9 : handle the owner browsing context change for the media element. r=chunmin
This patch will do :
- update the media status when media changes its owner browsing context

The advantage of doing so :
- make the media status in `ContextMediaInfo` correcly

More details :
`ContextMediaInfo` stores the media status of each browsing context, but actually the media doesn't always need to stay in one browsing context. We can move it to other browsing contexts (iframe) by appending it to other browsing context's document body.
For example, in [1], we move the video from the main frame to another iframe.

Therefore, when we move the media to a new browsing context, we should also update its media status (controlledMedia/playing/audio number) for its previous owner browsing context.

[1] https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-move-to-other-document.html

Differential Revision: https://phabricator.services.mozilla.com/D75477
2020-05-15 21:00:45 +00:00
alwu 8c97b84395 Bug 1627999 - part8 : remove audible check in media element. r=bryce
This patch will do :
- remove audible check from the logic of registering controller
- include audio channel affect on the media element's audible state

The advantage of doing so :
- it can help to reduce the intermittent failure during testing by earlier hooking media elements in the content process to the media controller in the chrome process

More details :
In D72497, we have added the audible check to postpone the activation of the media controller, which would ensure that we only control media after it become audible. Therefore, we can remove the previous implementation which we use to achieve that in media element.

When having that audible check in media element, it would postpone the timing of adding media element to `ContentMediaController` that causes some intermitent failures when I was writing test for bug1633565. When removing those checks, we can ensure that the media element would have always been added into `ContentMediaController` after calling `video.play()`. If the element haven't been added into `ContentMediaController`, then it would miss to handle the media key events when test generates a fake media key event, which causes an intermitent failure.

Differential Revision: https://phabricator.services.mozilla.com/D73335
2020-05-15 21:00:45 +00:00
alwu b476c3cdfd Bug 1627999 - part7 : add test. r=bryce
This patch will do :
- add test cases
- introduce the test-only notification `media-displayed-metadata-changed` when the event source updates its metadata

The advantage of doing so :
- increase test coverage

Differential Revision: https://phabricator.services.mozilla.com/D72501
2020-05-14 09:33:32 +00: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
alwu fb72912836 Bug 1627999 - part4 : listen to the playback change from the event source. r=bryce
This patch will do :
- listen to the playback change from the event source directly

The advantage of doing so :
- more close to the real situation because the event source is where we decide the information that should be displayed the virtual control interface

Differential Revision: https://phabricator.services.mozilla.com/D72498
2020-05-14 09:33:39 +00:00
alwu 96b2a42335 Bug 1627999 - part3 : activate controller when it first time becomes audible. r=bryce
This patch will do :
- postpone the timing of activating the media controller. Activate the controller after it first time becomes audible.

The advantage of doing so :
- prevent setting incorrect media metadata before the controller becomes audible

---

More details about this change :

The active media session would be chose after the context owns the audio focus. Therefore, if we would like to get the correct metadata from the media session, we should postpone the timimg of activate controller and wait until we decide the active media session then we can get the correct metadata.

Differential Revision: https://phabricator.services.mozilla.com/D72497
2020-05-14 09:33:42 +00:00
alwu 93c8fed2d1 Bug 1627999 - part2 : update the active media session when the owner of the audio focus changes. r=bryce
This patch will do :
- using the audio focus to decide which media session is the active media session. That is a recommend way of the spec [1].

The advantage of doing so :
- prevent to routing media control keys to incorrect media session
- prevent showing the incorrect metadata on the virtual control interface

[1] https://w3c.github.io/mediasession/#active-media-session

Differential Revision: https://phabricator.services.mozilla.com/D72496
2020-05-14 09:33:44 +00:00
alwu 88d192705c Bug 1627999 - part1 : manage the audio focus in `MediaPlaybackStatus` r=bryce
This patch will do :
- introduce a concept `audio focus` among different contexts within a tab
- determine the audio focus owner when the context becomes audible or the owner destroys

The advantage of doing so :
- the audio focus helps us to decide the active media session that would be implemented in the following part

More details:
When there are serveral contexts playing at the same time within a tab, we would like to determine an audible context from them to represent the tab, and that is the `audio focus` we mean in this bug.

Differential Revision: https://phabricator.services.mozilla.com/D72495
2020-05-14 09:33:47 +00:00
Csoregi Natalia 29948708ee Backed out changeset cec3221b9268 (bug 1638163) for causing bustages on APZCTreeManagerChild.cpp. CLOSED TREE 2020-05-15 23:28:13 +03:00
Tom Schuster a5a57442ed Bug 1636590 - Expose isPromiseRejection on nsIScriptError. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D74549
2020-05-15 20:18:34 +00:00
Tom Schuster 16d853c816 Bug 1636590 - Provide an exception stack for uncaught promises rejections. r=baku
This will improve error message information when the rejection value is not an erorr object.

Differential Revision: https://phabricator.services.mozilla.com/D74479
2020-05-15 20:11:30 +00:00
Emilio Cobos Álvarez f1b1884de4 Bug 1638127 - Remove nsGlobalWindowInner::mShowFocusRingForContent. r=edgar
Instead move the check to the focus manager, more similar to how
focus-visible works.

Now nsGlobalWindowInner::ShouldShowFocusRing means "Should we show focus
ring for anything in this window", that is: Have we keyboard-navigated
in this window, or do we have a pref that says that we should always
show focus rings.

Fix some callers appropriately (some of them that were not properly
accounting for the element being focused in the first place...).

Differential Revision: https://phabricator.services.mozilla.com/D75504
2020-05-15 20:12:14 +00:00
Andrea Marchesini d3645b765f Bug 1637857 - URLSearchParams serialized for XHR in workers, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D74712
2020-05-15 20:04:54 +00:00
Jeff Gilbert 617cc85ba0 Bug 1638163 - Reduce unnecessary GeckoContentController.h includes. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D75433
2020-05-15 19:25:44 +00:00
Emilio Cobos Álvarez ab92960118 Bug 1638127 - Minor cleanup around nsWindowRoot. r=edgar
Depends on D75501

Differential Revision: https://phabricator.services.mozilla.com/D75502
2020-05-15 19:04:42 +00:00
Aaron Klotz 7a8903706b Bug 1637452: Part 17 - Fix JNI includes in dom; r=nika
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75380
2020-05-15 17:06:28 +00:00
Aaron Klotz b66ad1f151 Bug 1637452: Part 15 - Fix JNI includes in dom/webauthn; r=keeler,jcj
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75378
2020-05-15 17:06:07 +00:00
Aaron Klotz 0894f56add Bug 1637452: Part 11 - Fix JNI includes in dom/media; r=jya
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75374
2020-05-15 17:05:12 +00:00
Aaron Klotz be11f78f6a Bug 1637452: Part 10 - Fix JNI includes in dom/ipc; r=nika
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75373
2020-05-15 17:04:44 +00:00
Razvan Maries 481517ce87 Backed out 2 changesets (bug 1558394) for perma failures on iframe_sandbox_anchor_download_block_downloads.sub.tentative.html. CLOSED TREE
Backed out changeset 79046ff8143b (bug 1558394)
Backed out changeset e13ede3c68d4 (bug 1558394)
2020-05-15 19:18:34 +03:00
Dan Minor 746e5a3557 Bug 1632489 - Negotiate repaired-rtp-stream-id in simulcast mochitests; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D74841
2020-05-15 12:11:41 +00:00