0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 13:43:04 -05:00

Potentially fix patches

This commit is contained in:
Malte Juergens 2023-12-21 10:34:49 +01:00
parent a2abd2ce55
commit 19b4306973
No known key found for this signature in database
GPG key ID: D29FBD5F93C0CFC3
2 changed files with 11 additions and 115 deletions

View file

@ -1,4 +1,3 @@
diff --git a/services/settings/Attachments.sys.mjs b/services/settings/Attachments.sys.mjs
--- a/services/settings/Attachments.sys.mjs --- a/services/settings/Attachments.sys.mjs
+++ b/services/settings/Attachments.sys.mjs +++ b/services/settings/Attachments.sys.mjs
@@ -133,6 +133,7 @@ export class Downloader { @@ -133,6 +133,7 @@ export class Downloader {
@ -73,10 +72,9 @@ diff --git a/services/settings/Attachments.sys.mjs b/services/settings/Attachmen
} }
async _fetchAttachment(url) { async _fetchAttachment(url) {
diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/RemoteSettingsClient.sys.mjs
--- a/services/settings/RemoteSettingsClient.sys.mjs --- a/services/settings/RemoteSettingsClient.sys.mjs
+++ b/services/settings/RemoteSettingsClient.sys.mjs +++ b/services/settings/RemoteSettingsClient.sys.mjs
@@ -305,6 +305,7 @@ export class RemoteSettingsClient extend @@ -305,6 +305,7 @@ export class RemoteSettingsClient extends EventEmitter {
localFields = [], localFields = [],
keepAttachmentsIds = [], keepAttachmentsIds = [],
lastCheckTimePref, lastCheckTimePref,
@ -84,7 +82,7 @@ diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/
} = {} } = {}
) { ) {
// Remote Settings cannot be used in child processes (no access to disk, // Remote Settings cannot be used in child processes (no access to disk,
@@ -334,6 +335,7 @@ export class RemoteSettingsClient extend @@ -334,6 +335,7 @@ export class RemoteSettingsClient extends EventEmitter {
this._lastCheckTimePref = lastCheckTimePref; this._lastCheckTimePref = lastCheckTimePref;
this._verifier = null; this._verifier = null;
this._syncRunning = false; this._syncRunning = false;
@ -92,7 +90,7 @@ diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/
// This attribute allows signature verification to be disabled, when running tests // This attribute allows signature verification to be disabled, when running tests
// or when pulling data from a dev server. // or when pulling data from a dev server.
@@ -375,9 +377,12 @@ export class RemoteSettingsClient extend @@ -375,9 +377,12 @@ export class RemoteSettingsClient extends EventEmitter {
} }
httpClient() { httpClient() {
@ -108,7 +106,7 @@ diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/
return api.bucket(this.bucketName).collection(this.collectionName); return api.bucket(this.bucketName).collection(this.collectionName);
} }
@@ -600,7 +605,7 @@ export class RemoteSettingsClient extend @@ -604,7 +609,7 @@ export class RemoteSettingsClient extends EventEmitter {
// We want to know which timestamp we are expected to obtain in order to leverage // We want to know which timestamp we are expected to obtain in order to leverage
// cache busting. We don't provide ETag because we don't want a 304. // cache busting. We don't provide ETag because we don't want a 304.
const { changes } = await lazy.Utils.fetchLatestChanges( const { changes } = await lazy.Utils.fetchLatestChanges(
@ -117,46 +115,9 @@ diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/
{ {
filters: { filters: {
collection: this.collectionName, collection: this.collectionName,
diff --git a/toolkit/components/translations/actors/TranslationsParent.sys.mjs b/toolkit/components/translations/actors/TranslationsParent.sys.mjs
--- a/toolkit/components/translations/actors/TranslationsParent.sys.mjs --- a/toolkit/components/translations/actors/TranslationsParent.sys.mjs
+++ b/toolkit/components/translations/actors/TranslationsParent.sys.mjs +++ b/toolkit/components/translations/actors/TranslationsParent.sys.mjs
@@ -854,9 +854,8 @@ export class TranslationsParent extends @@ -1143,7 +1143,9 @@ export class TranslationsParent extends JSWindowActorParent {
// Place the records into a promise to prevent any races.
TranslationsParent.#languageIdModelRecord = (async () => {
/** @type {LanguageIdModelRecord[]} */
- let modelRecords = await TranslationsParent.getMaxVersionRecords(
- client
- );
+ let modelRecords =
+ await TranslationsParent.getMaxVersionRecords(client);
if (modelRecords.length === 0) {
throw new Error(
@@ -881,7 +880,10 @@ export class TranslationsParent extends
try {
/** @type {{buffer: ArrayBuffer}} */
const { buffer } = await client.attachments.download(
- await TranslationsParent.#languageIdModelRecord
+ await TranslationsParent.#languageIdModelRecord,
+ {
+ serverUrl: "https://firefox.settings.services.mozilla.com/v1",
+ }
);
const duration = (Date.now() - now) / 1000;
@@ -968,7 +970,10 @@ export class TranslationsParent extends
/** @type {{buffer: ArrayBuffer}} */
const { buffer } = await client.attachments.download(
- await TranslationsParent.#languageIdWasmRecord
+ await TranslationsParent.#languageIdWasmRecord,
+ {
+ serverUrl: "https://firefox.settings.services.mozilla.com/v1",
+ }
);
const duration = (Date.now() - start) / 1000;
@@ -1147,7 +1152,9 @@ export class TranslationsParent extends
} }
/** @type {RemoteSettingsClient} */ /** @type {RemoteSettingsClient} */
@ -167,7 +128,7 @@ diff --git a/toolkit/components/translations/actors/TranslationsParent.sys.mjs b
TranslationsParent.#translationModelsRemoteClient = client; TranslationsParent.#translationModelsRemoteClient = client;
client.on("sync", TranslationsParent.#handleTranslationsModelsSync); client.on("sync", TranslationsParent.#handleTranslationsModelsSync);
return client; return client;
@@ -1456,7 +1463,10 @@ export class TranslationsParent extends @@ -1489,7 +1491,10 @@ export class TranslationsParent extends JSWindowActorParent {
/** @type {{buffer: ArrayBuffer}} */ /** @type {{buffer: ArrayBuffer}} */
const { buffer } = await client.attachments.download( const { buffer } = await client.attachments.download(
@ -179,7 +140,7 @@ diff --git a/toolkit/components/translations/actors/TranslationsParent.sys.mjs b
); );
const duration = Date.now() - start; const duration = Date.now() - start;
@@ -1507,7 +1517,9 @@ export class TranslationsParent extends @@ -1540,7 +1545,9 @@ export class TranslationsParent extends JSWindowActorParent {
)) { )) {
const download = () => { const download = () => {
lazy.console.log("Downloading record", record.name, record.id); lazy.console.log("Downloading record", record.name, record.id);
@ -190,7 +151,7 @@ diff --git a/toolkit/components/translations/actors/TranslationsParent.sys.mjs b
}; };
queue.push({ download }); queue.push({ download });
} }
@@ -1531,7 +1543,10 @@ export class TranslationsParent extends @@ -1564,7 +1571,10 @@ export class TranslationsParent extends JSWindowActorParent {
onFailure: () => { onFailure: () => {
console.error("Failed to download", record.name); console.error("Failed to download", record.name);
}, },
@ -202,7 +163,7 @@ diff --git a/toolkit/components/translations/actors/TranslationsParent.sys.mjs b
}); });
} }
@@ -1700,7 +1715,9 @@ export class TranslationsParent extends @@ -1727,7 +1737,9 @@ export class TranslationsParent extends JSWindowActorParent {
await chaosMode(1 / 3); await chaosMode(1 / 3);
/** @type {{buffer: ArrayBuffer }} */ /** @type {{buffer: ArrayBuffer }} */

View file

@ -8,10 +8,9 @@
# This patch removes the Firefox View from the toolbar by default. Users can # This patch removes the Firefox View from the toolbar by default. Users can
# enable it again by using the "Customize Toolbar" mode and dragging it back to # enable it again by using the "Customize Toolbar" mode and dragging it back to
# the titlebar. # the titlebar.
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
--- a/browser/base/content/browser.js --- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js +++ b/browser/base/content/browser.js
@@ -9929,10 +9929,11 @@ var FirefoxViewHandler = { @@ -9940,10 +9940,11 @@ var FirefoxViewHandler = {
!this._enabled !this._enabled
); );
document.getElementById("menu_openFirefoxView").hidden = !this._enabled; document.getElementById("menu_openFirefoxView").hidden = !this._enabled;
@ -27,7 +26,6 @@ diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
}, },
onWidgetRemoved(aWidgetId) { onWidgetRemoved(aWidgetId) {
if (aWidgetId == this.BUTTON_ID && this.tab) { if (aWidgetId == this.BUTTON_ID && this.tab) {
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
--- a/browser/base/content/navigator-toolbox.inc.xhtml --- a/browser/base/content/navigator-toolbox.inc.xhtml
+++ b/browser/base/content/navigator-toolbox.inc.xhtml +++ b/browser/base/content/navigator-toolbox.inc.xhtml
@@ -35,16 +35,6 @@ @@ -35,16 +35,6 @@
@ -47,7 +45,7 @@ diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/con
<tabs id="tabbrowser-tabs" <tabs id="tabbrowser-tabs"
is="tabbrowser-tabs" is="tabbrowser-tabs"
aria-multiselectable="true" aria-multiselectable="true"
@@ -716,5 +706,15 @@ @@ -712,5 +702,15 @@
closemenu="none" closemenu="none"
cui-areatype="toolbar" cui-areatype="toolbar"
data-l10n-id="navbar-library"/> data-l10n-id="navbar-library"/>
@ -63,7 +61,6 @@ diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/con
+ removable="true"/> + removable="true"/>
</html:template> </html:template>
</toolbox> </toolbox>
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
--- a/browser/components/customizableui/CustomizableUI.sys.mjs --- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs +++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -287,7 +287,6 @@ var CustomizableUIInternal = { @@ -287,7 +287,6 @@ var CustomizableUIInternal = {
@ -93,7 +90,6 @@ diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/
// Unified Extensions addon button migration, which puts any browser action // Unified Extensions addon button migration, which puts any browser action
// buttons in the overflow menu into the addons panel instead. // buttons in the overflow menu into the addons panel instead.
if (currentVersion < 19) { if (currentVersion < 19) {
diff --git a/browser/components/firefoxview/firefoxview.html b/browser/components/firefoxview/firefoxview.html
--- a/browser/components/firefoxview/firefoxview.html --- a/browser/components/firefoxview/firefoxview.html
+++ b/browser/components/firefoxview/firefoxview.html +++ b/browser/components/firefoxview/firefoxview.html
@@ -61,6 +61,7 @@ @@ -61,6 +61,7 @@
@ -104,64 +100,3 @@ diff --git a/browser/components/firefoxview/firefoxview.html b/browser/component
> >
<summary class="page-section-header"> <summary class="page-section-header">
<span <span
diff --git a/browser/components/newtab/lib/OnboardingMessageProvider.jsm b/browser/components/newtab/lib/OnboardingMessageProvider.jsm
--- a/browser/components/newtab/lib/OnboardingMessageProvider.jsm
+++ b/browser/components/newtab/lib/OnboardingMessageProvider.jsm
@@ -78,57 +78,6 @@ const BASE_MESSAGES = () => [
trigger: { id: "protectionsPanelOpen" },
},
{
- id: "CFR_FIREFOX_VIEW",
- groups: ["cfr"],
- template: "cfr_doorhanger",
- //If Firefox View button has been moved to the overflow menu, we want to change the anchor element
- content: {
- bucket_id: "CFR_FIREFOX_VIEW",
- anchor_id: "firefox-view-button",
- alt_anchor_id: "nav-bar-overflow-button",
- layout: "icon_and_message",
- icon: "chrome://browser/content/cfr-lightning.svg",
- icon_dark_theme: "chrome://browser/content/cfr-lightning-dark.svg",
- icon_class: "cfr-doorhanger-small-icon",
- heading_text: {
- string_id: "firefoxview-cfr-header-v2",
- },
- text: {
- string_id: "firefoxview-cfr-body-v2",
- },
- buttons: {
- primary: {
- label: {
- string_id: "firefoxview-cfr-primarybutton",
- },
- action: {
- type: "OPEN_FIREFOX_VIEW",
- navigate: true,
- },
- },
- secondary: [
- {
- label: {
- string_id: "firefoxview-cfr-secondarybutton",
- },
- action: {
- type: "CANCEL",
- },
- },
- ],
- },
- skip_address_bar_notifier: true,
- },
- frequency: {
- lifetime: 1,
- },
- trigger: {
- id: "nthTabClosed",
- },
- // Avoid breaking existing tests that close tabs for now.
- targeting: `!inMr2022Holdback && fxViewButtonAreaType != null && (currentDate|date - profileAgeCreated) / 86400000 >= 2 && tabsClosedCount >= 3 && 'browser.firefox-view.view-count'|preferenceValue == 0 && !'browser.newtabpage.activity-stream.asrouter.providers.cfr'|preferenceIsUserSet`,
- },
- {
id: "FX_MR_106_UPGRADE",
template: "spotlight",
targeting: "true",