A long time ago, the hook was use to make myopen use a different
fopen, but since then, myopen switched to STL iostreams, but also,
Firefox doesn't use myopen anymore.
Differential Revision: https://phabricator.services.mozilla.com/D187515
This was first designed to also positively impact
-ftrivial-auto-var-init by getting rid of the nsAutoCString buffer
initialization in favor of an std::string, but we ended up replacing the
initial std::string buffer by an nsAutoCString which should perform
better on small lines.
Differential Revision: https://phabricator.services.mozilla.com/D187032
Do not isolate `https-only-load-insecure` by origin attributes. This way the HTTPS-Only exceptions will behave similar to the `cookie` permission. This means that exceptions set in the system settings will also apply to private windows, but exceptions set in private windows via the identity pane will be reset after closing the browser.
Depends on D182761
Differential Revision: https://phabricator.services.mozilla.com/D183745
Clang-trunk changed libc++ in a way that breaks fstream support in WASI,
which prevents building the myopen function in csutil.cxx, but the
function is actually unused.
Differential Revision: https://phabricator.services.mozilla.com/D180759
Enables Prettier for (these don't need to be excluded):
- extensions/pref/autoconfig/test/unit/autoconfig.js
- services/sync/tests/unit/prefs_test_prefs_store.js
Removes duplications where the files are already ignored in the .eslintignore section.
Re-organises the structure of the remaining parts to make it clearer why they are being excluded.
Differential Revision: https://phabricator.services.mozilla.com/D176636
It appears that the issue is caused by a change in behaviour from bug
1799470 which made the profile available earlier during startup. If the
permission manager is started between the time when the profile becomes
available and profile-do-change, it would've previously initialized
without storage, and initialized storage after profile-do-change, but
after the changes it may initialize twice instead.
This patch changes the profile-do-change handler to check if we already
have a profile, and avoid initializing the DB twice in that situation.
Differential Revision: https://phabricator.services.mozilla.com/D173062
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
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
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
## 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