This required migrating several strings to Fluent, and the bulk of this patch
is those migrations. The rest of the items matched up with an entry in the app
menu, so those items were switched over to use the app menu strings, and one
had to be copied in order to avoid adding a tooltip to the app menu item.
Differential Revision: https://phabricator.services.mozilla.com/D124270
The purpose of this stack of patches is to stop using color variables directly in newtab CSS in favour of the semantic variables defined in _theme.scss. That way, we can later refactor _theme.scss to use theme variables instead of hardcoded colors.
There's a lot of dead CSS/components in new tab. This stack of patches refactors dead code as well, mostly because it's not clear what is dead and what is not. I tried to keep things generally looking the same on visible surfaces, but there are some minor style differences in dead components and in asrouter devtools. I spoke to Mardak on Slack and he confirmed it would be okay to slightly change the look of dead components. Scott, I tagged you for review since you know what is dead and what is not.
Differential Revision: https://phabricator.services.mozilla.com/D124397
I confirmed with Julian Gaibler that we don't want to show screenshots as fallbacks in Top Sites. We still want to support custom icons and screenshots in the "Recent activity" section, both of which are unchanged.
Differential Revision: https://phabricator.services.mozilla.com/D123253
Trying to make _onQuitApplicationGranted more robust, copying the method used for idle tasks.
If successful, we could re-apply the same method to other parts of browserglue doing init/uninit.
To fail tests, this is crashing fatally, it would be nice if we could fail single tests, but
quit-application-granted is too late for test harness failure detection.
Differential Revision: https://phabricator.services.mozilla.com/D124380
This telemetry shows how users usually react with blocked downloads.
I want to monitor this data to understand the accuracy of the download protection service.
Differential Revision: https://phabricator.services.mozilla.com/D124053
This adds a `quickSuggestScenario` Nimbus variable.
We could use the `quickSuggestShouldShowOnboardingDialog` variable to
distinguish between offline and online on the client, since offline won't get
the onboarding but online will. However, using a separate variable would be
clearer and possibly less confusing for stakeholders, and it would also allow us
to have finer control over the onboarding prompt if we need it.
We'll need to distinguish between the two scenarios on the client for telemetry
pings, tweaks to the preferences UI, and possibly other things.
Differential Revision: https://phabricator.services.mozilla.com/D124844
* Use the new path from check.svg in each frame
* Use clip-paths rather than the mask & stroke-width properties to do the clipping in each frame
* Pick up the fill (white) color from CSS using currentColor rather than hardcoding in the SVG
Differential Revision: https://phabricator.services.mozilla.com/D124410
Windows 11's Snap Layouts feature generates a window of layout options when the maximize window button is moused over. This requires the WM_NCHITTEST message to handle hit detection for the button. Since WM_NCHITTEST messages are very common, although we limit them to no more than every 50ms, we don't want to do a full hit test each time. Instead, we cache the maximize button rect in the widget when it is positioned during layout.
Differential Revision: https://phabricator.services.mozilla.com/D123982
The page contains
- a table to show the tabs and their attributes that `TabUnloader` considers
- a button to trigger `TabUnloader.unloadLeastRecentlyUsedTab()`
to visualize the behavior of `TabUnloader` and manually trigger it.
Differential Revision: https://phabricator.services.mozilla.com/D123988
The patch includes the following updates:
- getAllProcesses() adds a per-tab map to hold the processes backed by
the process to a tab so that we don't need to iterateprocesses twice.
- Consider a process that hosts multiple frames in a single tab as
a unique process because such processes are terminated when
that single tab is unloaded.
- Add `TabUnloader.isDiscardable()`
Differential Revision: https://phabricator.services.mozilla.com/D123986
Summary of changes:
* Remove the Sponsored action text for Firefox Suggest sponsored results
* Instead show Sponsored below their titles
* Remove the Firefox Suggest action text for non-sponsored results
This uses the action text for "Sponsored" as we do now, but it wraps it below
the title.
The Figma spec (link in Jira ticket) shows URLs in Firefox Suggest results, the
same as history results. I asked Natalie about it, and that's not correct, or at
least we shouldn't implement that now. If we do need to show URLs, then this
approach is probably worse than D124519 because wrapping the action would also
force the URL on a new line since the URL comes after it.
Differential Revision: https://phabricator.services.mozilla.com/D124563
This implements the spec in https://mozilla-hub.atlassian.net/browse/SNT-26, but
Natalie and I have made some tweaks over Slack that aren't reflected in that
ticket.
We want to move the Firefox Suggest preferences from the Search pane to the
Address Bar section of the Privacy pane. There are now two Firefox Suggest
checkboxes instead of one: a main one that enables Firefox Suggest suggestions
and another one that enables sponsored suggestions separately. If the main one
is checked but the sponsored one isn't, then the user will see only
non-sponsored suggestions.
I renamed and modified the browser_searchQuickSuggest.js test I added in
D105701, but a lot of the test changed and it's probably not helpful to look at
the diff against the old version.
Previously strings were hardcoded in search.js. I've added the new ones to the
new preview Fluent file for Firefox Suggest.
Depends on D124300
Differential Revision: https://phabricator.services.mozilla.com/D124431
The Jira ticket (link in the bug) calls for two separate checkboxes for Firefox
Suggest results: a main checkbox plus a sponsored-suggestions checkbox. The
sponsored-suggestions checkbox is subordinate to the main checkbox, i.e., the
main checkbox has to be checked to turn on sponsored suggestions. This will
allow users to toggle sponsored suggestions separately from non-sponsored
suggestions. It's a change from the current situation where we have only one
pref and checkbox that control both sponsored and non-sponsored suggestions.
So part 1 of fixing this bug is to add a new pref for sponsored suggestions.
This revision keeps the current `suggest.quicksuggest` pref as the main pref and
adds a new `suggest.quicksuggest.sponsored` pref. I confirmed with Natalie that
we want to enable both prefs when the user opts in through the onboarding
dialog.
We currently record a telemetry event when `suggest.quicksuggest` is toggled. We
also want a similar event for the new pref, so this adds one.
The pref situation for Firefox Suggest is confusing but in summary:
* `browser.urlbar.quicksuggest.enabled`: The global toggle for the entire
Firefox Suggest rollout involving sponsored and non-sponsored suggestions, the
related telemetry and preferences UI, etc. This pref can be overridden by the
`quickSuggestEnabled` Nimbus variable. If false, neither sponsored nor
non-sponsored suggestions will be shown. If true, then we look at the
individual `suggest.quicksuggest` and `suggest.quicksuggest.sponsored` prefs.
* `browser.urlbar.suggest.quicksuggest`: Whether any Firefox Suggest results are
shown. This must be true to show both non-sponsored and sponsored results.
* `browser.urlbar.suggest.quicksuggest.sponsored`: Whether sponsored Firefox
Suggest results are shown. Both this pref and `suggest.quicksuggest` must be
true to show sponsored results.
Differential Revision: https://phabricator.services.mozilla.com/D124300
This required migrating several strings to Fluent, and the bulk of this patch
is those migrations. The rest of the items matched up with an entry in the app
menu, so those items were switched over to use the app menu strings.
Differential Revision: https://phabricator.services.mozilla.com/D124270
Enables autofilling into fields that may have been filled by the site.
Enables autofill preview to work as expected if a field already has a value.
Ensures autofill does not restore the default value if the user manually clears out the field's value.
This fixes the case on next.co.uk where the value of the cardholder name is being used as a placeholder.
Differential Revision: https://phabricator.services.mozilla.com/D123260
Disabled by default, browser.places.interactions.enabled, this adds scrolling metrics (time spent scrolling and distance scrolled) to the history metadata.
Differential Revision: https://phabricator.services.mozilla.com/D120656
Right now when using the OS/portal provided sharing dialog, the
selection in Firefox:
- does not serve any purpose as the sharing dialog is the only option
- unnecessarily add two more clicks and potentially confusion
Thus lets pre-select the OS sharing dialog in this case.
Differential Revision: https://phabricator.services.mozilla.com/D124332
This addresses a few things:
- it doesn't really make sense to have 2 different badge implementations
for the library and the panel. Just use the panel one for the library.
- remove the old badge itself
- remove a bunch of old CSS to do with the old badge
- rename the 'new' badge now it isn't new anymore
- share the badge styling between the 'all downloads' view (about:downloads
and the library) and the downloads panel
- use the downloadMainArea for hover styling of the non-button bit, and
update the JS to set the downloadHoveringButton class appropriately for
this new reality.
- tighten up hover styles so we don't get a weird double hover for the
blocked download case
- tighten up margins of the button, badge and progress meter (see also
https://bugzilla.mozilla.org/show_bug.cgi?id=1725837). This is also
helped by the fact that the renaming means we now properly hide the
badge image when the download isn't blocked; the CSS at
https://searchfox.org/mozilla-central/rev/a1ab92e0b16631465a946b300493e75be0eacc37/browser/components/downloads/content/downloads.css#44-47
didn't apply to this badge pre-patch.
Differential Revision: https://phabricator.services.mozilla.com/D123169
This patch adds a new flag to the ContentBlockingCategoriesPrefs and
enable the feature in strict mode and PBM. Also, this patch set the pref
to true in the ETP custom mode.
Differential Revision: https://phabricator.services.mozilla.com/D123769
* Refactor to call a toggle function in the various places we want to show or hide the debug info
* Add a href to the error link and preventDefault() on it to get proper link keyboard a11y
* Show/hide the debug info with the hidden property
Differential Revision: https://phabricator.services.mozilla.com/D122884
This uses `TelemetryStopwatch` to record the time between the `fetch` start and
its resolve. The new histogram is `FX_URLBAR_MERINO_LATENCY_MS`.
Depends on D124132
Differential Revision: https://phabricator.services.mozilla.com/D123993
This looks for a `score` property in suggestions from both Merino and remote
settings and picks the suggestion with the highest score. The score is intended
to be normalized -- i.e., in the range [0, 1] -- but currently it doesn't
matter. As discussed, I hardcoded a score of 0.2 for remote settings
suggestions.
When Merino returns multiple suggestions, currently we're just picking the first
one, but now we can pick the one with the highest score without any extra work,
so I went ahead and made sure we handle that now.
Also, this is robust against Merino not including a `score` in the response. In
that case we'll prefer the remote settings suggestion if there is one, and we'll
use the Merino suggestion if there's not.
Finally I added some new test tasks that aren't specifically related to scoring:
testing cases where either Merino or remote settings returns suggestions but not
both. I noticed I missed those cases earlier.
Differential Revision: https://phabricator.services.mozilla.com/D124132
* Resize progress bar to 4px to match spec, rounding the ends of the bar and its tray
* Define and use a set of CSS variables for the progressbar tray color, bar fill and paused fill
* Use the theme's icon attention color for the main progressbar color - when defined - to match the download indicator in the toolbar
* Use a --download-progress-flare-color variable for the highlight color in the indeterminate download animation, which lets us invert the colors in a selected item.
* Remove exceptions/overrides for windows and osx
* Match colors where possible in Places and about:downloads, ensuring we always have contrast in selected download richlistitems
Differential Revision: https://phabricator.services.mozilla.com/D122543
* Resize progress bar to 4px to match spec, rounding the ends of the bar and its tray
* Define and use a set of CSS variables for the progressbar tray color, bar fill and paused fill
* Use the theme's icon attention color for the main progressbar color - when defined - to match the download indicator in the toolbar
* Use a --download-progress-flare-color variable for the highlight color in the indeterminate download animation, which lets us invert the colors in a selected item.
* Remove exceptions/overrides for windows and osx
* Match colors where possible in Places and about:downloads, ensuring we always have contrast in selected download richlistitems
Differential Revision: https://phabricator.services.mozilla.com/D122543
browser_ext_incognito_views.js is failing intermittently in optimized builds due to a race between
a browserAction popup being opened as part of the test task and the related window being closed at the
end of the same test task.
This patch moves the responsability of closing the browserAction popup and the window to the chrome-privileged
part of the test, and makes sure that we are explicitly waiting for the browserAction popup to be opened and
loaded and then completely closed before removing the related Firefox window.
Differential Revision: https://phabricator.services.mozilla.com/D124047
This bug was originally about changing the size of this text, but we aren't
really able to do that. We are however able to improve its legibility by giving
it some additional contrast against the background.
Based on the specs (and also on intuition, to be honest), I believe only the
"normal" download status text should be getting any reduced opacity, and the
error message states should not. So this patch undoes the opacity reduction in
the error states.
Differential Revision: https://phabricator.services.mozilla.com/D123659
This patch addresses two points where the badge on the download status toolbar
button's badge was not quite meeting the MR1 design spec:
1) The badge for the "uncommon download" safe browsing verdict should be "info"
(currently a blue circle) and not "warning" (a yellow triangle).
2) The badge (regardless of its type) should not appear while the "finished"
animation is playing, only after it completes.
Differential Revision: https://phabricator.services.mozilla.com/D123818
This integrates a fetch to Merino in UrlbarProviderQuickSuggest. We continue to
do the remote settings fetch too. Per the Jira ticket, we should prefer the
Merino suggestion when both sources return one.
Each fetch is controlled by a new pref and Nimbus variable, so we can enable
them independently.
At first I started making a UrlbarProviderMerino class, but it's better to
modify UrlbarProviderQuickSuggest because everything besides the fetch source is
the same: We want to collect the same telemetry, have the same results and
payloads, etc.
Depends on D123852
Differential Revision: https://phabricator.services.mozilla.com/D123707
There are two big parts in the MSVC toolchain we use:
- the Windows 10 SDK
- Visual C++
For the former, both the 15.8.4 and 15.9.6 toolchains are using the same
version of the Win10 SDK.
For the latter, we're not using the compiler itself anymore, so the only
substantial difference is in the headers and libraries included with
Visual C++, as well as the redist libraries for the CRT. Both versions
are supposed to be compatible to the same set of OS versions, fitting
our system requirements.
This makes us use the same version of MSVC on all our Windows builds
(arm64 builds were already on 15.9.6).
Differential Revision: https://phabricator.services.mozilla.com/D123720
Prevent simple hidden fields from being eligible for autofill.
'Simple' in this case means fields that have the hidden attribute or 'display:none' inline property.
Differential Revision: https://phabricator.services.mozilla.com/D120669
The toolbarseparator is added the first time a subview is opened. However for subsequent times the header already exists and we bailed out early without adding the separator.
Differential Revision: https://phabricator.services.mozilla.com/D122907
The toolbarseparator is added the first time a subview is opened. However for subsequent times the header already exists and we bailed out early without adding the separator.
Differential Revision: https://phabricator.services.mozilla.com/D122907