This doesn't fix the bug but removes some unnecessary elements (now that the
prefs search was improved), and moves some CSS out of inline styles into
already-existing rules.
Differential Revision: https://phabricator.services.mozilla.com/D162342
Rather than having each richlistbox consumer having to reinvent focus patterns for
buttons and menulists in its 'rich' items, let's just teach richlistbox and
richlistitem to not suck at keyboard navigation. That way we won't keep forgetting
to deal with this whenever we add new lists anywhere.
This allows us to remove the custom handling in sitePermissions.js, and the same
handling should be covered by the existing test, ie
browser/components/preferences/tests/browser_permissions_dialog.js
To summarize the desired keyboard behaviour:
- tab/shift-tab move focus to controls inside selected items only (not other rows)
- arrow keys move the list selection up/down
- when arrowing to move the list selection, focus moves with the selection if it
was previously on a control in the previously selected item.
Differential Revision: https://phabricator.services.mozilla.com/D161528
We size to the minimum vertical size, so by default they don't take any space
at all anyways.
When scrolling, the min size of the content flexes along with them causing
broken sizing.
Differential Revision: https://phabricator.services.mozilla.com/D160723
The sitePermissions code is reused, and all dialogs work OK except the autoplay one.
This is because the autoplay code adds extra content not present in the other
dialogs, and localizes it.
The SubDialog code relies on determining the size of the dialog once the
mozSubDialogReady promise resolves, which it does before fluent puts in l10n data
for the content that was just added. This patch fixes that.
It also, as a driveby, correctly pauses and resumes observing l10n attributes
in the doc when making modifications, to avoid fluent doing a second pass for
the same content.
Differential Revision: https://phabricator.services.mozilla.com/D159543
<menulist> still uses legacy XUL layout (for reasons, I plan to fix it
but it can take a little bit).
The issue here is a poor interaction between one of the wrapping hboxes
and the xul layout. But we can simplify the code and fix the bug at the
same time, so do that.
Differential Revision: https://phabricator.services.mozilla.com/D159254
If a locale code with region (e.g. it-IT) is not defined in language.properties, we display an empty language name.
In this dialog, we can still show a language name if it matches a known locale code without the region (e.g. it).
Differential Revision: https://phabricator.services.mozilla.com/D157113
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.
Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).
In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.
Add a debug-only assertion to ensure we preserve behavior for now.
Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.
Differential Revision: https://phabricator.services.mozilla.com/D154394
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.
Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).
In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.
Add a debug-only assertion to ensure we preserve behavior for now.
Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.
Differential Revision: https://phabricator.services.mozilla.com/D154394
The fallback locale is not guaranteed to have all of the strings for
non-fluent files, even if it is one of the available locales. This patch
shares the logic with about:preferences for getting the available
locales.
Differential Revision: https://phabricator.services.mozilla.com/D143910
I felt somewhat disoriented in the code when ramping up on it, so I
started documenting it with JSDoc as way to better understand the code.
Differential Revision: https://phabricator.services.mozilla.com/D136020
These were all areas that were confusing me when I was onboarding on to
this code, so I tried to make the terminology less ambiguous and more
precise.
The default language is now the primary language.
UI is now appended to words that are dealing with DOM elements rather
than data stores.
Differential Revision: https://phabricator.services.mozilla.com/D136019
We treat clicking "Accept" as a user-choice even if no settings were changed.
We should persist both the TRR mode and URI that were visible in the dialog
at the time of acceptance of the dialog.
Differential Revision: https://phabricator.services.mozilla.com/D119877
We treat clicking "Accept" as a user-choice even if no settings were changed.
We should persist both the TRR mode and URI that were visible in the dialog
at the time of acceptance of the dialog.
Differential Revision: https://phabricator.services.mozilla.com/D119877
Port Bug 1601256 to dialogs/permissions.js. Unfortunately these files forked even though they are very similar. This leads to bugs like this being introduced.
Differential Revision: https://phabricator.services.mozilla.com/D118888
Port Bug 1601256 to dialogs/permissions.js. Unfortunately these files forked even though they are very similar. This leads to bugs like this being introduced.
Differential Revision: https://phabricator.services.mozilla.com/D118888