I was looking into simplifying our scrollbar styles:
* StyleAppearance::Resizer is not used in content, and some of the
values were only for <xul:window> which are not supported anymore.
* Statusbarpanel and Resizerpanel aren't used. Statusbar is only used
once on macOS so we only need to keep it there.
Differential Revision: https://phabricator.services.mozilla.com/D178374
The issue here is that the SetValueInternal call made us go from empty
value to non-empty due to color's specialness of returning black always,
but since the value dirty flag wasn't set, the non-empty value actually
didn't make a difference and just confused the code.
Make the code follow the spec more closely, which fixes this (in
particular the SetDefaultValueAsValue call).
Also, remove some useless code in SetValueInternal() since callers end
up in OnValueChanged() effectively everywhere except when mDoneCreating
is false (in which case we can just wait until DoneCreatingElement calls
us again), and if the do not end up there then that's a bug to fix.
Differential Revision: https://phabricator.services.mozilla.com/D178706
Tests have shown that web pages use base64url encoded integrity
metadata when using SRI, as other browsers are already supporting it.
To align cross-browser behavior, we'll support base64url and base64
in parallel and update the tests from wpt at the same time.
Differential Revision: https://phabricator.services.mozilla.com/D178147
This should fix the issue experienced by the reporter. It also pushes the
re-entrancy guard into the the 'init' method we define on gCategoryInits
objects, and removes the asynchronicity which was only there for fluent's sake.
Instead of blocking the insertion on fluent, which meant that for the in-page
find functionality we do N initializations and fluent passes, we make each of
the 2 consumers responsible for checking translation has completed. This means
find in page now just has 1 fluent pass, instead of N passes for N categories.
This should speed up the find in page initialization, and means initialization
of a category is now sync instead of async.
Differential Revision: https://phabricator.services.mozilla.com/D178232
This new API helps execute a function (2nd argument) and ensure that any thrown exception
will be associated against a given global (1st argument).
This is especially handy when any privileged code executes some content code.
Without such helper, the exception is thrown into the privileged global and loose
its original context and can no longer be associated with the content window it originates from.
It can also help associate pure-privileged exception to some particular content window.
Differential Revision: https://phabricator.services.mozilla.com/D167529
The compiler may be imperfect but it evolves, and hard-coded threshold
don't. Plus according to prefherder, the impact on size is within
reasonable bounds.
Differential Revision: https://phabricator.services.mozilla.com/D178152
Also remove public access to the internal Localization instance
and update the call in CustomizableWidgets to not detach the method.
Differential Revision: https://phabricator.services.mozilla.com/D178049
The l10n migration shows a diff for `addon-downloading-and-verifying`,
`addon-confirm-install-message`, and `addon-confirm-install-unsigned-message`
due to the en-US source having `1` rather than `one` variants.
For `addon-confirm-install-some-unsigned-message`,
the en-US source has a single-variant plural selector for localization to new languages.
In addition to moving strings from `browser.properties` to the new `addonNotifications.ftl`,
there's some shuffling of strings to & from `browser.ftl` as well.
The intent is to collect the more rarely used strings out of files loaded during startup,
especially as many of the notification strings need to be formatted in a sync context.
For the most part, string keys are left roughly the same as they were in .properties.
With some guidance, some rationalisation might make sense as a part of this for the
rather wide selection of prefixes in this set:
- `addon-`
- `site-permission-install-`
- `webext-`
- `xpinstall-`
The `addon-install-started` and `addon-install-failed` notifications appear to need sync l10n formatting,
as using async format calls before their `PopupNotifications.show()` leads to test failures in
`toolkit/mozapps/extensions/test/xpinstall/browser_doorhanger_installs.js`.
Differential Revision: https://phabricator.services.mozilla.com/D178235
This changes the arguments of `ExtensionData.formatPermissionStrings()`.
The second `bundle` arg is dropped, and a `localization` option is added.
Call sites in m-c are updated, but this will also need a matching update for Thunderbird.
A few Thunderbird test cases will also need to be updated,
as they currently point to a non-existing localization file paths
"messenger/addons.ftl" and "messenger/addonPermissions.ftl".
As discussed at the addon workweek,
the Fluent l10n keys for extension permissions match the pattern:
webext-perms-description-{name}
where `{name}` is the permission's sanitized name.
A fluent-lint exception is added for the capitalization of these generated names.
To allow for message updates and subsequent l10n identifier updates,
a `PERMISSION_L10N_ID_OVERRIDES` map is provided.
Because Fluent localization keys are not enumerable
and attempting to format a missing key is an error,
the `PERMISSIONS_WITH_MESSAGE` set must be kept in sync with message updates.
Differential Revision: https://phabricator.services.mozilla.com/D158663
When rustc generates its dependency file, it takes into account current
version of the codebase. If an update of the code then happens, with,
say an ipdl file being removed, the corresponding .h is no longer
generated and make rightfully complains about missing dependency.
Allow this kind of transition by providing a dummy rule for each
dependency generated by rustc.
Differential Revision: https://phabricator.services.mozilla.com/D178617