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

5511 Коммитов

Автор SHA1 Сообщение Дата
David Parks 3c0d56e32c Bug 1675349: Forbid elements representing blocked plugins from accepting focus r=jmathies
As part of the fallback for unsupported plugin elements, we deny them focus.  Since elements can be programmatically changed, and object/embed elements can change internal "type" by updating their data/src attributes, and because that type is decided asynchronously, we may need to give up focus if our element has it.

Differential Revision: https://phabricator.services.mozilla.com/D95903
2020-11-18 03:04:02 +00:00
Mihai Alexandru Michis caac1f82ff Bug 1677799 - Re-skip failing fission tests in dom/html/test/* a=fix
CLOSED TREE
2020-11-17 19:51:43 +02:00
Peter Van der Beken ea7daa934e Bug 1677483 - Reenable some tests that are now succeeding with Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97267
2020-11-17 10:25:51 +00:00
Mihai Alexandru Michis d06ca5f7d1 Backed out changeset e4b67fc1f101 (bug 1677483) for causing multiple mochitest plain failures.
CLOSED TREE
2020-11-17 19:29:26 +02:00
Peter Van der Beken 75190a1035 Bug 1677483 - Reenable some tests that are now succeeding with Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97267
2020-11-17 10:25:51 +00:00
Razvan Maries d92ef717a6 Backed out 2 changesets (bug 1338637) for perma failures on test_webkitdirectory.html. CLOSED TREE
Backed out changeset 5bddcb99f650 (bug 1338637)
Backed out changeset 5c29fd30af97 (bug 1338637)
2020-11-16 18:49:34 +02:00
pbz 574bf71758 Bug 1338637 - Ask user for confirmation before folder upload. r=Gijs,geckoview-reviewers,agi,baku
Differential Revision: https://phabricator.services.mozilla.com/D95324
2020-11-16 09:33:43 +00:00
Kagami Sascha Rosylight 0c28c71544 Bug 1677254 - Make select event from select() uncancelable r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D97068
2020-11-15 02:32:22 +00:00
Emilio Cobos Álvarez ac6e97d5f9 Bug 1618639 - Make focus-visible match the spec more closely. r=edgar
The spec text has been improved a while ago, so I think we should do
this. This keeps the current moz-focusring behavior when the pref is
disabled, but when enabled it becomes effectively an alias of
focus-visible.

Differential Revision: https://phabricator.services.mozilla.com/D96697
2020-11-13 12:53:45 +00:00
Makoto Kato 01848f9cac Bug 1673434 - change event isn't always user interaction event. r=edgar,masayuki
Software keyboard is shown by user interaction. But `change` event by
`element.click()` becomes user interaction event by bug 1543439 even if
it is called by script.

Since `change` event can be fired by click() method, we shouldn't be
that it is always user interaction.

Also, we have setUserInput that is chrome API to emulate user input. It
should be defined as user interaction.

Differential Revision: https://phabricator.services.mozilla.com/D95818
2020-11-09 09:04:22 +00:00
Makoto Kato 350116618e Bug 1667493 - Locale service shouldn't shutdown during normal shutting down phase. r=jfkthame
Although ICUUtils uses LocaleService, LocaleService will be shut down before
shut down observer.

DOM might use Locale Service by UnbindFromTree. So LocaleService should be
shut down by ShutdownPhase::ShutdownPostLastCycleCollection.

Differential Revision: https://phabricator.services.mozilla.com/D94944
2020-11-11 03:33:04 +00:00
Mirko Brodesser d057e5c3ee Bug 1657979: don't skip "test_bug277724.html" for Fission. r=smaug
Because it passes and finishes now.

Differential Revision: https://phabricator.services.mozilla.com/D96529
2020-11-10 12:00:07 +00:00
alwu 9d84da2096 Bug 1675326 - part1 : move webvtt related files into `dom/media/webvtt`. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D96103
2020-11-09 15:47:07 +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
Ting-Yu Lin 2f869ac046 Bug 1674863 Part 1 - Improve type safety for APIs computing video's intrinsic size and ratio. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95577
2020-11-03 19:54:41 +00:00
Lee Salzman d1f364349a Bug 1621454 - adjust fuzz for SWGL span shaders. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D95325
2020-10-31 13:30:57 +00:00
Butkovits Atila c4646c9aa3 Backed out 4 changesets (bug 1621454) for causing bustage src/swgl_ext.h. a=backout
Backed out changeset d0d03d5a81a8 (bug 1621454)
Backed out changeset 6675f76d6f11 (bug 1621454)
Backed out changeset 29943d5348df (bug 1621454)
Backed out changeset 80c0aaa81c2e (bug 1621454)
2020-10-31 12:28:47 +02:00
Lee Salzman 00b039a687 Bug 1621454 - adjust fuzz for SWGL span shaders. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D95325
2020-10-31 02:28:08 +00:00
Andi-Bogdan Postelnicu 6381129ef6 Bug 1671641 - Make `dom/html` buildable outside of `unified-build` environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D94945
2020-10-28 12:24:01 +00:00
Emilio Cobos Álvarez e5a63697bf Bug 1673707 - Simplify handling of the suspendMediaWhenInactive flag. r=nika
Make it a synced field on the top browsing context. This handling the
propagation right and is much simpler.

This should fix cases where we don't look at the top level docshell to
figure out if we should suspend media.

Differential Revision: https://phabricator.services.mozilla.com/D94878
2020-10-27 19:55:47 +00:00
Kagami Sascha Rosylight 34dff9ebd1 Bug 1659218 - Prevent activating disabled inputs via dispatchEvent r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87151
2020-10-27 09:17:08 +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 583371e227 Backed out changeset 27cf2fe77ed0 (bug 1672964) for test_viewport_resize.html failures CLOSED TREE 2020-10-24 03:54:23 +03: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
Olli Pettay ab8de90ff7 Bug 1672964 - [Fission] enable test_viewport_resize.html, r=annyG
Differential Revision: https://phabricator.services.mozilla.com/D94581
2020-10-23 13:41:10 +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
Anny Gakhokidze 6e46ff4d2a Bug 1670137 - Don't remove sh entries for subframes that are switching processes, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D94148
2020-10-21 15:25:47 +00:00
Masayuki Nakano 04027a5656 Bug 1607131 - Make `beforeinput` event for `MozEditableElement.setUserInput()` not cancelable by default r=smaug
Blink and WebKit do not fire `beforeinput` event when user uses build-in
password manager and autocomplete.  But the `inputType` value for this case,
`"insertReplacementText"` is defined as cancelable in the spec, and it's
actually cancelable when it's fired for correcting a word with built-in
spellchecker of them.

For making only our users' autocomplete and password manager not blocked by
web apps, we should make them not cancelable by default, but I think that we
should keep dispatching such non-cancelable `beforeinput` for conforming to
the standard unless we'd get a web-compat report for this.

Differential Revision: https://phabricator.services.mozilla.com/D93206
2020-10-20 00:13:43 +00:00
Andreas Pehrson 8b6f27b098 Bug 1582294 - Implement MediaStreamTrackSource::HasAlpha for HTMLCanvasElement sources. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D92900
2020-10-16 19:20:20 +00:00
Andreas Pehrson d1aeaca86a Bug 1582294 - Implement MediaStreamTrackSource::HasAlpha for MediaDecoder sources. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D92899
2020-10-19 15:35:29 +00:00
Andreas Pehrson d5227f851c Bug 1582294 - Set up HTMLMediaElement to convey video track alpha channel when playing a MediaStream. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D92898
2020-10-19 15:35:13 +00:00
Anny Gakhokidze 395d747ad6 Bug 1671179 - Make test_bug636336.html xorigin compatible, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D93604
2020-10-15 15:52:41 +00:00
Edgar Chen 07458c65e6 Bug 1670919 - Cleanup some code around nsIFormControl::GetFormElement; r=emilio
nsIFormControl::GetFormElement now returns HTMLFormElement*, we could remove
some type convertion.

Differential Revision: https://phabricator.services.mozilla.com/D93349
2020-10-13 15:15:57 +00:00
Kartikaya Gupta 264e82488a Bug 1670003 - Add back the scroll input methods telemetry. r=botond
This is mostly a revert of the patch in bug 1425686 that removed the old
probe, but rebased to new code locations and clang-formatted. The histogram
entry is also updated with new bug numbers and fields.

The next patch will refine some of these telemetry recording points; the patch
is split into two for easier reviewing as this part is basically what landed
originally.

Differential Revision: https://phabricator.services.mozilla.com/D92995
2020-10-10 17:41:47 +00:00
Chun-Min Chang 9d1970b6ea Bug 1646719 - P1: Add more debugging logs r=gerald
Add some logs that can help us to check how many cache-streams are
suspended and the working status in `MediaCache::Update`

Differential Revision: https://phabricator.services.mozilla.com/D92124
2020-10-04 07:19:18 +00:00
Masayuki Nakano 2fde14a338 Bug 1623918 - part 2: Mark `nsINode::GetSelectionRootContent()` and its root callers as `MOZ_CAN_RUN_SCRIPT` as far as possible r=smaug
This patch tries to mark root callers of `nsINode::GetSelectionRootContent()`
which calls `nsINode::GetAnonymousRootElementOfTextEditor()` as far as possible
(and reasonable).

It's used by `ContentEventHandler` so that a lot of methods of
`EventStateManager`, `ContentEventHandler`, `IMEContentObserver` which are main
users of it are also marked as `MOZ_CAN_RUN_SCRIPT`.  I think that this is
reasonable.

On the other hand, it might not be reasonable to mark `IMEStateManager` methods
as `MOZ_CAN_RUN_SCRIPT` for initializing `IMEContentObserver` because
`IMEStateManager` may be able to initialize `IMEContentObserver` asynchronously
and its root callers are in XUL layout code.  Therefore, this patch uses
`MOZ_CAN_RUN_SCRIPT_BOUNDARY` for `IMEStateManager` at least for now.

Differential Revision: https://phabricator.services.mozilla.com/D92730
2020-10-09 02:37:47 +00:00
Christoph Kerschbaumer faf05f7d19 Bug 1552168: Remove pref security.data_uri.unique_opaque_origin. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92087
2020-10-08 16:55:25 +00:00
Mirko Brodesser 688e66ebed Bug 1662718: enable "test_input_hasBeenTypePassword_navigation.html" for xorigin iframes with Fission. r=smaug
Requires bug 1662410 (removing `LegacySHistory`) and bug 1656208 (session history
in parent).

Differential Revision: https://phabricator.services.mozilla.com/D90378
2020-09-16 10:52:00 +00:00
Narcis Beleuzu c163b394ef Backed out 2 changesets (bug 1623918) for crashtest failure on 1623918.html CLOSED TREE
Backed out changeset 519ca1b069e5 (bug 1623918)
Backed out changeset d8a09a5fea47 (bug 1623918)
2020-10-08 12:06:58 +03:00
Masayuki Nakano da386ef224 Bug 1623918 - part 2: Mark `nsINode::GetSelectionRootContent()` and its root callers as `MOZ_CAN_RUN_SCRIPT` as far as possible r=smaug
This patch tries to mark root callers of `nsINode::GetSelectionRootContent()`
which calls `nsINode::GetAnonymousRootElementOfTextEditor()` as far as possible
(and reasonable).

It's used by `ContentEventHandler` so that a lot of methods of
`EventStateManager`, `ContentEventHandler`, `IMEContentObserver` which are main
users of it are also marked as `MOZ_CAN_RUN_SCRIPT`.  I think that this is
reasonable.

On the other hand, it might not be reasonable to mark `IMEStateManager` methods
as `MOZ_CAN_RUN_SCRIPT` for initializing `IMEContentObserver` because
`IMEStateManager` may be able to initialize `IMEContentObserver` asynchronously
and its root callers are in XUL layout code.  Therefore, this patch uses
`MOZ_CAN_RUN_SCRIPT_BOUNDARY` for `IMEStateManager` at least for now.

Differential Revision: https://phabricator.services.mozilla.com/D92730
2020-10-08 03:56:51 +00:00
Kris Taeleman 6a63bb1d8a Bug 1656987 - Only cast and call CanvasLayer::Update() if the layer is a CanvasLayer. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D92160
2020-10-02 18:45:14 +00:00
Matt Woodrow e94ba17c2e Bug 1660928 - Record video play time telemetry if we had a non-empty video track at any point. r=jya
YouTube frequently uses the same <video> element for sequential videos and ads. We want to record telemetry if any of these were non-empty, not only consider the last one played when the tab is closed.

Differential Revision: https://phabricator.services.mozilla.com/D88098
2020-10-06 01:47:14 +00:00
Masayuki Nakano 460693d57f Bug 1668990 - Make `test_input_event.html` use `addEventListener` instead of event handler attributes r=smaug
Not sure what's different from early beta, in late beta, it's too late to
create elements at the `DOMContentLoaded` event listener for using
`onbeforeinput` event handler attribute.

Different from `test_clipboard_events.html`, this test adds all event listeners
at initialization and never removes them.  Therefore, we can simply make the
test use `addEventListener` instead.

Differential Revision: https://phabricator.services.mozilla.com/D92395
2020-10-05 11:15:45 +00:00
Marcos Cáceres a9ea25e663 Bug 1665252 - remove allowpaymentrequest attribute from HTMLIFrameElement r=dom-workers-and-storage-reviewers,smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D90505
2020-10-05 05:45:38 +00:00
Olli Pettay 34f1de3fc9 Bug 1668809 - Disable some intermittently failing tests, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D92231
2020-10-02 13:57:05 +00:00
Masayuki Nakano d8088f6709 Bug 1609291 - Make `test_input_event.html` put off to initialize elements whose `onbeforeinput` will be used r=smaug
The test enables `beforeinput` pref at getting focus.  However, before that,
each element whose `onbeforeinput` is used to check the test result is created
and whose `onbeforeinput` is set.  In this order, `onbeforeinput` isn't
available as an event listener attribute.

This patch makes the test create and initialize `<input>` and `<textarea>`
elements after enabling `beforeinput`.

Differential Revision: https://phabricator.services.mozilla.com/D91861
2020-10-01 07:37:08 +00:00
Olli Pettay 8a508eaa66 Bug 1668357 - Disable tests which fail when fission and session-history-in-parent are enabled, r=peterv,marionette-reviewers,whimboo
In many cases with wpt, most of the tests in the file pass, but it is rather time consuming to annotate
.ini files case by case.

Differential Revision: https://phabricator.services.mozilla.com/D91977
2020-10-01 10:23:47 +00:00
Sebastian Hengst 0cf7e55237 Backed out changeset 0b7c8f6349b1 (bug 1667743) on request from kershaw for causing bug 1667801 2020-09-30 13:12:53 +02:00
Kershaw Chang 5eabf77a18 Bug 1667743 - Remove unused esni code r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D91571
2020-09-28 17:21:39 +00:00
Edgar Chen 3af8ce6d7a Bug 1667081 - Part 1: Replace usage of nsIFocusManager with nsFocusManager; r=hsivonen
This patch is bascially done by:
perl -p -i -e "s/nsIFocusManager\* /nsFocusManager* /g;" $( find . -name *.cpp )
perl -p -i -e "s/nsCOMPtr<nsIFocusManager>/RefPtr<nsFocusManager>/g;" $( find . -name *.cpp )

Differential Revision: https://phabricator.services.mozilla.com/D91287
2020-09-29 07:21:09 +00:00
Bogdan Tara 8f6c53bdf5 Backed out 9 changesets (bug 1667081) for assertion failure on nsFocusManager CLOSED TREE
Backed out changeset 156ab3eba505 (bug 1667081)
Backed out changeset 2e37f347082c (bug 1667081)
Backed out changeset 8f59cef879ae (bug 1667081)
Backed out changeset 1298ff140218 (bug 1667081)
Backed out changeset 91342c822425 (bug 1667081)
Backed out changeset aafb1878c590 (bug 1667081)
Backed out changeset 2252e975f0d7 (bug 1667081)
Backed out changeset c3bac5f407d2 (bug 1667081)
Backed out changeset b1e6e81396ae (bug 1667081)
2020-09-28 20:02:52 +03:00
Edgar Chen 6abd74544d Bug 1667081 - Part 1: Replace usage of nsIFocusManager with nsFocusManager; r=hsivonen
This patch is bascially done by:
perl -p -i -e "s/nsIFocusManager\* /nsFocusManager* /g;" $( find . -name *.cpp )
perl -p -i -e "s/nsCOMPtr<nsIFocusManager>/RefPtr<nsFocusManager>/g;" $( find . -name *.cpp )

Differential Revision: https://phabricator.services.mozilla.com/D91287
2020-09-28 14:04:12 +00:00
Markus Stange 41c70bcd59 Bug 1666617 - Add an observer description argument to AddRefreshObserver. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91082
2020-09-25 02:36:29 +00:00
alwu 06a43c8cd0 Bug 1659060 - part1 : treat lock visible if corresponding document has in use picture-in-picture element. r=bryce,smaug
When a tab is in the background, its document visibility would become invisible even if a tab owns a video which is visible because of being used in picture in picture mode.

When a document changes its visibility, the wakelock would change its lockstate from `lock-foreground` to `lock-background`. For `video-playing` wakelock topic, we would only request a real platform lock for `lock-foreground` because we don't want to prevent screen from sleeping if the video is invisible.

Therefore, considering if video is being used in picture in picture mode, when determining the wakelock's visible state. If video is still being used in picture in picture mode, then we would treat wakelock as if it's in foreground in order to keep a screen lock.

Differential Revision: https://phabricator.services.mozilla.com/D90781
2020-09-23 23:34:12 +00:00
alwu 25b9d83ca8 Bug 1652108 - part3 : remove relevant codes for 'autoplay_would_be_allowed_count' and 'autoplay_would_not_be_allowed_count'. r=bryce
We don't need `autoplay_would_be_allowed_count` and `autoplay_would_not_be_allowed_count`, so we can remove all related codes.

Differential Revision: https://phabricator.services.mozilla.com/D83227
2020-09-23 22:35:26 +00:00
alwu 37f127c8f3 Bug 1652108 - part2 : modify `page_had_media_count` to `in_page_count` r=nika,bryce
We would like to remove `page_had_media_count` and use a new probe `in_page_count` to record the total number of top level content documents using media.

Therefore, we would rename WindowContext's `DocTreeHadAudibleMedia` to `DocTreeHadMedia` in order to support the new usage.

In the future, if we want to know something like "the percentage of media element is being used for MSE/EME?", then this scalar can be the base and used to calculate the answser.

Differential Revision: https://phabricator.services.mozilla.com/D83225
2020-09-24 21:41:10 +00:00
alwu 8704182c9e Bug 1662164 - remove expired telemetry ping 'MEDIA_PLAYED_TIME_AFTER_AUTOPLAY_BLOCKED' and its related code. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D91222
2020-09-24 16:18:35 +00:00
Dorel Luca eb27bbe130 Backed out changeset a06cc26fbb60 (bug 1665252) for WPT failures in feature-policy/payment-allowed-by-feature-policy-attribute.https.sub.html. CLOSED TREE 2020-09-24 15:06:19 +03:00
Marcos Cáceres 41461b2487 Bug 1665252 - remove allowpaymentrequest attribute from HTMLIFrameElement r=dom-workers-and-storage-reviewers,smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D90505
2020-09-24 03:41:26 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Makoto Kato 3759e7c3b5 Bug 1425291 - Part 1. Implement autocapitalize attribute. r=webidl,smaug
Virtual keyboard on Android (and API level of GTK) supports autocapitalization
that is automatically capitalize words and etc.

atucapitalize attribute inherits from form element if the element is button,
fieldset, input, output, select and textarea. Its tests are included in wpt.

WebKit on iOS and Blink on Android already support this HTML attribute, so I
would like to support this on Firefox/GeckoView Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D86674
2020-09-15 14:33:27 +00:00
Kartikaya Gupta f38b3ecb1b Bug 1665955 - Stop including nsIScrollableFrame.h from Element.h. r=emilio
Changes to nsIScrollableFrame.h cause the world to rebuild which I find annoying.
This removes the inclusion into Element.h which is responsible for the
world-rebuilding and is relatively easy to eliminate. A bunch of usages of
nsIScrollableFrame get moved from .h files into .cpp files and I include the
header into .cpp files as needed.

Differential Revision: https://phabricator.services.mozilla.com/D90735
2020-09-18 18:32:13 +00:00
Bryce Seager van Dyk edc49f167b Bug 1615444 - Remove media telem histograms that expired in 74 and related code. r=alwu
Removes
- MEDIACACHESTREAM_LENGTH_KB
- MEDIA_PLAY_PROMISE_RESOLUTION
- AUDIO_TRACK_SILENCE_PROPORTION

and all the code I could find that was specific to reporting these values via
telemetry.

Differential Revision: https://phabricator.services.mozilla.com/D88868
2020-09-17 14:43:26 +00:00
Emilio Cobos Álvarez d94923f235 Bug 1664685 - Simplify HTML{Image,Input}Element.{width,height} getters. r=edgar
By moving it to nsImageLoadingContent we don't need to pass a reference
to the current request and can just use the member.

The weird reference-passing was introduced in bug 987140 and broke in
bug 1534608.

Also make it return a CSSIntSize rather than an nsSize, since it's what
it returns, nsSize is supposed to be in app units, not in CSS pixels :-)

Differential Revision: https://phabricator.services.mozilla.com/D90036
2020-09-15 09:04:59 +00:00
Bryce Seager van Dyk dad3db465a Bug 1662212 - Add telemetry to track play time of encrypted HTMLMediaElements. r=drno
Add 3 probes
- Play time for encrypted elements.
- Play time for Clearkey elements.
- Play time for Widevine elements.

Differential Revision: https://phabricator.services.mozilla.com/D88895
2020-09-10 22:04:39 +00:00
Jeff Walden 933368cb18 Bug 1663365 - Move DOM proxy-related details (including expand support) to separate headers out of jsfriendapi.h. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89336
2020-09-08 22:57:14 +00:00
Emilio Cobos Álvarez e3494dcc5d Bug 1663140 - Don't block on window.print() if there are print callbacks. r=smaug
Not really a fan of this, but I can't think of a better alternative
really... Ideas welcome :)

The main issue is that in bug 1662975 we made window.print() not return
until the user has closed the print / print preview dialog (as it is
needed for some use cases). This matches other browsers, too.

We use an nsAutoSyncOperation here, in order not to violate the
run-to-completion invariants, which turns off micro-tasks, timers,
etc... However we'd still want promises inside mozPrintCallback to
resolve and such, which is a bit contradictory. It is really awkward to
have this behavior change based on whether we have a print callback...

Differential Revision: https://phabricator.services.mozilla.com/D89298
2020-09-06 10:57:48 +00:00
Narcis Beleuzu ace5336843 Backed out changeset 45df7207f4e1 (bug 1663140) for bc failure on browser_window_print.js 2020-09-06 05:43:56 +03:00
Emilio Cobos Álvarez 8e44628eb6 Bug 1663140 - Don't block on window.print() if there are print callbacks. r=smaug
Not really a fan of this, but I can't think of a better alternative
really... Ideas welcome :)

The main issue is that in bug 1662975 we made window.print() not return
until the user has closed the print / print preview dialog (as it is
needed for some use cases). This matches other browsers, too.

We use an nsAutoSyncOperation here, in order not to violate the
run-to-completion invariants, which turns off micro-tasks, timers,
etc... However we'd still want promises inside mozPrintCallback to
resolve and such, which is a bit contradictory. It is really awkward to
have this behavior change based on whether we have a print callback...

Differential Revision: https://phabricator.services.mozilla.com/D89298
2020-09-06 00:54:08 +00:00
Hiroyuki Ikezoe ab59636fca Bug 1663053 - Bail out from HTMLCanvasElement::CallPrintCallback is `mPrintState` has already destroyed. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D89264
2020-09-03 22:53:40 +00:00
Emilio Cobos Álvarez 97ac4d259f Bug 1662456 - Remove HTMLCanvasElement::CountContexts and related code. r=nical
Canvas only has one context, and that assumption is pretty baked into
the code, so having an API that pretends otherwise is silly.

Differential Revision: https://phabricator.services.mozilla.com/D88990
2020-09-02 14:20:50 +00:00
Emilio Cobos Álvarez a29afe9b5a Bug 1658302 - Don't reframe for changes to the placeholder attribute value. r=masayuki
We still reframe for additions / removals of the attribute because that
makes us create the placeholder <div>. We could avoid it if we created
it independently of the presence of the attribute but that seems like it
could regress perf for the case where there's no placeholder attribute,
which is probably common enough.

Differential Revision: https://phabricator.services.mozilla.com/D88724
2020-09-01 23:03:36 +00:00
Andreea Pavel b976f57ba6 Backed out changeset 0e94014166b3 (bug 1658302) for causing bug 1662483 2020-09-02 00:44:18 +03:00
Bryce Seager van Dyk 3645d0e0bd Bug 1662210 - Remove dead MediaKeys code from MediaElement's SuspendOrResumeElement. r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D88887
2020-08-31 18:19:18 +00:00
Andreas Pehrson 222394b14b Bug 1661668 - Capture `this` in HTMLMediaElement::SetSinkId captures, for readability. r=padenot
Depends on D88820

Differential Revision: https://phabricator.services.mozilla.com/D88821
2020-08-31 15:34:09 +00:00
Andreas Pehrson 71be872132 Bug 1661668 - Rename CrossGraphManager to CrossGraphPort. r=padenot
"Manager" is vague, and it seems to mostly keep some members around rather than
managing them. Port is analogue to MediaInputPort in that it acts as a link
between two tracks. Neither type of port does very much heavy lifting -- they
are similarly dumb.

Differential Revision: https://phabricator.services.mozilla.com/D88812
2020-08-31 16:08:21 +00:00
Frederik Braun 88ca83241c Bug 1661423 - dont apply upgrade-insecure-requests to localhost form submissions r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D88577
2020-08-31 10:11:37 +00:00
Emilio Cobos Álvarez 534c76762a Bug 1658302 - Don't reframe for changes to the placeholder attribute value. r=masayuki
We still reframe for additions / removals of the attribute because that
makes us create the placeholder <div>. We could avoid it if we created
it independently of the presence of the attribute but that seems like it
could regress perf for the case where there's no placeholder attribute,
which is probably common enough.

Differential Revision: https://phabricator.services.mozilla.com/D88724
2020-08-31 07:46:56 +00:00
Anny Gakhokidze abc4db9fa9 Bug 1589102 - Part 10: Fix tests failing due to not waiting for the window load events, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D87328
2020-08-28 17:21:09 +00:00
Nika Layzell 43746c2f8f Bug 1658082 - Part 4: Add test for duplicate form submission with non-retargeted loads, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D87469
2020-08-26 19:20:19 +00:00
Andreas Pehrson a04205e495 Bug 1592539 - Use a MediaStreamRenderer to render video tracks into a secondary container. r=jib,mconley
This re-uses MediaStreamRenderer to render video into a secondary container, to
get identical logic for the clone target as for the clone source. The
MediaStreamRenderer can handle audio, currentTime and more as well, but those
are not used here.

Differential Revision: https://phabricator.services.mozilla.com/D87139
2020-08-26 14:25:40 +00:00
Andreas Pehrson 2a5941ee11 Bug 1592539 - Make MediaStreamRenderer always apply its FirstFrameVideoOutput. r=jib,karlt
The first-frame output used to only be applied when not rendering the
MediaStream, and the regular video output was applied when rendering.

The difference with this patch is when rendering -- both the first-frame and the
regular outputs are applied at the same time. The former allows one frame to go
through to the VideoFrameContainer, then the regular output takes over and lets
any frames through. Nothing in how frames are rendered should be noticable by
users.

This allows for simpler logic for resolving the visual clone target promise in a
future patch, as we won't have to track the first frame in different outputs
depending on the rendering state.

Differential Revision: https://phabricator.services.mozilla.com/D87138
2020-08-26 14:25:27 +00:00
Andreas Pehrson f1fcc6692b Bug 1592539 - Inject a FirstFrameVideoOutput into MediaStreamRenderer. r=jib
This allows different users of renderers to inject different first frame
outputs. So far there is only one, but a future patch will bring a special one
for the secondary video frame container.

Differential Revision: https://phabricator.services.mozilla.com/D87137
2020-08-26 14:25:20 +00:00
Andreas Pehrson 0c8a4d0535 Bug 1592539 - Also null out mMediaStreamRenderer in Unlink. r=bryce
I have observed async calls to the MediaStreamRenderer's mWatchManager::Unwatch()
in flight after it was Shutdown(). This would cause an assertion failure in
debug. Per the comment we should do the same in Unlink as
EndSrcMediaStreamPlayback() without creating new strong refs. This conforms to
that instruction.

I am not willing to null out the other members at this point, since at least
HTMLVideoElement's relies on the selected video track to exist in some cases.

Differential Revision: https://phabricator.services.mozilla.com/D87136
2020-08-26 14:25:08 +00:00
Andreas Pehrson 13232f716c Bug 1592539 - Move the FirstFrameListener to VideoOutput.h. r=jib
This allows the FirstFrameListener to be instantiated outside of
HTMLMediaElement. A future patch brings in a subclass in HTMLVideoElement.

This also renames FirstFrameListener to FirstFrameVideoOutput since that better
denotes what it is.

Differential Revision: https://phabricator.services.mozilla.com/D87135
2020-08-26 14:25:05 +00:00
Andreas Pehrson 0bb8c3dc1d Bug 1592539 - Move the FirstFrameListener handling to MediaStreamRenderer. r=jib
This unclutters HTMLMediaElement somewhat by putting away the logic for handling
the FirstFrameListener into MediaStreamRenderer, which is better suited for the
task.

This will allow us to use a second MediaStreamRenderer to properly track video
tracks for a secondary VideoFrameContainer.

Differential Revision: https://phabricator.services.mozilla.com/D87134
2020-08-26 14:24:55 +00:00
Emilio Cobos Álvarez cdbf0acf31 Bug 1660214 - Use CreatesDateTimeWidget() in two other places. r=smaug
I had missed these two. The NUMBER condition is dead (we early-return in
IsSingleLineTextControl above).

Differential Revision: https://phabricator.services.mozilla.com/D87721
2020-08-20 12:53:18 +00:00
Jan-Ivar Bruaroey c27b3d3a89 Bug 1652884 - Rename MediaTrack::SetEnabled to SetDisabledTrackMode. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D86070
2020-08-19 22:18:04 +00:00
Bogdan Tara 30eb420e4a Backed out 14 changesets (bug 1652884) for test_peerConnection_trackDisabling.html failures CLOSED TREE
Backed out changeset f83951453e94 (bug 1652884)
Backed out changeset fc697986d538 (bug 1652884)
Backed out changeset 20a10128b5e1 (bug 1652884)
Backed out changeset c99c32323c76 (bug 1652884)
Backed out changeset 991e8975f03d (bug 1652884)
Backed out changeset 9e9511e32cdd (bug 1652884)
Backed out changeset 605c1ac3081a (bug 1652884)
Backed out changeset dd6edf636659 (bug 1652884)
Backed out changeset 74a2f5a9eea2 (bug 1652884)
Backed out changeset b9f419aed12d (bug 1652884)
Backed out changeset 84e82e25929f (bug 1652884)
Backed out changeset 876dbad27af5 (bug 1652884)
Backed out changeset 8f60e3af2a19 (bug 1652884)
Backed out changeset de7537bda499 (bug 1652884)
2020-08-20 01:13:29 +03:00
Jan-Ivar Bruaroey 9aec15aa0d Bug 1652884 - Rename MediaTrack::SetEnabled to SetDisabledTrackMode. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D86070
2020-08-19 19:30:50 +00:00
Bogdan Tara fd6c09249f Backed out 14 changesets (bug 1652884) for VideoFrameConverter related failures CLOSED TREE
Backed out changeset 28c4e8c373f0 (bug 1652884)
Backed out changeset 658ba8f39abe (bug 1652884)
Backed out changeset 8e67fe040e4a (bug 1652884)
Backed out changeset 6f5833203763 (bug 1652884)
Backed out changeset 569ff85dfc2e (bug 1652884)
Backed out changeset eaa171643447 (bug 1652884)
Backed out changeset 6b37b60b6662 (bug 1652884)
Backed out changeset 438cce7456fb (bug 1652884)
Backed out changeset e6ed13952b67 (bug 1652884)
Backed out changeset e0b1266231bf (bug 1652884)
Backed out changeset 32f4aae2b5fe (bug 1652884)
Backed out changeset 76b4abccd61b (bug 1652884)
Backed out changeset 9010365ffa66 (bug 1652884)
Backed out changeset 763f39eb5c13 (bug 1652884)
2020-08-19 22:21:31 +03:00
Emilio Cobos Álvarez 8326e2b745 Bug 1660048 - Simplify some of the "is date or time" checks into a CreatesDateTimeWidget() member. r=smaug
Depends on D87623

Differential Revision: https://phabricator.services.mozilla.com/D87624
2020-08-19 18:19:08 +00:00
Emilio Cobos Álvarez 325d955f89 Bug 1660048 - Remove dom.forms.color and dom.forms.datetime. r=smaug,marionette-reviewers,whimboo
They're enabled in all configurations and there's no plan to change
this. With it, dom.experimental_forms is also useless, so we can remove
it too.

Differential Revision: https://phabricator.services.mozilla.com/D87623
2020-08-19 18:24:06 +00:00
Jan-Ivar Bruaroey f5e002a857 Bug 1652884 - Rename MediaTrack::SetEnabled to SetDisabledTrackMode. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D86070
2020-08-19 14:03:32 +00:00
Kagami Sascha Rosylight d2e877f6b0 Bug 1540995 - Ignore disabled labeled controls r=smaug
This patch intentionally does not ignore all click events on <input>
as web compatibility requires <input type="checkbox"> and
<input type="radio"> to mutate from `dispatchEvent()`.

Depends on D87022

Differential Revision: https://phabricator.services.mozilla.com/D87148
2020-08-17 19:42:14 +00:00
Sean Feng 85bfe3d376 Bug 1200896 - Make the document blocked by the topmost element in the top layer r=emilio
Spec: https://html.spec.whatwg.org/multipage/#blocked-by-a-modal-dialog

Depends on D86392

Differential Revision: https://phabricator.services.mozilla.com/D86227
2020-08-17 15:41:19 +00:00