This adds a build flag (defaulting to on in Nightly builds) and an
`AppConstants.jsm` definition.
It lays the foundation for managing an active background task. A
singleton, exposed as an XPCOM service, owns the task name and lives
for the life of the application.
This will be wired into the application startup path in future
commits. It's separated to allow the changes to category registration
to come early in the commit sequence.
Differential Revision: https://phabricator.services.mozilla.com/D96481
- Content embedded by SubDialog can define its own focus handler which will be called on SubDialog#focus
- Updated CommonDialog to register custom focus handler
- Moved focus calls from SubDialog to SubDialogManager
- Return early after tab dialog focus on tab switch
Differential Revision: https://phabricator.services.mozilla.com/D102298
Take a step towards replacing the encoding menu with a single menu item that
triggers the autodetection manually. However, don't remove anything for now.
* Add an autodetect item.
* Add telemetry for autodetect used in session.
* Add telemetry for non-autodetect used in session.
* Restore and revise telemetry for how the encoding that is being overridden
was discovered.
Differential Revision: https://phabricator.services.mozilla.com/D81132
TLS error report sending was disabled by default in bug 1579906. The server
that ingested these reports has been decommissioned as well, so this patch
removes this dead code.
Differential Revision: https://phabricator.services.mozilla.com/D99405
Remove calls to old heuristics, which are duplicated, improved, expanded, and balanced in the Fathom model. We'll come along in the next release and delete the dead code. We're leaving it in for now to keep it from bitrotting, in case we have to revert to it.
Differential Revision: https://phabricator.services.mozilla.com/D100141
Because 'navigator.mimeTypes' is always the empty string in the parent process, the loop at
_loadPluginHandlers never does anything, and there's no point keeping this now Flash is going
the way of the dodo anyway.
Differential Revision: https://phabricator.services.mozilla.com/D100216
Resetting focus would also clear selection on editable element, so get
current selected text before moving focus to findbar to make
prefill-with-selection work if the content is loaded in chrome process.
Differential Revision: https://phabricator.services.mozilla.com/D89557
Uses a new printing actor to determine if there was a selection within
the browsing context.
We now create two browsers, the primary browser and a selected browser,
and will use the appropriate browser depending on the settings value
for printSelectionOnly.
Differential Revision: https://phabricator.services.mozilla.com/D94467
Resetting focus would also clear selection on editable element, so get
current selected text before moving focus to findbar to make
prefill-with-selection work if the content is loaded in chrome process.
Differential Revision: https://phabricator.services.mozilla.com/D89557
This gets us a version of `isVisible()` that will work when there isn't a fully populated `window` global around.
Also update the readme to reflect Fathom's new repo structure.
Differential Revision: https://phabricator.services.mozilla.com/D99483
The new section is displayed when the browser.enableAboutThirdParty pref is true.
This is a prototype of the project where we plan to disclose third-party modules
info to the users. Once we find out what is the best place and the best way to
show these data, we remove this section.
Differential Revision: https://phabricator.services.mozilla.com/D93832
The new section is displayed when the browser.enableAboutThirdParty pref is true.
This is a prototype of the project where we plan to disclose third-party modules
info to the users. Once we find out what is the best place and the best way to
show these data, we remove this section.
Differential Revision: https://phabricator.services.mozilla.com/D93832
This adds Locale to MozIntl and uses it to replaces some instances where we
used regular expressions to parse language tags. It is based on work done by
André Bargull in Bug 1639515.
Differential Revision: https://phabricator.services.mozilla.com/D98393
This adds Locale to MozIntl and uses it to replaces some instances where we
used regular expressions to parse language tags. It is based on work done by
André Bargull in Bug 1639515.
Depends on D98392
Differential Revision: https://phabricator.services.mozilla.com/D98393
This commit adds a rosetta status to three different places:
- `nsSystemInfo`, to check for rosetta status per apple specifications. We also use the same check in `nsCocoaFeatures` in D89961.
- `Troubleshoot.jsm`, to add rosetta status data (should it exist) to use in about:support
- `About:Support` itself, if the device is running MacOS
Differential Revision: https://phabricator.services.mozilla.com/D94930
This commit adds a rosetta status to three different places:
- `nsSystemInfo`, to check for rosetta status per apple specifications. We also use the same check in `nsCocoaFeatures` in D89961.
- `Troubleshoot.jsm`, to add rosetta status data (should it exist) to use in about:support
- `About:Support` itself, if the device is running MacOS
Differential Revision: https://phabricator.services.mozilla.com/D94930
This method only is async in order to allow callers to wait for a process switch
triggered by the call to `loadURI` to be finished before resolving. With
DocumentChannel, we should never trigger a process switch eagerly like this
again, so we don't need any of the async behaviour here anymore.
This part is largely mechanical changes to tests, removing the `await` calls on
`loadURI`, and a follow-up part will remove the actual async logic from
`BrowserTestUtils.loadURI`.
Differential Revision: https://phabricator.services.mozilla.com/D94641
This formed the backbone of the previous process switching codepath, and
shouldn't be necessary anymore thanks to DocumentChannel's new codepath.
This also removes the eager process switching logic from frontend's _loadURI, as
it would rarely be taken, unless an invalid URI was entered, already.
Differential Revision: https://phabricator.services.mozilla.com/D94639
These methods are no longer necessary, as all loads which can trigger process
switches now go through DocumentChannel.
The shouldLoadURI methods on nsIWebBrowserChrome3 are unfortunately still
necessary as they're used by the disabled-by-default "Single-Site Browser"
feature. In the future this may be possible to clean-up.
Differential Revision: https://phabricator.services.mozilla.com/D94638
This moves callers that are using getLocaleInfo to determine the current locale
to render widgets to use the new isAppLocaleRTL method. This will allow us to remove
pref overrides from getLocaleInfo.
Differential Revision: https://phabricator.services.mozilla.com/D96234
This small tweak makes it ergonomic to remove variables from the
inherited environment. Using `null` to signal "removal", distinct
from `undefined` for "ignored", seems to be an accepted idiom in these
types of JS interfaces.
Differential Revision: https://phabricator.services.mozilla.com/D95896
Using `visibility` preserves frames of the content inside the dialog,
which we rely on to print the preview `<browser>` element.
This was working before bug 1662336 mostly by chance, because we were
doing an extra clone and that happened to mostly not rely on the cloned
document being rendered.
I'd rather fix it in the front-end (by not trying to print a
`display: none` <browser>) than going back to do a separate clone,
because that can get expensive (specially with fission).
It's not super-clear to me how to best test the "print from system
dialog" case, but ideas certainly welcome.
Differential Revision: https://phabricator.services.mozilla.com/D95501
This method only is async in order to allow callers to wait for a process switch
triggered by the call to `loadURI` to be finished before resolving. With
DocumentChannel, we should never trigger a process switch eagerly like this
again, so we don't need any of the async behaviour here anymore.
This part is largely mechanical changes to tests, removing the `await` calls on
`loadURI`, and a follow-up part will remove the actual async logic from
`BrowserTestUtils.loadURI`.
Differential Revision: https://phabricator.services.mozilla.com/D94641
This formed the backbone of the previous process switching codepath, and
shouldn't be necessary anymore thanks to DocumentChannel's new codepath.
This also removes the eager process switching logic from frontend's _loadURI, as
it would rarely be taken, unless an invalid URI was entered, already.
Differential Revision: https://phabricator.services.mozilla.com/D94639
These methods are no longer necessary, as all loads which can trigger process
switches now go through DocumentChannel.
The shouldLoadURI methods on nsIWebBrowserChrome3 are unfortunately still
necessary as they're used by the disabled-by-default "Single-Site Browser"
feature. In the future this may be possible to clean-up.
Differential Revision: https://phabricator.services.mozilla.com/D94638
Using `visibility` preserves frames of the content inside the dialog,
which we rely on to print the preview `<browser>` element.
This was working before bug 1662336 mostly by chance, because we were
doing an extra clone and that happened to mostly not rely on the cloned
document being rendered.
I'd rather fix it in the front-end (by not trying to print a
`display: none` <browser>) than going back to do a separate clone,
because that can get expensive (specially with fission).
It's not super-clear to me how to best test the "print from system
dialog" case, but ideas certainly welcome.
Differential Revision: https://phabricator.services.mozilla.com/D95501
- Expose wayland dmabuf related options, which are:
widget.dmabuf-textures.enabled
widget.dmabuf-webgl.enabled
- Expose widget.use-xdg-desktop-portal which enables remote system dialogs like Print/Open/Save.
- Expose general Wayland preferences:
widget.wayland-smooth-rendering - extra buffering of Wayland SW rendering
widget.wayland.use-opaque-region - use transparency hints for Wayland compositor
widget.wayland_vsync.enabled - use independent vsync source
None of them provide sensitive informations.
Differential Revision: https://phabricator.services.mozilla.com/D86939
Using `visibility` preserves frames of the content inside the dialog,
which we rely on to print the preview `<browser>` element.
This was working before bug 1662336 mostly by chance, because we were
doing an extra clone and that happened to mostly not rely on the cloned
document being rendered.
I'd rather fix it in the front-end (by not trying to print a
`display: none` <browser>) than going back to do a separate clone,
because that can get expensive (specially with fission).
It's not super-clear to me how to best test the "print from system
dialog" case, but ideas certainly welcome.
Differential Revision: https://phabricator.services.mozilla.com/D95501
Using `visibility` preserves frames of the content inside the dialog,
which we rely on to print the preview `<browser>` element.
This was working before bug 1662336 mostly by chance, because we were
doing an extra clone and that happened to mostly not rely on the cloned
document being rendered.
I'd rather fix it in the front-end (by not trying to print a
`display: none` <browser>) than going back to do a separate clone,
because that can get expensive (specially with fission).
It's not super-clear to me how to best test the "print from system
dialog" case, but ideas certainly welcome.
Differential Revision: https://phabricator.services.mozilla.com/D95501
This patch uses (and somewhat abuses) the existing PromiseTestUtils
mechanism to also be able to whitelist uncaught errors that are not
actual Promise rejections.
This uses `ChromeUtils.recentJSDevError`, which lets us find out
whether there is a recent ReferenceError/SyntaxError/TypeError in
chrome code, even if that error was caught.
MozReview-Commit-ID: 5z1pffURNYm
Differential Revision: https://phabricator.services.mozilla.com/D94972
This is to prevent issues with parsing the correct hostname for displaying and adding
exceptions for urls like view-source:.
Differential Revision: https://phabricator.services.mozilla.com/D94421
This is to prevent issues with parsing the correct hostname for displaying and adding
exceptions for urls like view-source:.
Differential Revision: https://phabricator.services.mozilla.com/D94421
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
This is a band-aid for now, because I don't know how to best deal with
it.
Probably we should just print the plaintext selection contents,
unstyled, though that's a totally different codepath than what we do for
regular document selection, so probably deserves its own bug. Meanwhile,
this should prevent easy printing failures.
View-selection-source also doesn't deal with it properly so do the same
there too for now.
Differential Revision: https://phabricator.services.mozilla.com/D94595
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Users with certain special characters on the path to the temp dirs where GMPs
are saved would not be able to extract GMPS. This fixes this by escaping
characters such as # so that the URIs to the file are treated correctly.
Differential Revision: https://phabricator.services.mozilla.com/D92088
With session history in the parent, all history loads needs to be
handled by the parent, which means that E10SUtils with session history
in the parent doesn't need to consider that to determine if a uri can
be loaded.
Differential Revision: https://phabricator.services.mozilla.com/D90961
When the user chooses to print using the system dialog, we should hide the print
UI. We are choosing to hide the dialog stack instead of closing the dialog because
the print preview browser still needs to be available if the user tries to print.
We close the window if the user cancels the system dialog or once we receive the
promise from PrintUtils.printWindow.
Differential Revision: https://phabricator.services.mozilla.com/D88096
ChildSHistory.legacySHistory isn't valid for content processes when
session history in the parent is enabled. We try to fix this by either
delegating to the parent by IPC or move the implementation partially
or as a whole to the parent.
Differential Revision: https://phabricator.services.mozilla.com/D89353
Remote Settings still support search shortcuts for the time being but it's considered an obsolete feature that we don't intend to use.
Differential Revision: https://phabricator.services.mozilla.com/D90122
Use browser.privatebrowsing.vpnpromourl pref to control the display and link
param value of the VPN promo in about:privatebrowsing.
Differential Revision: https://phabricator.services.mozilla.com/D89916
This also updates the behavior of the allowDuplicates check:
Instead of only checking if the top dialog is a duplicate, it will now check the whole stack and
skip the dialog open if a duplicate URL is found.
This fixes an issue where callers could alternate between dialogs to bypass the check.
Differential Revision: https://phabricator.services.mozilla.com/D88422
Show the print dialog as soon as the content is ready, rather than after
the printer and print settings have been retrieved, then focuses the first
form element.
Differential Revision: https://phabricator.services.mozilla.com/D88355
In process selection logic, ensure that we don't use the original URI for
about:blank and instead use the result principal. If the about:blank load has a
null principal, then revert to using the original URI.
Also, remove an extra about:blank load when an nsFrameLoaderOwner is changing
remoteness to prevent races.
Differential Revision: https://phabricator.services.mozilla.com/D85081
This patch enables sandboxed srcdoc loads to take place via DocumentChannel,
and adds mechanisms for enabling unsandboxed ones.
Both unsandboxed srcdoc, and in subsequent patches, about:blank, loads require
that the triggering principal and the principal to inherit point to the same
instance if the load takes place in the same process as where we are inheriting
those principals from. We save those principals on a target browsing context before
we load the URI, and later, when we are deserializing LoadInfoArgs into
LoadInfo in the content process, we retrieve the saved principals if the
current load identifier of the target BC matches the load identifier saved
along with the principals.
We also need to make sure that during a process switch for about:srcdoc load,
we don't use the original URI for about:srcdoc to determine the remote type and
instead we use channel's result principal.
Differential Revision: https://phabricator.services.mozilla.com/D85079
Instead of creating an element, flushing styles and getting the computed
value back just to receive, use the existing InspectorUtils.colorToRGBA.
With some refactoring, we can completely get rid of parsing rgba strings
in LightWeightThemeConsumer too, as a benefit. This should be much
faster.
This patch tweaks the InspectorUtils API to allow taking a document, so
that system colors keep working. We could probably get away without
supporting system colors, but it'd technically be a regression, and
since we want this patch to be uplifted, and it's easy, let's avoid
breaking changes.
Differential Revision: https://phabricator.services.mozilla.com/D88200
Instead of creating an element, flushing styles and getting the computed
value back just to receive, use the existing InspectorUtils.colorToRGBA.
With some refactoring, we can completely get rid of parsing rgba strings
in LightWeightThemeConsumer too, as a benefit. This should be much
faster.
This patch tweaks the InspectorUtils API to allow taking a document, so
that system colors keep working. We could probably get away without
supporting system colors, but it'd technically be a regression, and
since we want this patch to be uplifted, and it's easy, let's avoid
breaking changes.
Differential Revision: https://phabricator.services.mozilla.com/D88200
Previously, the browser dialogTemplate contained role="dialog" and the Print modal body had no role.
This caused screen readers to extraneously report "dialog, Print grouping".
Dialogs presented with commonDialog.xhtml (e.g. using Services.prompt.alertBC) did have the dialog role on the body, so screen readers would report "dialog, {dialogTitle} dialog".
To fix this, remove role="dialog" from dialogTemplate.
Instead, SubDialog now sets role="dialog" on the dialog document when it loads.
Now, screen readers report just "Print dialog" and "{dialogTitle} dialog", respectively.
Differential Revision: https://phabricator.services.mozilla.com/D87977
Whenever a top level document load finishes, if it has been five minutes since
the last time we have done so, we record telemetry about the ratio of unique
site origins loaded to the number of loaded tabs. This telemetry is split
across several different histograms, so that it can be used to approximate a
unique origins vs loaded tab count curve.
Differential Revision: https://phabricator.services.mozilla.com/D85072
Add an optional source property for FormHistory that can be defined when bumping,
removing of querying values.
This can be used by consumers to partition FormHistory based on specific sources,
for example the name of the engine used to execute the search.
Differential Revision: https://phabricator.services.mozilla.com/D85489
In process selection logic, ensure that we don't use the original URI for
about:blank and instead use the result principal. If the about:blank load has a
null principal, then revert to using the original URI.
Also, remove an extra about:blank load when an nsFrameLoaderOwner is changing
remoteness to prevent races.
Differential Revision: https://phabricator.services.mozilla.com/D85081
This patch enables sandboxed srcdoc loads to take place via DocumentChannel,
and adds mechanisms for enabling unsandboxed ones.
Both unsandboxed srcdoc, and in subsequent patches, about:blank, loads require
that the triggering principal and the principal to inherit point to the same
instance if the load takes place in the same process as where we are inheriting
those principals from. We save those principals on a target browsing context before
we load the URI, and later, when we are deserializing LoadInfoArgs into
LoadInfo in the content process, we retrieve the saved principals if the
current load identifier of the target BC matches the load identifier saved
along with the principals.
We also need to make sure that during a process switch for about:srcdoc load,
we don't use the original URI for about:srcdoc to determine the remote type and
instead we use channel's result principal.
Differential Revision: https://phabricator.services.mozilla.com/D85079
For making editor performance better and editor code simpler, I want to
stop modifying `Selection` as far as possible. Therefore, I'd like to
get rid of `nsIEditActionListener`. Instead, there is new API,
`nsIEditActionListener::WillDeleteRanges()`. This patch rewrites
`FinderHighlighter#WillDeleteSelection()` to
`FinderHighlighter#WillDeleteRanges()`.
Differential Revision: https://phabricator.services.mozilla.com/D85682
Asserting that features with gates are always disabled seems unnecessary,
and forces changes to the test every time a feature is enabled by default.
Differential Revision: https://phabricator.services.mozilla.com/D85433
Ensure all listeners that are added are cleaned up correctly.
Add an option to remove the overlay when closed and add a promise for when
the dialog is set up.
Differential Revision: https://phabricator.services.mozilla.com/D85307
Ensure all listeners that are added are cleaned up correctly.
Add an option to remove the overlay when closed and add a promise for when
the dialog is set up.
Differential Revision: https://phabricator.services.mozilla.com/D85307
After user ticks the checkbox of allowing error reporting, we will
report the error through the telemetry event. The event includes the
error type, XFO policy, CSP policy, the frame uri and the top-level uri.
Differential Revision: https://phabricator.services.mozilla.com/D82332
This patch adds the UI for allowing users to enable reporting XFO error.
The reporting UI will be displayed in the error page if the error is a
XFO error.
Differential Revision: https://phabricator.services.mozilla.com/D82331
This restores our previous behavior when matching across anonymous
boundaries, as that's not something we currently can support because DOM
ranges can't represent that.
Differential Revision: https://phabricator.services.mozilla.com/D84397
This restores our previous behavior when matching across anonymous
boundaries, as that's not something we currently can support because DOM
ranges can't represent that.
Differential Revision: https://phabricator.services.mozilla.com/D84397