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

141 Коммитов

Автор SHA1 Сообщение Дата
Nicolas Chevobbe 2a26b6068f Bug 1801199 - Record install telemetry event for SitePermsAddons. r=rpl.
This is done by calling `AddonManagerPrivate.callInstallListeners` when we handle
`SitePermsAddonInstall`'s specific listeners.
We take this as an opportunity to remove support for the `onDownloadEnded` event
as it didn't do anything and isn't something we want to record for SitePermsAddon.
We also set `SitePermsAddonInstall#installId` which is used in `AMTelemetry`.

Assertions on registered telemetry events are added in browser_midi_permission_gated.js,
and a test case is added to ensure cancelling the event from the second popup works
as expected, since it wasn't checked before.

Differential Revision: https://phabricator.services.mozilla.com/D162412
2022-11-21 16:10:38 +00:00
Bobby Holley f76ebbd777 Bug 1800576 — Site permission consent flow should describe the nature of the add-on in the first panel. r=rpl,flod
Differential Revision: https://phabricator.services.mozilla.com/D162069
2022-11-15 19:15:28 +00:00
Bobby Holley cb6b95c527 Bug 1799793 — Link to separate SUMO article for site permission add-ons. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D161649
2022-11-09 21:28:30 +00:00
Bobby Holley b838a68586 Bug 1799529 - Tweak consent flow for site permission addons. r=rpl,flod
Differential Revision: https://phabricator.services.mozilla.com/D161520
2022-11-08 17:00:08 +00:00
nchevobbe 7ecb07e081 Bug 1790313 - Tweak localized messages for SitePermsAddon install flow. r=rpl.
This patch adds a specific path for getting the localized text for the addon
install prompt for SitePermissionsAddon.
As the message that we want isn't very generic, each gated permission will have
its own localized addon prompt message.

Differential Revision: https://phabricator.services.mozilla.com/D160452
2022-11-04 19:21:33 +00:00
Iulian Moraru ff81813adf Backed out 2 changesets (bug 1790313) for causing xpcshell failures on test_sitePermsAddonProvider.js. CLOSED TREE
Backed out changeset 6ddfdcdfe372 (bug 1790313)
Backed out changeset 0d95f36cb7d7 (bug 1790313)
2022-11-04 20:11:16 +02:00
nchevobbe 93d10b6337 Bug 1790313 - Tweak localized messages for SitePermsAddon install flow. r=rpl.
This patch adds a specific path for getting the localized text for the addon
install prompt for SitePermissionsAddon.
As the message that we want isn't very generic, each gated permission will have
its own localized addon prompt message.

Differential Revision: https://phabricator.services.mozilla.com/D160452
2022-11-04 17:08:35 +00:00
Bobby Holley 29e1d1921d Bug 1797020 - Only display the consent flow if the user has at least one MIDI devices. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D160975
2022-11-02 17:35:51 +00:00
Bobby Holley e8d791fac7 Bug 1797020 - Add an API to determine if there are any midi devices. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D160974
2022-11-02 17:35:51 +00:00
Gabriele Svelto f41dd2fc07 Bug 1798097 - Hide the Microsoft MIDI soft synthesizer from the list of outputs surfaced by WebMIDI r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D160736
2022-10-31 09:34:48 +00:00
nchevobbe 7a6fd20bad Bug 1797716 - Fix failure for browser_midi_permission_gated.js. r=gsvelto.
The test was failing if repeated because we weren't removing the midi permission during cleanup.

Depends on D160370

Differential Revision: https://phabricator.services.mozilla.com/D160502
2022-10-27 14:37:04 +00:00
nchevobbe 51aa9fcd1f Bug 1796191 - Separate midi and midi-sysex permissions. r=gsvelto.
Existing tests are updated so they pass with this change, and a specific
test case is added to make sure that adding midi-sysex permission does
not automatically add permission to midi.

Differential Revision: https://phabricator.services.mozilla.com/D160370
2022-10-27 07:22:02 +00:00
William Durand 296de0da21 Bug 1795473 - Fix dom/midi mochitests with new SitePermsAddonProvider. r=rpl
With the new synthetic add-on provider, we do not return an error when calling `navigator.requestMIDIAccess()` without an add-on installed because there is *always* an add-on.

