0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2025-01-03 03:10:07 -05:00

upstream v119.0 patch fixes

This commit is contained in:
Bert van der Weerd 2023-10-27 09:45:04 +02:00
parent 7f83a6fd21
commit bab0477af7
No known key found for this signature in database
GPG key ID: 73370A0B9E5516B0
2 changed files with 23 additions and 99 deletions

View file

@ -39,93 +39,15 @@
# put the kinds into a graph and sort topologically so that kinds are loaded
--- a/third_party/python/taskcluster_taskgraph/taskgraph/parameters.py
+++ b/third_party/python/taskcluster_taskgraph/taskgraph/parameters.py
@@ -78,50 +78,80 @@
def _get_defaults(repo_root=None):
repo_path = repo_root or os.getcwd()
repo = get_repository(repo_path)
- try:
- repo_url = repo.get_url()
- parsed_url = mozilla_repo_urls.parse(repo_url)
- project = parsed_url.repo_name
- except (
- CalledProcessError,
- mozilla_repo_urls.errors.InvalidRepoUrlError,
- mozilla_repo_urls.errors.UnsupportedPlatformError,
- ):
- repo_url = ""
- project = ""
+ if repo:
+ try:
+ repo_url = repo.get_url()
+ parsed_url = mozilla_repo_urls.parse(repo_url)
+ project = parsed_url.repo_name
+ except (
+ CalledProcessError,
+ mozilla_repo_urls.errors.InvalidRepoUrlError,
+ mozilla_repo_urls.errors.UnsupportedPlatformError,
+ ):
+ repo_url = ""
+ project = ""
- return {
- "base_repository": repo_url,
- "base_ref": "",
- "base_rev": "",
- "build_date": int(time.time()),
- "build_number": 1,
- "do_not_optimize": [],
- "enable_always_target": True,
- "existing_tasks": {},
- "filters": ["target_tasks_method"],
- "head_ref": repo.branch or repo.head_rev,
- "head_repository": repo_url,
- "head_rev": repo.head_rev,
- "head_tag": "",
- "level": "3",
- "moz_build_date": datetime.now().strftime("%Y%m%d%H%M%S"),
- "next_version": None,
- "optimize_strategies": None,
- "optimize_target_tasks": True,
- "owner": "nobody@mozilla.com",
- "project": project,
- "pushdate": int(time.time()),
- "pushlog_id": "0",
- "repository_type": repo.tool,
- "target_tasks_method": "default",
- "tasks_for": "",
- "version": get_version(repo_path),
- }
+ return {
+ "base_repository": repo_url,
+ "base_ref": "",
+ "base_rev": "",
+ "build_date": int(time.time()),
+ "build_number": 1,
+ "do_not_optimize": [],
+ "enable_always_target": True,
+ "existing_tasks": {},
+ "filters": ["target_tasks_method"],
+ "head_ref": repo.branch or repo.head_rev,
+ "head_repository": repo_url,
+ "head_rev": repo.head_rev,
+ "head_tag": "",
+ "level": "3",
+ "moz_build_date": datetime.now().strftime("%Y%m%d%H%M%S"),
+ "next_version": None,
+ "optimize_strategies": None,
+ "optimize_target_tasks": True,
+ "owner": "nobody@mozilla.com",
+ "project": project,
+ "pushdate": int(time.time()),
+ "pushlog_id": "0",
+ "repository_type": repo.tool,
+ "target_tasks_method": "default",
+ "tasks_for": "",
+ "version": get_version(repo_path),
+ }
+ else:
@@ -83,9 +83,36 @@ def _get_defaults(repo_root=None):
try:
repo = get_repository(repo_path)
except RuntimeError:
- # Use fake values if no repo is detected.
- repo = Mock(branch="", head_rev="", tool="git")
- repo.get_url.return_value = ""
+ # patches/bootstrap.patch - return our object from here, but
+ # it's possible the mock object would have sufficed.
+ return {
+ "base_repository": "SOURCE",
+ "base_ref": "",
@ -155,10 +77,8 @@
+ "version": "",
+ }
defaults_functions = [_get_defaults]
try:
repo_url = repo.get_url()
@@ -193,17 +223,18 @@
return os.path.splitext(os.path.basename(spec))[0]

View file

@ -1,4 +1,4 @@
# LibreWolf firefox-view.patch
x# LibreWolf firefox-view.patch
#
# Author: Malte Jürgens <maltejur@dismail.de>
# Description: Hide "Firefox View" by default and make it work with LibreWolf
@ -23,7 +23,7 @@
<hbox id="TabsToolbar-customization-target" flex="1">
- <toolbarbutton id="firefox-view-button"
- class="toolbarbutton-1 chromeclass-toolbar-additional"
- data-l10n-id="toolbar-button-firefox-view"
- data-l10n-id="toolbar-button-firefox-view-2"
- role="button"
- aria-pressed="false"
- oncommand="FirefoxViewHandler.openTab(event);"
@ -41,7 +41,7 @@
+
+ <toolbarbutton id="firefox-view-button"
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
+ data-l10n-id="toolbar-button-firefox-view"
+ data-l10n-id="toolbar-button-firefox-view-2"
+ role="button"
+ aria-pressed="false"
+ oncommand="FirefoxViewHandler.openTab(event);"
@ -90,12 +90,15 @@
>
<summary class="page-section-header">
<span
diff --git a/browser/components/firefoxview/firefoxview.mjs b/browser/components/firefoxview/firefoxview.mjs
index e30e6c4..d3bd77a 100644
--- a/browser/components/firefoxview/firefoxview.mjs
+++ b/browser/components/firefoxview/firefoxview.mjs
@@ -41,7 +41,26 @@ const launchFeatureTour = () => {
callout.showFeatureCallout();
};
@@ -2,7 +2,28 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+function onPrefChange() {
+ document.getElementById("tab-pickup-container").hidden =
+ Services.prefs.getBoolPref("identity.fxaccounts.enabled") &&
@ -113,12 +116,13 @@
+ "librewolf.firefoxView.hideColorways",
+ "identity.fxaccounts.enabled",
+].forEach((pref) => Services.prefs.addObserver(pref, onPrefChange));
+
+
window.addEventListener("DOMContentLoaded", async () => {
+ onPrefChange();
Services.telemetry.setEventRecordingEnabled("firefoxview", true);
Services.telemetry.recordEvent("firefoxview", "entered", "firefoxview", null);
document.getElementById("recently-closed-tabs-container").onLoad();
if (Cu.isInAutomation) {
Services.obs.notifyObservers(null, "firefoxview-entered");
--- a/browser/components/newtab/lib/OnboardingMessageProvider.jsm
+++ b/browser/components/newtab/lib/OnboardingMessageProvider.jsm
@@ -92,57 +92,6 @@ const BASE_MESSAGES = () => [