From ec417bf1e64194123767c071d063ef142879b6aa Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 24 Oct 2026 14:10:52 +0200 Subject: [PATCH] buildMozillaMach: prune patches --- .../139-wayland-drag-animation.patch | 53 ------------------- .../140-bindgen-string-view.patch | 15 ------ .../153-cbindgen-0.29.4-compat.patch | 36 ------------- .../build-mozilla-mach/default.nix | 18 ------- 4 files changed, 122 deletions(-) delete mode 100644 pkgs/build-support/build-mozilla-mach/139-wayland-drag-animation.patch delete mode 100644 pkgs/build-support/build-mozilla-mach/140-bindgen-string-view.patch delete mode 100644 pkgs/build-support/build-mozilla-mach/153-cbindgen-0.29.4-compat.patch diff --git a/pkgs/build-support/build-mozilla-mach/139-wayland-drag-animation.patch b/pkgs/build-support/build-mozilla-mach/139-wayland-drag-animation.patch deleted file mode 100644 index 9e0053a1f336..000000000000 --- a/pkgs/build-support/build-mozilla-mach/139-wayland-drag-animation.patch +++ /dev/null @@ -1,53 +0,0 @@ -# HG changeset patch -# User Dão Gottwald -# Date 1742828426 0 -# Node ID aa8a29bd1fb9668c81475b534b4ceb220dd4fe55 -# Parent 653a7b21210b5b61a36af11b99ccd51e6c85a905 -Bug 1955112 - Finish tab moving animation when a drag session wasn't ended properly. r=dwalker,tabbrowser-reviewers - -Differential Revision: https://phabricator.services.mozilla.com/D242631 - -diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js ---- a/browser/components/tabbrowser/content/tabs.js -+++ b/browser/components/tabbrowser/content/tabs.js -@@ -1012,18 +1012,39 @@ - newMargin *= -1; - } - ind.style.transform = this.verticalMode - ? "translateY(" + Math.round(newMargin) + "px)" - : "translateX(" + Math.round(newMargin) + "px)"; - } - - #setMovingTabMode(movingTab) { -+ if (movingTab == this.#isMovingTab()) { -+ return; -+ } -+ - this.toggleAttribute("movingtab", movingTab); - gNavToolbox.toggleAttribute("movingtab", movingTab); -+ -+ if (movingTab) { -+ // This is a bit of an escape hatch in case a tab drag & drop session -+ // wasn't ended properly, leaving behind the movingtab attribute, which -+ // may break the UI (bug 1954163). We don't get mousemove events while -+ // dragging tabs, so at that point it should be safe to assume that we -+ // should not be in drag and drop mode, and clean things up if needed. -+ requestAnimationFrame(() => { -+ this.addEventListener( -+ "mousemove", -+ () => { -+ this.finishAnimateTabMove(); -+ }, -+ { once: true } -+ ); -+ }); -+ } - } - - #isMovingTab() { - return this.hasAttribute("movingtab"); - } - - #expandGroupOnDrop(draggedTab) { - if ( - diff --git a/pkgs/build-support/build-mozilla-mach/140-bindgen-string-view.patch b/pkgs/build-support/build-mozilla-mach/140-bindgen-string-view.patch deleted file mode 100644 index c67dd36f95a4..000000000000 --- a/pkgs/build-support/build-mozilla-mach/140-bindgen-string-view.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/tools/profiler/rust-api/build.rs b/tools/profiler/rust-api/build.rs -index 9bb27eb83e5e..3f09f7f01bcb 100644 ---- a/tools/profiler/rust-api/build.rs -+++ b/tools/profiler/rust-api/build.rs -@@ -88,6 +88,10 @@ fn generate_bindings() { - // successfully. Otherwise, it fails to build because MarkerSchema has - // some std::strings as its fields. - .opaque_type("std::string") -+ .blocklist_type(".*basic_string_view.*") -+ .opaque_type(".*basic_string_view.*") -+ .blocklist_type(".*basic_string___self_view.*") -+ .opaque_type(".*basic_string___self_view.*") - // std::vector needs to be converted to an opaque type because, if it's - // not an opaque type, bindgen can't find its size properly and - // MarkerSchema's total size reduces. That causes a heap buffer overflow. diff --git a/pkgs/build-support/build-mozilla-mach/153-cbindgen-0.29.4-compat.patch b/pkgs/build-support/build-mozilla-mach/153-cbindgen-0.29.4-compat.patch deleted file mode 100644 index 84238f025fc6..000000000000 --- a/pkgs/build-support/build-mozilla-mach/153-cbindgen-0.29.4-compat.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit c4aab1ba6aadd6985fcd271679d2118f094ec876 -Author: Emilio Cobos Álvarez -Date: Tue Jun 9 22:04:44 2026 +0000 - - Bug 2046162 - Remove some redundant pub qualifiers. r=gfx-reviewers,aosmond - - The enum is not public so this doesn't change behavior but a patch I'm - working on in cbindgen gets a bit confused with this. - - Differential Revision: https://phabricator.services.mozilla.com/D305678 - -diff --git a/gfx/wr/webrender/src/texture_cache.rs b/gfx/wr/webrender/src/texture_cache.rs -index e14c26bd3190..77e1f3a312ac 100644 ---- a/gfx/wr/webrender/src/texture_cache.rs -+++ b/gfx/wr/webrender/src/texture_cache.rs -@@ -273,9 +273,9 @@ enum BudgetType { - } - - impl BudgetType { -- pub const COUNT: usize = 7; -+ const COUNT: usize = 7; - -- pub const VALUES: [BudgetType; BudgetType::COUNT] = [ -+ const VALUES: [BudgetType; BudgetType::COUNT] = [ - BudgetType::SharedColor8Linear, - BudgetType::SharedColor8Nearest, - BudgetType::SharedColor8Glyphs, -@@ -285,7 +285,7 @@ impl BudgetType { - BudgetType::Standalone, - ]; - -- pub const PRESSURE_COUNTERS: [usize; BudgetType::COUNT] = [ -+ const PRESSURE_COUNTERS: [usize; BudgetType::COUNT] = [ - profiler::ATLAS_COLOR8_LINEAR_PRESSURE, - profiler::ATLAS_COLOR8_NEAREST_PRESSURE, - profiler::ATLAS_COLOR8_GLYPHS_PRESSURE, diff --git a/pkgs/build-support/build-mozilla-mach/default.nix b/pkgs/build-support/build-mozilla-mach/default.nix index 3e56cff5d26e..c3ce71df990e 100644 --- a/pkgs/build-support/build-mozilla-mach/default.nix +++ b/pkgs/build-support/build-mozilla-mach/default.nix @@ -327,24 +327,6 @@ buildStdenv.mkDerivation { lib.optionals (lib.versionAtLeast version "136") [ ./136-no-buildconfig.patch ] # Add MOZ_SYSTEM_DIR env var for native messaging host support ++ lib.optionals (lib.versionAtLeast version "133") [ ./133-env-var-for-system-dir.patch ] - ++ lib.optionals (lib.versionAtLeast version "139" && lib.versionOlder version "141") [ - # https://bugzilla.mozilla.org/show_bug.cgi?id=1955112 - # https://hg-edge.mozilla.org/mozilla-central/rev/aa8a29bd1fb9 - ./139-wayland-drag-animation.patch - ] - ++ lib.optionals (lib.versionAtLeast version "140" && lib.versionOlder version "144") [ - # Versions before 144 vendor bindgen 0.69. On Darwin, libc++ 21 changed - # basic_string::__self_view from a typedef to an attributed using alias; - # bindgen then emits it without its template parameter, producing invalid - # Rust. Vendored bindgen was updated in: - # https://bugzilla.mozilla.org/show_bug.cgi?id=1985509 - ./140-bindgen-string-view.patch - ] - ++ lib.optionals (lib.versionAtLeast version "140" && lib.versionOlder version "140.13") [ - # https://github.com/mozilla/cbindgen/issues/1165 - # https://bugzilla.mozilla.org/show_bug.cgi?id=2046162 - ./153-cbindgen-0.29.4-compat.patch - ] ++ extraPatches; postPatch = ''