Differential Revision: https://phabricator.services.mozilla.com/D159464
2022-10-17 13:09:39 +00:00
William Durand 2727c3d976 Bug 1790620 - Enable dom.sitepermsaddon-provider.enabled on Nightly only. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D159311
2022-10-14 21:53:47 +00:00
nchevobbe b19310b506 Bug 1792993 - Log additional error message in console when Addonmanager.installSitePermsAddonFromWebPage throws. r=pbz.
This error message provides extra information to developers so they know why the access was denied
(e.g. for public etld, remote subframes, ...).

Differential Revision: https://phabricator.services.mozilla.com/D159246
2022-10-14 17:01:32 +00:00
Luca Greco 200f738708 Bug 1794162 - Only register `SitePermsAddonProvider` when the pref is enabled. r=nchevobbe,willdurand,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D158891
2022-10-12 15:48:01 +00:00
nchevobbe 5d8ed083ca Bug 1778959 - Don't expose requestMIDIAccess on file scheme. r=bholley.
This is done by adding Navigator::HasMidiSupport that we reference in
the Navigator.webidl `Func` extented attribute for `requestMIDIAccess`.

A test case is added to browser_midi_permission_gated.js to ensure this
works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D157321
2022-09-30 22:07:19 +00:00
nchevobbe 3d1ac4e0b7 Bug 1778959 - Honor dom.sitepermsaddon-provider.enabled for Midi permission requests. r=willdurand,timhuang.
When the pref is true, we want to go through the new SitePermissionAddon install flow.
We adjust the rejection message so it doesn't mention the previous implementation.
A test is added to ensure that calling `navigator.requestMIDIAccess` does follow the SitePermissionAddon
install flow, and the the promise gets resolved/rejected when the user accept/deny installing the addon.

Differential Revision: https://phabricator.services.mozilla.com/D156192
2022-09-30 22:07:19 +00:00
nchevobbe ac16015106 Bug 1778959 - Expose nsIPrincipal.isLoopbackHost. r=bholley.
This will be used in SitePermsAddonInstallRequestPrototype to discriminate permission
requests coming from localhost, where we want to fallback to regular permission prompt.

Depends on D151477

Differential Revision: https://phabricator.services.mozilla.com/D157658
2022-09-30 22:07:18 +00:00
Mark Banner d4aadf5320 Bug 1792694 - Fix ESLint no-undef and no-unused-vars issues in various parts of dom/ tests. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D158253
2022-09-28 17:23:11 +00:00
Olli Pettay 93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Gabriele Svelto 20d3e2e689 Bug 1784038 - Allow users to bypass add-on gating when using WebMIDI r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D154218
2022-08-11 10:25:55 +00:00
Mark Banner 7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Tooru Fujisawa e4d8ddc4b6 Bug 1780543 - Part 6: Stop using mozilla/frame-script in unrelated files. r=Standard8,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D152431
2022-07-26 02:46:31 +00:00
Gabriele Svelto 647f30234d Bug 1769266 - Use smart pointers in MIDI runnables r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D148495
2022-06-07 12:51:08 +00:00
Kagami Sascha Rosylight d7301d29b5 Bug 1769290 - Part 9: Apply mozilla-js-handle-rooted-typedef against dom/localstorage,locks,media,midi,notification,payments r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148282
2022-06-05 20:54:59 +00:00
Gabriele Svelto fd3fc54c5d Bug 1771875 - Add BrowserTestUtils.reloadTab() and use it everywhere r=mconley,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D147732
2022-06-01 09:34:05 +00:00
Kagami Sascha Rosylight 50ec2e051f Bug 1757635 - Part 2: Use NS_IMPL_CYCLE_COLLECTION_WITH_JS_MEMBERS where applicable r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D147235
2022-05-25 23:41:26 +00:00
Gabriele Svelto 604c324521 Bug 1769009 - Refresh the list of MIDI devices both when navigating to a new page and away from an old one r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D146564
2022-05-23 19:59:57 +00:00
Gabriele Svelto 6ef19ca2a9 Bug 1766469 - Handle empty data fields when creating MIDIMessageEvent objects r=padenot
This change matches Chrome's behavior of not throwing in cases when the
data field is null. However contrary to Chrome we populate the object
with an empty array instead of a null reference.

