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

11165 Коммитов

Автор SHA1 Сообщение Дата
Jan-Niklas Jaeschke ebf3cd6240 Bug 1808565, part 1: Adapt `Selection` to support `StaticRange`s. r=webidl,saschanaz,masayuki,smaug
This change is necessary to support the [CSS Highlight API](https://drafts.csswg.org/css-highlight-api-1/),
which uses `Selection` internally.

To replace `nsRange` with `AbstractRange`, some sections needed to be
adapted since `nsRange`-specific features were used.
Therefore, some methods (such as `GetRangeAt()`) may only be called if
the `Selection` is *not* of type `SelectionType::eHighlight`,
as it (per spec) returns an `nsRange`.
These methods will now `MOZ_ASSERT` if called for a highlight selection.
Additional methods are implemented which return `AbstractRange`
instead and are safe to be called for every selection type.

This commit also improves support of highlight features:
- Invalidation of highlight ranges: adding/removing Ranges in-place instead of
  removing and re-adding the Selection object associated with the highlight.
- Ranges are only associated with the Selection that shares the same Document
- Fixed minor IDL issue

Differential Revision: https://phabricator.services.mozilla.com/D170582
2023-03-03 14:59:47 +00:00
Jan Horak bddcbe8678 Bug 1170092 Load preferences from /etc/firefox/defaults/pref on Linux; r=mkaply
Preferences from /etc/firefox/defaults/pref overwrites preferences set in omni.jar
and firefox/defaults/pref. The code was used for flatpak and snap only, but it could
be used also for regular Linux builds.

Differential Revision: https://phabricator.services.mozilla.com/D168799
2023-03-02 14:41:56 +00:00
Jan-Niklas Jaeschke 2243494a74 Bug 1810403: Allow `nsRange`s to be in multiple `Selection`s. r=masayuki
The Custom Highlight API allows a use case where a `Range` of a `Highlight`
is also used as `Selection`. Due to the decision to use the `Selection` mechanism
to display `Highlight`s, a `Range` can be part of several `Selection`s.
Since the `Range` has a pointer to its associated `Selection`
to notify about changes, this must be adapted to allow several `Selections`.

As a tradeoff of performance and memory usage, the `Selection`s are stored
as `mozilla::LinkedList`. A helper class `mozilla::SelectionListWrapper`
was implemented to allow `Selection`s to be in multiple of these lists
and without having to be derived from `LinkedListElement<T>`.

To simplify usage of the list, the use case  "does this range belong to Selection x?"
is wrapped into the convenience method`IsInSelection(Selection&)`;
The method previously named like this was renamed to `IsInAnySelection()`
to be named more precisely.

Registering and unregistering of the closest common inclusive ancestor
of the `Range` is done when the first `Selection` is registered and
the last `Selection` is unregistered.

Differential Revision: https://phabricator.services.mozilla.com/D169597
2023-02-21 12:25:28 +00:00
Joel Maher a62ef05cdb Bug 1816191 - Skip tests in order to keep win7 running @ azure. r=gbrown,necko-reviewers,settings-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,nalexander,sgalich,alwu
Differential Revision: https://phabricator.services.mozilla.com/D169523
2023-02-14 23:44:12 +00:00
Andi-Bogdan Postelnicu d7e8a09c21 Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium
Updated with clang-format version 15.0.5 (taskcluster-MKK8dHUpQkGfPLA793lizg)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D168658
2023-02-13 15:02:07 +00:00
Francesco Lodolo (:flod) 913bd7a195 Bug 1808872 - Add new words to en-US dictionary, r=bolsson
Differential Revision: https://phabricator.services.mozilla.com/D167363
2023-01-25 18:40:14 +00:00
Ben Hearsum 2922349567 Bug 1807926: disable autoconfig tests for tests against MSIX builds r=mkaply
We don't support autoconfig for these builds.

Differential Revision: https://phabricator.services.mozilla.com/D166369
2023-01-09 18:01:10 +00:00
Francesco Lodolo (:flod) 018607524a Bug 1808875 - Documentation: link to bug alias for requesting new words instead of requiring a new bug, r=bolsson
Differential Revision: https://phabricator.services.mozilla.com/D166169
2023-01-06 18:29:25 +00:00
Francesco Lodolo (:flod) ac0abcf707 Bug 1808224 - Add new words to en-US dictionary, clean up list of Mozilla specific terms, r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D165884
2023-01-05 15:23:59 +00:00
Francesco Lodolo (:flod) 60852a7e54 Bug 1808224 - Improve scripts and documentation to edit the en-US dictionary, r=RyanVM
## edit-dictionary.sh

Instead of editing the .dic file directly, allow user to provide a list of
words. The script expands the existing .dic file, adds the new words and
compress it again using the affix rules.

Numerals at the beginning of the file and "no suggestion" words need to be
special-cased, since compressing the word list creates different results.

## make-new-dict.sh

Extract suggestions exclusions from the existing Mozilla dictionary, then
add them back to the dictionary generated by SCOWL. This removes the need
to maintain an external list of exclusions (mozilla-exclusions.txt).
It also allows to exclude these offensive words from both lists of added
and removed words by Mozilla.

Also:
- Break if the scowl folder is missing.
- Remove backup folders to make sure the install script can't be run twice.

## install-new-dict.sh

Break if the scowl folder is missing.

Differential Revision: https://phabricator.services.mozilla.com/D165883
2023-01-05 15:23:58 +00:00
Mark Banner 9594c03938 Bug 1808115 - Remove the separate EmbedPrompter wrapper, use Prompter instead. r=Gijs,necko-reviewers,geckoview-reviewers,valentin,m_kato
We no longer support the legacy add-ons, so this should not be necessary.

Differential Revision: https://phabricator.services.mozilla.com/D165764
2023-01-03 17:19:48 +00:00
Francesco Lodolo (:flod) 07ab24d46d Bug 1686285 - Update en-US dictionary to SCOWL 2020.12.07, r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D165650
2023-01-02 17:47:21 +00:00
Francesco Lodolo (:flod) 2ebee38c07 Bug 1806793 - Run scripts using the same dataset (SCOWL scowl-2019.10.06), r=sylvestre
Depends on D165305

Differential Revision: https://phabricator.services.mozilla.com/D165306
2022-12-28 15:06:25 +00:00
Francesco Lodolo (:flod) 7afa41bb66 Bug 1806793 - Update scripts for en-US dictionary, r=sylvestre
Added .sh extension to all scripts.

edit-dictionary.sh:
* Convert to utf-8 before editing, and back to iso-8859-1 before saving
* Place a copy of the utf-8 dictionary inside the utf8 folder, and store the iso-8859-1 in place

make-new-dict.sh:
* Use .txt extension for support wordlists, and place them in a subfolder
* Exclude words in mozilla-exclusions.txt from the generated dictionary
* Save 5-mozilla-*.txt files to utf-8

Depends on D165304

Differential Revision: https://phabricator.services.mozilla.com/D165305
2022-12-28 15:06:25 +00:00
Francesco Lodolo (:flod) d974a31757 Bug 1806793 - Update documentation on how to manage en-US dictionary, r=sylvestre
Depends on D165303

Differential Revision: https://phabricator.services.mozilla.com/D165304
2022-12-28 15:06:24 +00:00
Francesco Lodolo (:flod) df55534a51 Bug 1806793 - Keep a utf-8 encoded version of the dictionary files in the tree, r=sylvestre
This works around the limitation in Phabricator, where ISO-8859-1 files are seen as binary.
Files have been converted from the existing dictionary using iconv, and the SET manually updated in the affix file to UTF8

Depends on D165302

Differential Revision: https://phabricator.services.mozilla.com/D165303
2022-12-28 15:06:24 +00:00
Francesco Lodolo (:flod) 583294c248 Bug 1806793 - en-US dictionary: use .txt extensions for 5-mozilla-* files, convert to utf-8 encoding, r=sylvestre
5-mozilla-* files are a by-product of the dictionary generation, they're not used to generate the dictionaries, so we can safely use utf-8 encoding.

Also, since they are wordlists, it makes sense to use the TXT extensions.

Differential Revision: https://phabricator.services.mozilla.com/D165302
2022-12-28 15:06:23 +00:00
Marco Castelluccio f69e697461 Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165395
2022-12-23 22:45:46 +00:00
Andrew McCreight ce28c41da0 Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC macros. r=smaug
As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D164829
2022-12-15 19:45:01 +00:00
William Durand 5f3f11820e Bug 1437171 - Add Web MIDI support in `navigator.permissions.query()`. r=webidl,smaug,pbz
Differential Revision: https://phabricator.services.mozilla.com/D164036
2022-12-15 10:24:17 +00:00
Iulian Moraru 747186542b Backed out changeset 51b2a95943c0 (bug 1437171) for causing wpt failures on all-permissions.html related to query "midi" permission. 2022-12-15 06:10:01 +02:00
William Durand 3da94170fc Bug 1437171 - Add Web MIDI support in `navigator.permissions.query()`. r=webidl,smaug,pbz
Differential Revision: https://phabricator.services.mozilla.com/D164036
2022-12-14 22:20:37 +00:00
Barret Rennie 9c5e6dab31 Bug 1541508 - Use Services.env in extensions/ r=extension-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D160139
2022-11-25 19:09:07 +00:00
Tom Ritter 8e1c983ccd Bug 1800927: Fix the Updatebot linter and offending moz.yaml files r=ahal,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D162223
2022-11-21 19:35:16 +00:00
Shravan Narayan 5591e0b4ac Bug 1742000 - Don't call hunspell rlbox::destroy_sandbox when create_sandbox failed r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D162359
2022-11-18 20:33:22 +00:00
Mark Banner ec76a72706 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (miscellaneous). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D161917
2022-11-17 12:00:32 +00:00
Cristian Tuns 4d37cf70f1 Backed out 19 changesets (bug 1541508) for causing xpcshell failures on test_notHeadlessByDefault.js CLOSED TREE
Backed out changeset 08476fa2bc27 (bug 1541508)
Backed out changeset 0bf7514845db (bug 1541508)
Backed out changeset aa612a5e9ef7 (bug 1541508)
Backed out changeset 6bb9360473f7 (bug 1541508)
Backed out changeset b3d8e92f50c2 (bug 1541508)
Backed out changeset fa40dded133e (bug 1541508)
Backed out changeset 2e7db4aa8d4f (bug 1541508)
Backed out changeset 6098e2eb62ea (bug 1541508)
Backed out changeset 2c599ee639c4 (bug 1541508)
Backed out changeset 7d44f6e2644c (bug 1541508)
Backed out changeset c1279c3d674c (bug 1541508)
Backed out changeset 8bd08a62a590 (bug 1541508)
Backed out changeset 740010cb005c (bug 1541508)
Backed out changeset 0bfc7dd85c62 (bug 1541508)
Backed out changeset c4374a351356 (bug 1541508)
Backed out changeset 44ccfeca7364 (bug 1541508)
Backed out changeset e944e706a523 (bug 1541508)
Backed out changeset 2c59d66f43e4 (bug 1541508)
Backed out changeset a1896eacb6f1 (bug 1541508)
2022-11-01 22:38:52 -04:00
Barret Rennie cba4ad687c Bug 1541508 - Use Services.env in extensions/ r=extension-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D160139
2022-11-02 02:08:54 +00:00
Joel Maher 7d57e8ce58 Bug 1797751 - carry over skip-if conditions from win10 to win11. r=bxbrenden,necko-reviewers,settings-reviewers,credential-management-reviewers,valentin,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D160529
2022-10-28 00:00:40 +00:00
Alexandre Lissy f955bb9c1e Bug 1785278 - Reading AutoConfig from /etc/firefox when running under Snap r=mkaply,xpcom-reviewers,barret
Differential Revision: https://phabricator.services.mozilla.com/D159059
2022-10-18 21:06:43 +00:00
Mike Hommey 056763e84d Bug 1776463 - Use C++17 inline variable for CountingAllocatorBase::sAmount. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D159360
2022-10-17 21:54:12 +00:00
Nika Layzell 1ca8cf637b Bug 1794644 - Part 2: Mark `StaticRWLock` as `MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS`, r=xpcom-reviewers,kmag
The original use in rlbox which made having this annotation impossible is no
longer necessary as it was removed in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D159085
2022-10-14 14:20:35 +00:00
Masayuki Nakano d54f646831 Bug 1793694 - part 6: Stop exposting `EditorUtils.h` r=m_kato
Depends on D158635

Differential Revision: https://phabricator.services.mozilla.com/D158636
2022-10-12 02:44:20 +00:00
Henrik Skupin e75a84eaa1 Bug 1141335 - [marionette] Use in_app by default for quit() and restart(). r=webdriver-reviewers,jdescottes,perftest-reviewers,AlexandruIonescu
Hereby the "in_app" argument is required to be specified in case some
other argument eg. "clean" requires a termination of the application.

Differential Revision: https://phabricator.services.mozilla.com/D157219
2022-10-04 09:04:25 +00:00
Mark Banner b14986d4d9 Bug 1792861 - Fix ESLint no-unused-vars issues on global scopes in tests in extensions and toolkit. r=Gijs,application-update-reviewers,bytesized
Depends on D158347

Differential Revision: https://phabricator.services.mozilla.com/D158348
2022-10-01 09:03:12 +00:00
Butkovits Atila 539f87fe4f Backed out changeset 3e220bf19d7b (bug 1141335) for causing failures at awsy/test_memory_usage.py. CLOSED TREE 2022-09-30 02:12:58 +03:00
Henrik Skupin 932d46b87f Bug 1141335 - [marionette] Use in_app by default for quit() and restart(). r=webdriver-reviewers,jdescottes
Hereby the "in_app" argument is required to be specified in case some
other argument eg. "clean" requires a termination of the application.

Differential Revision: https://phabricator.services.mozilla.com/D157219
2022-09-29 18:34:25 +00:00
Andrew McCreight 2da84b8ac4 Bug 1792574, part 3 - Don't include nsMemory where it isn't needed. r=xpcom-reviewers,necko-reviewers,valentin,nika
There are only 3 places where nsMemory.h is still needed (image/RasterImage.cpp,
gfx/thebes/gfxFT2FontList.cpp, and nsMemory.cpp). Remove the rest.

Differential Revision: https://phabricator.services.mozilla.com/D158213
2022-09-28 15:17:46 +00:00
Pier Angelo Vendrame aa21b01cfa Bug 1768907 - Part 1: Make browser.privatebrowsing.autostart a static pref. r=handyman,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D157843
2022-09-22 00:26:17 +00:00
Nicolas Chevobbe e6e58c96a8 Bug 1790105 - Fix test_permmanager_getAllByTypes.js intermittent failures. r=pbz.
It seems that getAllByTypes results aren't in a stable order when
the test is run with --verify.

Differential Revision: https://phabricator.services.mozilla.com/D157120
2022-09-13 04:59:40 +00:00
Mark Banner 274f8662e6 Bug 1479515 - Extend the ESLint rule for checking Ci properties to check for unknown interfaces as well. r=Gijs,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D156425
2022-09-12 16:38:44 +00:00
nchevobbe 2479165e79 Bug 1790017 - Add Services.perms.getAllByTypes(permissionTypes). r=permissions-reviewers,necko-reviewers,pbz
This new method return an array of `nsIPermission` whose type are included in the
array of permission types parameter.
This will help the implementation of Bug 1778959 where we need to get all the permission
of a given Set of (gated) permission types.

Differential Revision: https://phabricator.services.mozilla.com/D156951
2022-09-09 14:52:38 +00:00
Jens Stutte 404c76c5d8 Bug 1777394 - Do not crash on inaccessible dictionary file. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D156278
2022-09-05 11:29:45 +00:00
criss ba097d11d7 Backed out changeset 139d1aea678b (bug 1777394) causing build bustage on Unified_cpp_hunspell_glue0.obj. CLOSED TREE 2022-09-05 11:37:43 +03:00
Jens Stutte efe0cc1a59 Bug 1777394 - Do not crash on inaccessible dictionary file. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D156278
2022-09-05 08:21:10 +00:00
Ryan VanderMeulen 27774619e2 Bug 1788655 - Update Hunspell to 1.7.1. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D156177
2022-09-01 23:48:12 +00:00
Benjamin VanderSloot d169434ceb Bug 1782526 - Clean up site scope permission code, r=permissions-reviewers,pbz
While working on Bug 1777497 I bumped into a few things I would have done
differently that make it harder to misuse the site-scoped permissions.
These are just bugs waiting to happen, so I'm cleaning them up while I'm in here.

Differential Revision: https://phabricator.services.mozilla.com/D152760
2022-08-12 16:12:07 +00:00
Norisz Fay c03af93699 Backed out 5 changesets (bug 1777497, bug 1782526) for causing build bustages on PContent.ipdl CLOSED TREE
Backed out changeset 64e16a70484e (bug 1782526)
Backed out changeset 381806d5afc3 (bug 1777497)
Backed out changeset 820f6f9c9cc3 (bug 1777497)
Backed out changeset f541ad605d6d (bug 1777497)
Backed out changeset 620681c22b83 (bug 1777497)
2022-08-11 03:20:29 +03:00
Benjamin VanderSloot 6e5d1e80dc Bug 1782526 - Clean up site scope permission code, r=permissions-reviewers,pbz
While working on Bug 1777497 I bumped into a few things I would have done
differently that make it harder to misuse the site-scoped permissions.
These are just bugs waiting to happen, so I'm cleaning them up while I'm in here.

Differential Revision: https://phabricator.services.mozilla.com/D152760
2022-08-11 00:04:40 +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