This patch adds the minimum necessary to register the
declarativeNetRequest API and its permissions, behind prefs.
Tests have been added/updated to verify that the permissions and API
access are enforced correctly (effectiveness of preferences, API
visibility, permission warnings).
Before landing this, we need to register the permission warning in
Android-Components too, as mentioned in the bug (i.e. bug 1671453).
Differential Revision: https://phabricator.services.mozilla.com/D152503
Since bug 1741076, the downloads panel is already configured not to show
the downloads panel if the top chrome window is inactive. However, this
check doesn't matter if the downloads panel has never been opened before
in the profile (represented by pref browser.download.panel.shown). This
patch changes the check so that if the top window is not active, we
don't show the panel, no matter what.
Differential Revision: https://phabricator.services.mozilla.com/D153334
The regression here happens because the jsm code was looking into
this.popup.clientWidth, which can be larger than
this.popup.panelContent.clientWidth (which is the right thing to look
at) on Linux (and on Windows after bug 1768278).
However, this is all working around a weird HTML/XUL layout interaction
(the buttons not wrapping correctly unless max-width is set, because XUL
boxes don't understand when a child has flex layout).
Instead, use display: block on the container and header. This prevents
the weird layout interaction altogether and we can avoid the hacky
workarounds.
Differential Revision: https://phabricator.services.mozilla.com/D151139
This test was disabled in an attempt to mitigate this bug. As it turns out, the
underlying issue was in a different test, and that test has now been fixed, so
we can safely re-enable this one.
Differential Revision: https://phabricator.services.mozilla.com/D153894
This converges Windows native notification behavior across all installers to use the COM notification server.
This also fixes an issue where interacting with an MSIX notification opened a new window with new tabs correlated to the toast notification launch arguments. MSIX by default calls the application sending a notification with the provided launch arugments, which was an problem as we use launch arguments in the COM server to reconstruct the origin of a notification.
Differential Revision: https://phabricator.services.mozilla.com/D153538
If we clear the pref, we end up clearing the user-branch value set for tests
and end up with default branch value, which will point to the Remote Settings
server used in production.
Instead, we store the original value when we would reset it so that we have end
up with the pref set to the test value instead of the real value.
Differential Revision: https://phabricator.services.mozilla.com/D153693
This matches what Linux and macOS do, and that allows the fix for bug 1782623
to work on Windows for unstyled selects.
This also simplifies the CSS (though it adds a new system color which is a bit
more annoying). I filed https://github.com/w3c/csswg-drafts/issues/7561 to
propose adding a more generic way to do this in the future (not just for
Firefox).
Differential Revision: https://phabricator.services.mozilla.com/D153549
The type field is present in the schema in messaging-system-inflight-assets and
all the message group definitions deployed have this field.
While I was here, I simplified the definition of `frequency.custom.period`
since it was using a `oneOf` subschema with a list containing one item.
Differential Revision: https://phabricator.services.mozilla.com/D153118
This detects if we've got to the parent document and if so, exits early - we don't appear to collect clicks on the parent document, so no need to go further.
Differential Revision: https://phabricator.services.mozilla.com/D153610
This allows us to fix a bug where when our current Private Browsing shortcuts are pinned to the Start Menu, they use the regular Firefox Visual Elements (which is the non-Private Browsing logo). I tried to make this as minimal and braindead as possible.
Differential Revision: https://phabricator.services.mozilla.com/D151538
The back/forward menu shows tooltips when hovering menuitems. For the
current page, the tooltip says Stay on this page, but the effect of the
menuitem is actually to reload the current page. So change the tooltip
string to reflect that the page will reload when the item is clicked.
Differential Revision: https://phabricator.services.mozilla.com/D153468
Initially, I made the font-weight 500 in order to mimic the appearance
of the Figma design which used 600 but visually didn't look as bold on the screen
as compared to how it looked in the browser.
But on Windows it doesn't result in the font looking bolder, so it's probably best
to use 600 even if might look slightly more bold on OSX/Linux than the Figma file.
Differential Revision: https://phabricator.services.mozilla.com/D152590
Both Chrome and Edge on Windows also move the swipe-to-nav arrow icon, the
distance of move seems to be a fixed value, it doesn't depend on the browser
window size. So we also use a fixed value, 100px here.
Chrome on Mac also moves the icon, but in a slightly different way. The icon is
a semicircle shape, it never leaves the edge of the browser window even if it's
moving during swipe gestures. So we introduce a new preference named
"browser.swipe.navigation-icon-move-distance" to implement platform dependent
swipe-to-nav icon behaviors. As of now the value on platforms other than Windows
is zero so that the icon never moves on the platforms.
Depends on D152951
Differential Revision: https://phabricator.services.mozilla.com/D150433
Since `CheckArg`'s `aParam` is declared as `const CharT **`, it's
treated as a deduction parameter. Unfortunately, `nullptr` is of type
`nullptr_t`, and it doesn't get coerced before template argument
deduction takes place. To allow passing `nullptr`, people have been
using unwieldy constructs like `static_cast<const wchar_t**>(nullptr)`
when `aParam` isn't needed.
Centralize this by adding an overload of `CheckArg` that explicitly
takes `nullptr_t` and forwards it on to the primary implementation.
Strip out all the now-unnecessary `static_cast`s everywhere else.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D152327
Set the size-field of the struct before passing it to Windows, as one
customarily does.
(Given that STARTUPINFOEXW exists, it's not likely that this will ever
actually cause issues. But let's not rely on that.)
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D152544
Write the deelevation-status enum value into the parent process, where
it will (hopefully) show up in the event of a crash report.
(Presenting this value more conveniently -- _e.g._, in `about:support`
and/or Firefox telemetry -- would require additional plumbing, and so
has been left to future work as bug 1774703.)
This commit was previously submitted as D149546, and has not changed.
Differential Revision: https://phabricator.services.mozilla.com/D152326
Add a new command-line flag `--attempting-deelevation` which prevents
the launcher from entering an infinite loop of deelevation attempts.
Additionally, produce an enum value indicating the decisions made by the
launcher process. (Nothing is done with this value yet; that will happen
in the following commit.)
A commit loosely analogous to this was previously submitted as D149545.
Differential Revision: https://phabricator.services.mozilla.com/D152325
Eliminate the need to keep Firefox's required-argument set in sync
across files by defining it only in a new header file.
No functional changes.
Differential Revision: https://phabricator.services.mozilla.com/D152543
`strimatch` attempts to perform a generic case-insensitive match.
However, it doesn't handle edge cases very well -- and, for deep Unicode
reasons, it can't reasonably do so without being far more complicated.
However, we also don't need it to. The `lowerstr` input of `strimatch`
is only ever a constant string naming a command-line option. These are
(and probably always should be) strictly composed of lowercase ASCII,
numerals, and hyphens. _That_ character set is one that a simple
function can properly handle.
Restricting `lowerstr` to be `const char *`, regardless of `CharT`, also
obviates the macro-machinery of `GetLiteral` and `DECLARE_FLAG_LITERAL`.
Strip it all out.
Additionally and relatedly:
* Add tests confirming that `strimatch` only matches things that it
should be testing against at all.
* Add a minor fix for a test which was discovered to crash rather than
report failure.
----
Although this commit involves significant internal functional changes,
most users will see no differences. (Some users operating in Turkish or
Azerbaijani locales may notice that "-PRİVATE-WINDOW" is no longer a
recognized command-line option.)
Differential Revision: https://phabricator.services.mozilla.com/D152321
This implements a COM Server and returns objects implementing INotificationActivationCallback. This allows Firefox notifications to be acted upon even after the main process exits.
COM objects require a (normally static) CLSID in the registry to be identified by other apps. To prevent CLSID duplication between parallel installs and portable/development builds, this implementation inspects the registry when a COM object CLSID is requested, and returns an object if the CLSID's InprocServer32 key matches the path of the DLL.
Differential Revision: https://phabricator.services.mozilla.com/D149182
Ensure extensions can manage tabs and sessions that include tabs from other extensions. The parent
patch to this introduces cross-extension access validation. However that breaks this specific use case
that we need to continue supporting. This patch modifies three extension apis, tab.create/update and
windows.create to allow the creation of extension tabs which cannot be otherwise accessed.
Differential Revision: https://phabricator.services.mozilla.com/D151766
This makes us use light or dark select popups on supported platforms
based on the background of the select element, which allows us to use
the right scrollbar color.
Depends on D153424
Differential Revision: https://phabricator.services.mozilla.com/D153425
I noticed some missing context menu style when loading the context menu
from our own viewcache, which explains the difference between primary
and secondary button click. Not sure ecavtly what was missing as the
styles are all over the place.
The menu item actually works, the actions are called and for
checkbox-like menu items, the `checked` attribute is correctly set in
the "HTML". Also it looked like sub-menus weren't affected (e.g. Tree
Style Tab didn't have any issue).
While investigating, I also noticed that most (if not all) `menupopup`
elements are declared in the main popupset, so I tried to move the
unified extensions context menu to this main popupset and lazy-load the
l10n strings (similar to the toolbar context menu [1]).
That fixed the bug.
[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1609556
Differential Revision: https://phabricator.services.mozilla.com/D153330
Both Chrome and Edge on Windows also move the swipe-to-nav arrow icon, the
distance of move seems to be a fixed value, it doesn't depend on the browser
window size. So we also use a fixed value, 100px here.
Chrome on Mac also moves the icon, but in a slightly different way. The icon is
a semicircle shape, it never leaves the edge of the browser window even if it's
moving during swipe gestures. So we introduce a new preference named
"browser.swipe.navigation-icon-move-distance" to implement platform dependent
swipe-to-nav icon behaviors. As of now the value on platforms other than Windows
is zero so that the icon never moves on the platforms.
Differential Revision: https://phabricator.services.mozilla.com/D150433
This implements a COM Server and returns objects implementing INotificationActivationCallback. This allows Firefox notifications to be acted upon even after the main process exits.
COM objects require a (normally static) CLSID in the registry to be identified by other apps. To prevent CLSID duplication between parallel installs and portable/development builds, this implementation inspects the registry when a COM object CLSID is requested, and returns an object if the CLSID's InprocServer32 key matches the path of the DLL.
Differential Revision: https://phabricator.services.mozilla.com/D149182
de -> c2cf9f97ae773301c900f5ecacb31a38482a9e05
fi -> 4898c5d8934d1314c2bebd169adbc8df27aca01e
hsb -> 78e0a82bdad9804dfd53941f9c03daac25cb3332
is -> 178674424315f8b3266439518f50d0b960af5a25
kk -> 8a299101a084bb93710010d6ddde570d7c2b24ce
tg -> e0b872009c413bdbc8a97c7899df15b47a97a20a
When undoing closed tabs, only close blank tab after all tabs are undone in order to not instantly restore the blank tab as part of the group.
Differential Revision: https://phabricator.services.mozilla.com/D145115