Differential Revision: https://phabricator.services.mozilla.com/D146672
2022-05-20 05:58:03 +00:00
Marian-Vasile Laza bcd8667376 Backed out changeset 69f265c469f6 (bug 1769009) for causing mochitest failures on test_midi_device_explicit_open_close.html. CLOSED TREE 2022-05-20 01:45:02 +03:00
Gabriele Svelto 874e321393 Bug 1769009 - Refresh the list of MIDI devices both when navigating to a new page and away from an old one r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D146564
2022-05-19 20:56:52 +00:00
Cosmin Sabou 2bd7325f19 Backed out changeset aaaed875acb3 (bug 1766469) for android mochitest failures on test_midi_message_event.html. 2022-05-19 15:44:19 +03:00
Gabriele Svelto ff14b28782 Bug 1766469 - Handle empty data fields when creating MIDIMessageEvent objects r=padenot
This change matches Chrome's behavior of not throwing in cases when the
data field is null. However contrary to Chrome we populate the object
with an empty array instead of a null reference.

Differential Revision: https://phabricator.services.mozilla.com/D146672
2022-05-19 11:41:58 +00:00
Norisz Fay db27cb2f8b Backed out 2 changesets (bug 1766469) for causing mochitest failures on test_midi_message_event.html CLOSED TREE
Backed out changeset 4d2390d6d742 (bug 1766469)
Backed out changeset 52649d6014b8 (bug 1766469)
2022-05-19 13:35:41 +03:00
Norisz Fay ffc76555ec Bug 1766469 - Fix lint failure in test_midi_message_event.html r=fix CLOSED TREE 2022-05-19 13:00:09 +03:00
Gabriele Svelto 0103525a21 Bug 1766469 - Handle empty data fields when creating MIDIMessageEvent objects r=padenot
This change matches Chrome's behavior of not throwing in cases when the
data field is null. However contrary to Chrome we populate the object
with an empty array instead of a null reference.

Differential Revision: https://phabricator.services.mozilla.com/D146672
2022-05-19 09:38:17 +00:00
Dana Keeler fb67326470 Bug 1768047 - introduce HMAC C++ helper and remove nsICryptoHMAC r=jschanck,necko-reviewers,kershaw,padenot
This patch removes the redundant nsICryptoHMAC interface and implementation,
updates front-end code to use WebCrypto, and changes back-end code to use the
helper class HMAC introduced by this patch.

This also removes the last uses of nsIKeyObject and nsIKeyObjectFactory, and
thus those interfaces and implementations as well.

Differential Revision: https://phabricator.services.mozilla.com/D145656
2022-05-12 22:24:29 +00:00
Peter Van der Beken e77783380e Bug 1766130 - Properly propagate errors from Promise creation. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144515
2022-05-02 07:44:23 +00:00
Mike Hommey 7ee709ee45 Bug 1765474 - Fix unused-but-set-variable warning in MIDIUtils.cpp. r=gsvelto
dom/midi/MIDIUtils.cpp:110:12: error: variable 'bytesRead' set but not used [-Werror,-Wunused-but-set-variable]
  uint32_t bytesRead = 0;
           ^

Differential Revision: https://phabricator.services.mozilla.com/D144140
2022-04-22 01:25:05 +00:00
Gabriele Svelto e8dd00607f Bug 1758468 - Use stable, anonymous IDs for Web MIDI ports r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D142550
2022-04-12 12:31:27 +00:00
Cosmin Sabou c27d26edc4 Backed out 2 changesets (bug 1758468) for causing web midi related mochitest failures. CLOSED TREE
Backed out changeset cfba299e5067 (bug 1758468)
Backed out changeset c0eb987d0f76 (bug 1758468)
2022-04-11 21:30:27 +03:00
Gabriele Svelto 5bbb1cb2aa Bug 1758468 - Use stable, anonymous IDs for Web MIDI ports r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D142550
2022-04-11 17:43:09 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Gabriele Svelto 82f7712841 Bug 1749906 - Always use the test MIDI service implementation in tests r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D141000
2022-03-15 11:41:49 +00:00
Bobby Holley 2cabba2cda Bug 1758598 - Point developers to add-on-gating docs when WebMIDI permission request fails. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D140590
2022-03-09 17:45:54 +00:00