Skip to content

Commit

Permalink
130.0b2
Browse files Browse the repository at this point in the history
  • Loading branch information
bot committed Aug 8, 2024
1 parent 76a52ed commit 5ecbaaf
Show file tree
Hide file tree
Showing 900 changed files with 40,738 additions and 20,055 deletions.
5 changes: 5 additions & 0 deletions firefox-src-part/browser/actors/ContentSearchParent.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,11 @@ export class ContentSearchParent extends JSWindowActorParent {
// the meantime, then we need to update the browser. event.detail will be
// the docshell's new parent <xul:browser> element.
let browser = this.browsingContext.top.embedderElement;
if (!browser) {
// The associated browser has gone away, so there's nothing more we can
// do here.
return;
}
let eventItem = {
type: "Message",
name: msg.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class ScreenshotsComponentChild extends JSWindowActorChild {
case "Screenshots:AddEventListeners":
return this.addEventListeners();
case "Screenshots:MoveFocusToContent":
return this.focusOverlay();
return this.focusOverlay(message.data);
case "Screenshots:ClearFocus":
Services.focus.clearFocus(this.contentWindow);
return null;
Expand Down Expand Up @@ -212,9 +212,9 @@ export class ScreenshotsComponentChild extends JSWindowActorChild {
return methodsUsed;
}

focusOverlay() {
focusOverlay(direction) {
this.contentWindow.focus();
this.#overlay.focus();
this.#overlay.focus(direction);
}

/**
Expand Down
27 changes: 19 additions & 8 deletions firefox-src-part/browser/actors/SearchSERPTelemetryChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -881,9 +881,15 @@ class SearchAdImpression {
let elementRect =
element.ownerGlobal.windowUtils.getBoundsWithoutFlushing(element);

// If the element lacks a dimension, assume all ads that
// were contained within it are hidden.
if (elementRect.width == 0 || elementRect.height == 0) {
// If the parent element is not visible, assume all ads within are
// also not visible.
if (
!element.checkVisibility({
visibilityProperty: true,
opacityProperty: true,
})
) {
Glean.serp.adsBlockedCount.hidden_parent.add();
return {
adsVisible: 0,
adsHidden: adsLoaded,
Expand All @@ -896,6 +902,7 @@ class SearchAdImpression {
elementRect.bottom < 0 &&
innerWindowHeight + scrollY + elementRect.bottom < 0
) {
Glean.serp.adsBlockedCount.beyond_viewport.add();
return {
adsVisible: 0,
adsHidden: adsLoaded,
Expand All @@ -921,15 +928,19 @@ class SearchAdImpression {
let adsVisible = 0;
let adsHidden = 0;
for (let child of childElements) {
let itemRect =
child.ownerGlobal.windowUtils.getBoundsWithoutFlushing(child);

// If the child element we're inspecting has no dimension, it is hidden.
if (itemRect.height == 0 || itemRect.width == 0) {
if (
!child.checkVisibility({
visibilityProperty: true,
opacityProperty: true,
})
) {
adsHidden += 1;
Glean.serp.adsBlockedCount.hidden_child.add();
continue;
}

let itemRect =
child.ownerGlobal.windowUtils.getBoundsWithoutFlushing(child);
// If the child element is to the right of the containing element and
// can't be viewed, skip it. We do this check because some elements like
// carousels can hide additional content horizontally. We don't apply the
Expand Down
122 changes: 80 additions & 42 deletions firefox-src-part/browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,21 @@ pref("browser.urlbar.yelp.priority", false);
// Yelp suggestions are turned on.
pref("browser.urlbar.suggest.yelp", true);

// Feature gate pref for Fakespot suggestions in the urlbar.
pref("browser.urlbar.fakespot.featureGate", false);

// The minimum prefix length of a Fakespot keyword the user must type to trigger
// the suggestion. 0 means the min length should be taken from Nimbus.
pref("browser.urlbar.fakespot.minKeywordLength", 4);

// The index of Fakespot results within the Firefox Suggest section. A negative
// index is relative to the end of the section.
pref("browser.urlbar.fakespot.suggestedIndex", -1);

// If `browser.urlbar.fakespot.featureGate` is true, this controls whether
// Fakespot suggestions are turned on.
pref("browser.urlbar.suggest.fakespot", true);

// The minimum prefix length of addons keyword the user must type to trigger
// the suggestion. 0 means the min length should be taken from Nimbus.
pref("browser.urlbar.addons.minKeywordLength", 0);
Expand Down Expand Up @@ -728,9 +743,6 @@ pref("browser.search.openintab", false);
// context menu searches open in the foreground
pref("browser.search.context.loadInBackground", false);

// Mirrors whether the search-container widget is in the navigation toolbar.
pref("browser.search.widget.inNavBar", false);

// Enables display of the options for the user using a separate default search
// engine in private browsing mode.
pref("browser.search.separatePrivateDefault.ui.enabled", false);
Expand Down Expand Up @@ -900,8 +912,6 @@ pref("browser.tabs.warnOnClose", false);
pref("browser.tabs.warnOnCloseOtherTabs", true);
pref("browser.tabs.warnOnOpen", true);
pref("browser.tabs.maxOpenBeforeWarn", 15);
pref("browser.tabs.loadInBackground", true);
pref("browser.tabs.opentabfor.middleclick", true);
pref("browser.tabs.loadDivertedInBackground", false);
pref("browser.tabs.loadBookmarksInBackground", false);
pref("browser.tabs.loadBookmarksInTabs", false);
Expand Down Expand Up @@ -1228,15 +1238,18 @@ pref("accessibility.typeaheadfind.timeout", 5000);
pref("accessibility.typeaheadfind.linksonly", false);
pref("accessibility.typeaheadfind.flashBar", 1);

// Toggling Search bar on and off in about:preferences
pref("browser.preferences.search", true);
#if defined(NIGHTLY_BUILD)
// Whether we can show the "Firefox Labs" section.
pref("browser.preferences.experimental", true);
#else
pref("browser.preferences.experimental", false);
#endif
pref("browser.preferences.moreFromMozilla", true);
// Whether we had to hide the "Firefox Labs" section because it would be empty.
pref("browser.preferences.experimental.hidden", false);
// Whether we show the "More from Mozilla" section.
pref("browser.preferences.moreFromMozilla", true);

// Used by settings to track whether the user customized advanced
// performance settings. Not used directly elsewhere.
// If set to false, we show advanced performance settings.
// If reset to true **by checking the box in the settings page**,
// we will revert those to the default settings.
pref("browser.preferences.defaultPerformanceSettings.enabled", true);

pref("browser.proton.toolbar.version", 0);
Expand Down Expand Up @@ -1532,6 +1545,7 @@ pref("browser.bookmarks.editDialog.maxRecentFolders", 7);
pref("browser.taskbar.lists.maxListItemCount", 7);
pref("browser.taskbar.lists.tasks.enabled", true);
pref("browser.taskbar.lists.refreshInSeconds", 120);
pref("browser.startMenu.msixPinnedWhenLastChecked", false);
#endif

// Preferences to be synced by default.
Expand Down Expand Up @@ -1715,29 +1729,17 @@ pref("browser.newtabpage.activity-stream.weather.query", "");
pref("browser.newtabpage.activity-stream.weather.display", "simple");

// enable location search for newtab weather widget
#ifdef NIGHTLY_BUILD
pref("browser.newtabpage.activity-stream.weather.locationSearchEnabled", true);
#else
pref("browser.newtabpage.activity-stream.weather.locationSearchEnabled", true);
#endif
pref("browser.newtabpage.activity-stream.weather.locationSearchEnabled", true);

// List of regions that get weather by default.
#ifdef NIGHTLY_BUILD
pref("browser.newtabpage.activity-stream.discoverystream.region-weather-config", "US,CA");
#else
pref("browser.newtabpage.activity-stream.discoverystream.region-weather-config", "");
#endif
pref("browser.newtabpage.activity-stream.discoverystream.region-weather-config", "US,CA");

// List of locales that weather widget supports.
pref("browser.newtabpage.activity-stream.discoverystream.locale-weather-config", "en-US,en-GB,en-CA");

// Preference to enable wallpaper selection in the Customize Menu of new tab page
#ifdef NIGHTLY_BUILD
pref("browser.newtabpage.activity-stream.newtabWallpapers.enabled", true);
pref("browser.newtabpage.activity-stream.newtabWallpapers.v2.enabled", true);
#else
pref("browser.newtabpage.activity-stream.newtabWallpapers.v2.enabled", false);
pref("browser.newtabpage.activity-stream.newtabWallpapers.enabled", false);
#endif
pref("browser.newtabpage.activity-stream.newtabWallpapers.enabled", true);
pref("browser.newtabpage.activity-stream.newtabWallpapers.v2.enabled", true);

// Current new tab page background images.
pref("browser.newtabpage.activity-stream.newtabWallpapers.wallpaper-light", "");
Expand Down Expand Up @@ -1837,12 +1839,24 @@ pref("browser.newtabpage.activity-stream.discoverystream.region-stories-block",
pref("browser.newtabpage.activity-stream.discoverystream.region-stories-config", "US,DE,CA,GB,IE,CH,AT,BE,IN,FR,IT,ES");
// List of regions that support the new recommendations BFF, also requires region-stories-config
pref("browser.newtabpage.activity-stream.discoverystream.region-bff-config", "US,DE,CA,GB,IE,CH,AT,BE,IN,FR,IT,ES");
// Using merino for recommendations in nightly only
#ifdef NIGHTLY_BUILD

// Merino & topic selection related prefs in nightly only
#if defined(EARLY_BETA_OR_EARLIER)
pref("browser.newtabpage.activity-stream.discoverystream.merino-provider.enabled", true);
// List of regions that get topics selection by default.
pref("browser.newtabpage.activity-stream.discoverystream.topicSelection.region-topics-config", "US, CA");
pref("browser.newtabpage.activity-stream.discoverystream.topicSelection.onboarding.enabled", true);
#else
pref("browser.newtabpage.activity-stream.discoverystream.merino-provider.enabled", false);
pref("browser.newtabpage.activity-stream.discoverystream.topicSelection.region-topics-config", "");
pref("browser.newtabpage.activity-stream.discoverystream.topicSelection.onboarding.enabled", false);
#endif

// List of locales that get topics selection by default.
pref("browser.newtabpage.activity-stream.discoverystream.topicSelection.locale-topics-config", "en-US, en-GB, en-CA");
// System pref to enable topic labels on Pocket cards
pref("browser.newtabpage.activity-stream.discoverystream.topicLabels.enabled", true);

pref("browser.newtabpage.activity-stream.discoverystream.merino-provider.endpoint", "merino.services.mozilla.com");
// List of regions that get spocs by default.
pref("browser.newtabpage.activity-stream.discoverystream.region-spocs-config", "US,CA,DE,GB,FR,IT,ES");
Expand All @@ -1851,6 +1865,7 @@ pref("browser.newtabpage.activity-stream.discoverystream.region-basic-config", "

// Add parameters to Pocket feed URL.
pref("browser.newtabpage.activity-stream.discoverystream.pocket-feed-parameters", "");
pref("browser.newtabpage.activity-stream.discoverystream.merino-feed-experiment", false);

// Allows Pocket story collections to be dismissed.
pref("browser.newtabpage.activity-stream.discoverystream.isCollectionDismissible", true);
Expand All @@ -1862,16 +1877,22 @@ pref("browser.newtabpage.activity-stream.discoverystream.recs.personalized", fal
// System pref to allow Pocket sponsored content personalization to be turned on/off.
pref("browser.newtabpage.activity-stream.discoverystream.spocs.personalized", true);

// System pref to enable topic selection for pocket feed
pref("browser.newtabpage.activity-stream.discoverystream.topicSelection.enabled", false);

// Flip this once the user has dismissed the Pocket onboarding experience,
pref("browser.newtabpage.activity-stream.discoverystream.onboardingExperience.dismissed", false);
pref("browser.newtabpage.activity-stream.discoverystream.onboardingExperience.enabled", false);

// Allow users to give thumbs up/down on recommended stories
pref("browser.newtabpage.activity-stream.discoverystream.thumbsUpDown.enabled", false);
pref("browser.newtabpage.activity-stream.discoverystream.thumbsUpDown.searchTopsitesCompact", false);
// List of locales that get thumbs up/down on recommended stories by default.
pref("browser.newtabpage.activity-stream.discoverystream.thumbsUpDown.locale-thumbs-config", "en-US, en-GB, en-CA");

// List of regions that get thumbs up/down on recommended stories by default.
#ifdef EARLY_BETA_OR_EARLIER
pref("browser.newtabpage.activity-stream.discoverystream.thumbsUpDown.region-thumbs-config", "US, CA");
#else
pref("browser.newtabpage.activity-stream.discoverystream.thumbsUpDown.region-thumbs-config", "");
#endif

// Shows users compact layout of Home New Tab page. Also requires region-thumbs-config.
pref("browser.newtabpage.activity-stream.discoverystream.thumbsUpDown.searchTopsitesCompact", true);

// User pref to show stories on newtab (feeds.system.topstories has to be set to true as well)
pref("browser.newtabpage.activity-stream.feeds.section.topstories", true);
Expand Down Expand Up @@ -1937,10 +1958,17 @@ pref("sidebar.visibility", "always-show");
pref("browser.ml.chat.enabled", false);
pref("browser.ml.chat.hideLocalhost", true);
pref("browser.ml.chat.prompt.prefix", 'I’m on page "%tabTitle%" with "%selection|12000%" selected. ');
pref("browser.ml.chat.prompts.0", '{"label":"Summarize","value":"Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.","id":"summarize"}');
pref("browser.ml.chat.prompts.1", '{"label":"Simplify Language","value":"Please rewrite the selection in plain, clear language suitable for a general audience without specialized knowledge. Use all of the following tactics: simple vocabulary; short sentences; active voice; headers and bulleted lists for scannability. Maintain meaning and factual accuracy.","id":"simplify"}');
pref("browser.ml.chat.prompts.2", '{"label":"Quiz Me","value":"Please quiz me on this selection. Ask me a variety of types of questions, for example multiple choice, true or false, and short answer. Wait for my response before moving on to the next question.","id":"quiz","targeting":"!provider|regExpMatch(\'gemini\')"}');
pref("browser.ml.chat.prompts.0", '{"id":"summarize","l10nId":"genai-prompts-summarize"}');
pref("browser.ml.chat.prompts.1", '{"id":"simplify","l10nId":"genai-prompts-simplify"}');
pref("browser.ml.chat.prompts.2", '{"id":"quiz","l10nId":"genai-prompts-quiz","targeting":"!provider|regExpMatch(\'gemini\')"}');
pref("browser.ml.chat.prompts.3", '{"id":"explain","l10nId":"genai-prompts-explain","targeting":"channel==\'nightly\'"}');
pref("browser.ml.chat.provider", "");
pref("browser.ml.chat.shortcuts", true);
#ifdef NIGHTLY_BUILD
pref("browser.ml.chat.shortcuts.custom", true);
#else
pref("browser.ml.chat.shortcuts.custom", false);
#endif
pref("browser.ml.chat.sidebar", true);

pref("security.protectionspopup.recordEventTelemetry", true);
Expand Down Expand Up @@ -2024,7 +2052,7 @@ pref("identity.fxaccounts.commands.missed.fetch_interval", 86400);

// Controls whether this client can send and receive "close tab"
// commands from other FxA clients
pref("identity.fxaccounts.commands.remoteTabManagement.enabled", false);
pref("identity.fxaccounts.commands.remoteTabManagement.enabled", true);

// Controls whether or not the client association ping has values set on it
// when the sync-ui-state:update notification fires.
Expand Down Expand Up @@ -2062,6 +2090,7 @@ pref("media.videocontrols.picture-in-picture.video-toggle.enabled", true);
pref("media.videocontrols.picture-in-picture.video-toggle.visibility-threshold", "1.0");
pref("media.videocontrols.picture-in-picture.keyboard-controls.enabled", true);
pref("media.videocontrols.picture-in-picture.urlbar-button.enabled", true);
pref("media.videocontrols.picture-in-picture.enable-when-switching-tabs.enabled", false);

// TODO (Bug 1817084) - This pref is used for managing translation preferences
// in the Firefox Translations addon. It should be removed when the addon is
Expand Down Expand Up @@ -3034,7 +3063,11 @@ pref("browser.firefox-view.feature-tour", "{\"screen\":\"FIREFOX_VIEW_SPOTLIGHT\
// Number of times the user visited about:firefoxview
pref("browser.firefox-view.view-count", 0);
// Maximum number of rows to show on the "History" page.
pref("browser.firefox-view.max-history-rows", 300);
#ifdef NIGHTLY_BUILD
pref("browser.firefox-view.max-history-rows", 0);
#else
pref("browser.firefox-view.max-history-rows", 300);
#endif
// Enables virtual list functionality in Firefox View.
pref("browser.firefox-view.virtual-list.enabled", true);

Expand Down Expand Up @@ -3140,6 +3173,11 @@ pref("browser.backup.sqlite.pages_per_step", 50);
pref("browser.backup.sqlite.step_delay_ms", 50);
pref("browser.backup.scheduled.idle-threshold-seconds", 300);
pref("browser.backup.scheduled.minimum-time-between-backups-seconds", 3600);
pref("browser.backup.template.fallback-download.release", "https://www.mozilla.org/firefox/download/thanks/?s=direct&utm_medium=firefox-desktop&utm_source=backup&utm_campaign=firefox-backup-2024&utm_content=control");
pref("browser.backup.template.fallback-download.beta", "https://www.mozilla.org/firefox/channel/desktop/?utm_medium=firefox-desktop&utm_source=backup&utm_campaign=firefox-backup-2024&utm_content=control#beta");
pref("browser.backup.template.fallback-download.aurora", "https://www.mozilla.org/firefox/channel/desktop/?utm_medium=firefox-desktop&utm_source=backup&utm_campaign=firefox-backup-2024&utm_content=control#developer");
pref("browser.backup.template.fallback-download.nightly", "https://www.mozilla.org/firefox/channel/desktop/?utm_medium=firefox-desktop&utm_source=backup&utm_campaign=firefox-backup-2024&utm_content=control#nightly");
pref("browser.backup.template.fallback-download.esr", "https://www.mozilla.org/firefox/enterprise/?utm_medium=firefox-desktop&utm_source=backup&utm_campaign=firefox-backup-2024&utm_content=control#download");

// Pref to enable the new profiles
pref("browser.profiles.enabled", false);
Expand Down
1 change: 0 additions & 1 deletion firefox-src-part/browser/base/content/browser-addons.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ var gXPInstallObserver = {
consoleMsg.initWithWindowID(
message,
gBrowser.currentURI.spec,
null,
0,
0,
Ci.nsIScriptError.warningFlag,
Expand Down
3 changes: 1 addition & 2 deletions firefox-src-part/browser/base/content/browser-box.inc.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<hbox flex="1" id="browser">
<box context="sidebar-context-menu" id="sidebar-main" hidden="true">
<html:sidebar-main flex="1">
<html:div id="vertical-tabs" slot="tabstrip">
</html:div>
<html:div id="vertical-tabs" slot="tabstrip" customizable="true"></html:div>
</html:sidebar-main>
</box>
<vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ var FullScreen = {
consoleMsg.initWithWindowID(
message,
gBrowser.currentURI.spec,
null,
0,
0,
Ci.nsIScriptError.warningFlag,
Expand Down
5 changes: 3 additions & 2 deletions firefox-src-part/browser/base/content/browser-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ var gBrowserInit = {
},

onLoad() {
gBrowser.addEventListener("DOMUpdateBlockedPopups", gPopupBlockerObserver);
gBrowser.addEventListener("DOMUpdateBlockedPopups", e =>
PopupBlockerObserver.handleEvent(e)
);
gBrowser.addEventListener(
"TranslationsParent:LanguageState",
FullPageTranslationsPanel
Expand Down Expand Up @@ -383,7 +385,6 @@ var gBrowserInit = {
BookmarkingUI.init();
BrowserSearch.delayedStartupInit();
SearchUIUtils.init();
SearchModeSwitcher.init(window);
gProtectionsHandler.init();
HomePage.delayedStartup().catch(console.error);

Expand Down
7 changes: 5 additions & 2 deletions firefox-src-part/browser/base/content/browser-siteIdentity.js
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ var gIdentityHandler = {
);
}
try {
return this._IDNService.convertToDisplayIDN(this._uri.host, {});
return this._IDNService.convertToDisplayIDN(this._uri.host);
} catch (e) {
// If something goes wrong (e.g. host is an IP address) just fail back
// to the full domain.
Expand Down Expand Up @@ -854,7 +854,10 @@ var gIdentityHandler = {

if (this._isMixedActiveContentLoaded) {
this._identityBox.classList.add("mixedActiveContent");
if (UrlbarPrefs.get("trimHttps") && warnTextOnInsecure) {
if (
UrlbarPrefs.getScotchBonnetPref("trimHttps") &&
warnTextOnInsecure
) {
icon_label = gNavigatorBundle.getString("identity.notSecure.label");
this._identityBox.classList.add("notSecureText");
}
Expand Down
Loading

0 comments on commit 5ecbaaf

Please sign in to comment.