Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (17c4dbf31756399ce934ed0d3d63294a2659182f)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (17c4dbf31756399ce934ed0d3d63294a2659182f)
  • Date: Wed, 2 Oct 2024 00:46:45 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

http/firefox/DEPENDS
| 2
http/firefox/DETAILS
| 4
http/firefox/HISTORY
| 5
http/firefox/patches/0028-bmo-1917964-gcc-15-swgl-fix.patch
| 64 +
http/firefox/patches/0029-bmo-1917964-gcc-15-swgl-fix-2.patch
| 327 ++++++++++
http/firefox/patches/0029-bmo-1917964-gcc-15-swgl-fix.patch
| 64 -

http/firefox/patches/0030-bmo-1634961-add-option-to-list-switch-to-open-tabs-in-gnome-shell-provider.patch
| 270 ++++++++

http/firefox/patches/0031-bmo-1921719-dont-crash-in-gnome-shell-if-there-are-no-search-results.patch
| 35 +
8 files changed, 704 insertions(+), 67 deletions(-)

New commits:
commit 17c4dbf31756399ce934ed0d3d63294a2659182f
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

http/firefox: version 131.0, SECURITY_PATCH++

diff --git a/http/firefox/DEPENDS b/http/firefox/DEPENDS
index 0b87f65..1cea29f 100755
--- a/http/firefox/DEPENDS
+++ b/http/firefox/DEPENDS
@@ -51,7 +51,7 @@ depends libwebp "--with-system-webp"
&&

depends nspr "--with-system-nspr" &&

-local NSS_BRANCH="3.103" &&
+local NSS_BRANCH="3.104" &&
if spell_ok nss &&
is_version_less "$(installed_version nss)" "${NSS_BRANCH}"; then
depends -sub "${NSS_BRANCH}" nss "--with-system-nss"
diff --git a/http/firefox/DETAILS b/http/firefox/DETAILS
index 073f400..8e193ba 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,6 +1,6 @@
SPELL=firefox
- VERSION=130.0.1
- SECURITY_PATCH=196
+ VERSION=131.0
+ SECURITY_PATCH=197
SOURCE="${SPELL}-${VERSION}.source.tar.xz"
# Watch: http://releases.mozilla.org/pub/firefox/releases/
/releases/([0-9.]+)/

SOURCE_URL[0]="http://releases.mozilla.org/pub/${SPELL}/releases/${VERSION}/source/${SOURCE}";
diff --git a/http/firefox/HISTORY b/http/firefox/HISTORY
index 84996fb..7f1818d 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,8 @@
+2024-10-01 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 131.0, SECURITY_PATCH++
+ * DEPENDS: nss >= 3.104
+ * patches/*: updated
+
2024-09-16 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 130.0.1
* patches/*: updated
diff --git a/http/firefox/patches/0028-bmo-1917964-gcc-15-swgl-fix.patch
b/http/firefox/patches/0028-bmo-1917964-gcc-15-swgl-fix.patch
new file mode 100644
index 0000000..151289c
--- /dev/null
+++ b/http/firefox/patches/0028-bmo-1917964-gcc-15-swgl-fix.patch
@@ -0,0 +1,64 @@
+
+# HG changeset patch
+# User Sam James <sam AT cmpct.info>
+# Date 1726081531 0
+# Node ID 0249085453e0d5c8378a1a053b94753fd52c956c
+# Parent 3fca72d15659808d8f453b44a13320d4f6ceca86
+Bug 1917964 - Fix swgl build with GCC 15. r=gfx-reviewers,lsalzman
+
+Fix broken specialisations which are exposed by a recent change in GCC trunk.
+
+See https://gcc.gnu.org/PR116666.
+
+Differential Revision: https://phabricator.services.mozilla.com/D221744
+
+diff --git a/gfx/wr/swgl/src/vector_type.h b/gfx/wr/swgl/src/vector_type.h
+--- a/gfx/wr/swgl/src/vector_type.h
++++ b/gfx/wr/swgl/src/vector_type.h
+@@ -235,33 +235,33 @@ struct VectorType {
+ data /= x.data;
+ return *this;
+ }
+ VectorType& operator%=(int x) {
+ data %= x;
+ return *this;
+ }
+
+- VectorType<mask_type, N> operator==(VectorType x) const {
+- return VectorType<mask_type, N>::wrap(data == x.data);
++ VectorType<mask_index, N> operator==(VectorType x) const {
++ return VectorType<mask_index, N>::wrap(data == x.data);
+ }
+- VectorType<mask_type, N> operator!=(VectorType x) const {
+- return VectorType<mask_type, N>::wrap(data != x.data);
++ VectorType<mask_index, N> operator!=(VectorType x) const {
++ return VectorType<mask_index, N>::wrap(data != x.data);
+ }
+- VectorType<mask_type, N> operator<(VectorType x) const {
+- return VectorType<mask_type, N>::wrap(data < x.data);
++ VectorType<mask_index, N> operator<(VectorType x) const {
++ return VectorType<mask_index, N>::wrap(data < x.data);
+ }
+- VectorType<mask_type, N> operator>(VectorType x) const {
+- return VectorType<mask_type, N>::wrap(data > x.data);
++ VectorType<mask_index, N> operator>(VectorType x) const {
++ return VectorType<mask_index, N>::wrap(data > x.data);
+ }
+- VectorType<mask_type, N> operator<=(VectorType x) const {
+- return VectorType<mask_type, N>::wrap(data <= x.data);
++ VectorType<mask_index, N> operator<=(VectorType x) const {
++ return VectorType<mask_index, N>::wrap(data <= x.data);
+ }
+- VectorType<mask_type, N> operator>=(VectorType x) const {
+- return VectorType<mask_type, N>::wrap(data >= x.data);
++ VectorType<mask_index, N> operator>=(VectorType x) const {
++ return VectorType<mask_index, N>::wrap(data >= x.data);
+ }
+
+ VectorType operator!() const { return wrap(!data); }
+ VectorType operator&&(VectorType x) const { return wrap(data & x.data); }
+ VectorType operator||(VectorType x) const { return wrap(data | x.data); }
+
+ VectorType& operator=(VectorType x) {
+ data = x.data;
+
diff --git a/http/firefox/patches/0029-bmo-1917964-gcc-15-swgl-fix-2.patch
b/http/firefox/patches/0029-bmo-1917964-gcc-15-swgl-fix-2.patch
new file mode 100644
index 0000000..a992c73
--- /dev/null
+++ b/http/firefox/patches/0029-bmo-1917964-gcc-15-swgl-fix-2.patch
@@ -0,0 +1,327 @@
+
+# HG changeset patch
+# User Lee Salzman <lsalzman AT mozilla.com>
+# Date 1726239330 0
+# Node ID d36ca9941b2f90d910854e38293875e32c49796b
+# Parent 156543617de576c07a7914dd20d13692ddb0845a
+Bug 1917964 - Use __builtin_convertvector and __builtin_shufflevector on GCC
when available. r=aosmond
+
+GCC upstream recommends we use __builtin_convertvector and
__builtin_shufflevector instead of __builtin_shuffle
+for better code generation.
+
+See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116666#c7
+
+Differential Revision: https://phabricator.services.mozilla.com/D222067
+
+diff --git a/gfx/wr/swgl/src/vector_type.h b/gfx/wr/swgl/src/vector_type.h
+--- a/gfx/wr/swgl/src/vector_type.h
++++ b/gfx/wr/swgl/src/vector_type.h
+@@ -89,16 +89,25 @@ template <>
+ struct VectorMask<uint8_t> {
+ typedef int8_t type;
+ };
+ template <>
+ struct VectorMask<float> {
+ typedef int type;
+ };
+
++# ifdef __has_builtin
++# if __has_builtin(__builtin_convertvector)
++# define HAS_BUILTIN_CONVERTVECTOR
++# endif
++# if __has_builtin(__builtin_shufflevector)
++# define HAS_BUILTIN_SHUFFLEVECTOR
++# endif
++# endif
++
+ template <typename T, int N>
+ struct VectorType {
+ enum { SIZE = N };
+
+ typedef T data_type __attribute__((vector_size(sizeof(T) * N)));
+ typedef typename VectorMask<T>::type mask_index;
+ typedef mask_index mask_type
+ __attribute__((vector_size(sizeof(mask_index) * N)));
+@@ -131,16 +140,23 @@ struct VectorType {
+ VectorType v;
+ v.data = data;
+ return v;
+ }
+
+ T& operator[](size_t i) { return elements[i]; }
+ T operator[](size_t i) const { return elements[i]; }
+
++# ifdef HAS_BUILTIN_CONVERTVECTOR
++ template <typename U, int M>
++ operator VectorType<U, M>() const {
++ return VectorType<U, M>::wrap(
++ __builtin_convertvector(data, typename VectorType<U,
M>::data_type));
++ }
++# else
+ template <typename U>
+ operator VectorType<U, 2>() const {
+ return VectorType<U, 2>::wrap(
+ (typename VectorType<U, N>::data_type){U(x), U(y)});
+ }
+ template <typename U>
+ operator VectorType<U, 4>() const {
+ return VectorType<U, 4>::wrap(
+@@ -168,16 +184,17 @@ struct VectorType {
+ U(elements[10]),
+ U(elements[11]),
+ U(elements[12]),
+ U(elements[13]),
+ U(elements[14]),
+ U(elements[15]),
+ });
+ }
++# endif
+
+ VectorType operator-() const { return wrap(-data); }
+ VectorType operator~() const { return wrap(~data); }
+
+ VectorType operator&(VectorType x) const { return wrap(data & x.data); }
+ VectorType operator&(T x) const { return wrap(data & x); }
+ VectorType operator|(VectorType x) const { return wrap(data | x.data); }
+ VectorType operator|(T x) const { return wrap(data | x); }
+@@ -263,110 +280,107 @@ struct VectorType {
+ VectorType operator&&(VectorType x) const { return wrap(data & x.data); }
+ VectorType operator||(VectorType x) const { return wrap(data | x.data); }
+
+ VectorType& operator=(VectorType x) {
+ data = x.data;
+ return *this;
+ }
+
+- VectorType<T, 4> shuffle(VectorType b, mask_index x, mask_index y,
+- mask_index z, mask_index w) const {
+- return VectorType<T, 4>::wrap(__builtin_shuffle(
+- data, b.data, (typename VectorType<T, 4>::mask_type){x, y, z, w}));
+- }
+- VectorType<T, 8> shuffle(VectorType b, mask_index x, mask_index y,
+- mask_index z, mask_index w, mask_index s,
+- mask_index t, mask_index u, mask_index v) const {
+- return VectorType<T, 8>::wrap(__builtin_shuffle(
+- data, b.data,
+- (typename VectorType<T, 8>::mask_type){x, y, z, w, s, t, u, v}));
+- }
+- VectorType<T, 16> shuffle(VectorType b, mask_index x, mask_index y,
+- mask_index z, mask_index w, mask_index s,
+- mask_index t, mask_index u, mask_index v,
+- mask_index i, mask_index j, mask_index k,
+- mask_index l, mask_index m, mask_index n,
+- mask_index o, mask_index p) const {
+- return VectorType<T, 16>::wrap(
+- __builtin_shuffle(data, b.data,
+- (typename VectorType<T, 16>::mask_type){
+- x, y, z, w, s, t, u, v, i, j, k, l, m, n, o,
p}));
+- }
+-
+- VectorType<T, 4> swizzle(mask_index x, mask_index y, mask_index z,
+- mask_index w) const {
+- return VectorType<T, 4>::wrap(__builtin_shuffle(
+- data, (typename VectorType<T, 4>::mask_type){x, y, z, w}));
+- }
+- VectorType<T, 8> swizzle(mask_index x, mask_index y, mask_index z,
+- mask_index w, mask_index s, mask_index t,
+- mask_index u, mask_index v) const {
+- return VectorType<T, 8>::wrap(__builtin_shuffle(
+- data, (typename VectorType<T, 8>::mask_type){x, y, z, w, s, t, u,
v}));
+- }
+-
+ SI VectorType wrap(half_type low, half_type high) {
+ VectorType v;
+ v.low_half = low;
+ v.high_half = high;
+ return v;
+ }
+
+ VectorType<T, N * 2> combine(VectorType high) const {
+ return VectorType<T, N * 2>::wrap(data, high.data);
+ }
+
+-# define xxxx swizzle(0, 0, 0, 0)
+-# define yyyy swizzle(1, 1, 1, 1)
+-# define zzzz swizzle(2, 2, 2, 2)
+-# define wwww swizzle(3, 3, 3, 3)
+-# define xxyy swizzle(0, 0, 1, 1)
+-# define xxzz swizzle(0, 0, 2, 2)
+-# define yyww swizzle(1, 1, 3, 3)
+-# define zzww swizzle(2, 2, 3, 3)
+-# define xyxy swizzle(0, 1, 0, 1)
+-# define xzxz swizzle(0, 2, 0, 2)
+-# define ywyw swizzle(1, 3, 1, 3)
+-# define zwzw swizzle(2, 3, 2, 3)
+-# define zwxy swizzle(2, 3, 0, 1)
+-# define zyxw swizzle(2, 1, 0, 3)
+-# define xxyz swizzle(0, 0, 1, 2)
+-# define xyyz swizzle(0, 1, 1, 2)
+-# define xyzz swizzle(0, 1, 2, 2)
+-# define xzyw swizzle(0, 2, 1, 3)
+-# define yzwx swizzle(1, 2, 3, 0)
+-# define wxyz swizzle(3, 0, 1, 2)
+-# define wzyx swizzle(3, 2, 1, 0)
+-# define xxxxyyyy XXXXYYYY()
+- VectorType<T, 8> XXXXYYYY() const {
+- return swizzle(0, 0, 0, 0).combine(swizzle(1, 1, 1, 1));
++# ifdef HAS_BUILTIN_SHUFFLEVECTOR
++ template <mask_index... INDEXES, int M = sizeof...(INDEXES)>
++ VectorType<T, M> shuffle(VectorType b) const {
++ return VectorType<T, M>::wrap(
++ __builtin_shufflevector(data, b.data, INDEXES...));
++ }
++
++ template <mask_index... INDEXES, int M = sizeof...(INDEXES)>
++ VectorType<T, M> swizzle() const {
++ return VectorType<T, M>::wrap(
++ __builtin_shufflevector(data, data, INDEXES...));
++ }
++# else
++ template <mask_index... INDEXES, int M = sizeof...(INDEXES)>
++ VectorType<T, M> shuffle(VectorType<T, M> b) const {
++ return VectorType<T, M>::wrap(__builtin_shuffle(
++ data, b.data, (typename VectorType<T, M>::mask_type){INDEXES...}));
++ }
++
++ template <mask_index A, mask_index B, mask_index C, mask_index D,
++ mask_index E, mask_index F, mask_index G, mask_index H>
++ VectorType<T, 8> shuffle(VectorType<T, 4> b) const {
++ return shuffle<A, B, C, D>(b).combine(shuffle<E, F, G, H>(b));
++ }
++
++ template <mask_index A, mask_index B, mask_index C, mask_index D,
++ mask_index E, mask_index F, mask_index G, mask_index H,
++ mask_index I, mask_index J, mask_index K, mask_index L,
++ mask_index W, mask_index X, mask_index Y, mask_index Z>
++ VectorType<T, 16> shuffle(VectorType<T, 4> b) const {
++ return shuffle<A, B, C, D, E, F, G, H>(b).combine(
++ shuffle<I, J, K, L, W, X, Y, Z>(b));
+ }
+-# define zzzzwwww ZZZZWWWW()
+- VectorType<T, 8> ZZZZWWWW() const {
+- return swizzle(2, 2, 2, 2).combine(swizzle(3, 3, 3, 3));
++
++ template <mask_index A, mask_index B, mask_index C, mask_index D,
++ mask_index E, mask_index F, mask_index G, mask_index H,
++ mask_index I, mask_index J, mask_index K, mask_index L,
++ mask_index W, mask_index X, mask_index Y, mask_index Z>
++ VectorType<T, 16> shuffle(VectorType<T, 8> b) const {
++ return shuffle<A, B, C, D, E, F, G, H>(b).combine(
++ shuffle<I, J, K, L, W, X, Y, Z>(b));
+ }
+-# define xyzwxyzw XYZWXYZW()
+- VectorType<T, 8> XYZWXYZW() const { return combine(*this); }
+-# define xyxyxyxy XYXYXYXY()
+- VectorType<T, 8> XYXYXYXY() const {
+- return swizzle(0, 1, 0, 1).combine(swizzle(0, 1, 0, 1));
++
++ template <mask_index... INDEXES, int M = sizeof...(INDEXES)>
++ VectorType<T, M> swizzle() const {
++ return shuffle<INDEXES...>(*this);
+ }
+-# define zwzwzwzw ZWZWZWZW()
+- VectorType<T, 8> ZWZWZWZW() const {
+- return swizzle(2, 3, 2, 3).combine(swizzle(2, 3, 2, 3));
+- }
+-# define xxyyzzww XXYYZZWW()
+- VectorType<T, 8> XXYYZZWW() const {
+- return swizzle(0, 0, 1, 1).combine(swizzle(2, 2, 3, 3));
+- }
+-# define xxxxyyyyzzzzwwww XXXXYYYYZZZZWWWW()
+- VectorType<T, 16> XXXXYYYYZZZZWWWW() {
+- return XXXXYYYY().combine(ZZZZWWWW());
+- }
++# endif
++
++# define SWIZZLE(...) template swizzle<__VA_ARGS__>()
++
++# define xxxx SWIZZLE(0, 0, 0, 0)
++# define yyyy SWIZZLE(1, 1, 1, 1)
++# define zzzz SWIZZLE(2, 2, 2, 2)
++# define wwww SWIZZLE(3, 3, 3, 3)
++# define xxyy SWIZZLE(0, 0, 1, 1)
++# define xxzz SWIZZLE(0, 0, 2, 2)
++# define yyww SWIZZLE(1, 1, 3, 3)
++# define zzww SWIZZLE(2, 2, 3, 3)
++# define xyxy SWIZZLE(0, 1, 0, 1)
++# define xzxz SWIZZLE(0, 2, 0, 2)
++# define ywyw SWIZZLE(1, 3, 1, 3)
++# define zwzw SWIZZLE(2, 3, 2, 3)
++# define zwxy SWIZZLE(2, 3, 0, 1)
++# define zyxw SWIZZLE(2, 1, 0, 3)
++# define xxyz SWIZZLE(0, 0, 1, 2)
++# define xyyz SWIZZLE(0, 1, 1, 2)
++# define xyzz SWIZZLE(0, 1, 2, 2)
++# define xzyw SWIZZLE(0, 2, 1, 3)
++# define yzwx SWIZZLE(1, 2, 3, 0)
++# define wxyz SWIZZLE(3, 0, 1, 2)
++# define wzyx SWIZZLE(3, 2, 1, 0)
++# define xxxxyyyy SWIZZLE(0, 0, 0, 0, 1, 1, 1, 1)
++# define zzzzwwww SWIZZLE(2, 2, 2, 2, 3, 3, 3, 3)
++# define xyzwxyzw SWIZZLE(0, 1, 2, 3, 0, 1, 2, 3)
++# define xyxyxyxy SWIZZLE(0, 1, 0, 1, 0, 1, 0, 1)
++# define zwzwzwzw SWIZZLE(2, 3, 2, 3, 2, 3, 2, 3)
++# define xxyyzzww SWIZZLE(0, 0, 1, 1, 2, 2, 3, 3)
++# define xxxxyyyyzzzzwwww \
++ SWIZZLE(0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3)
+ };
+
+ template <typename T>
+ struct VectorType<T, 2> {
+ typedef T data_type __attribute__((vector_size(sizeof(T) * 2)));
+ union {
+ data_type data;
+ struct {
+@@ -383,17 +397,17 @@ struct VectorType<T, 2> {
+
+ VectorType operator&(VectorType x) const { return wrap(data & x.data); }
+ VectorType operator&(T x) const { return wrap(data & x); }
+ VectorType operator|(VectorType x) const { return wrap(data | x.data); }
+ VectorType operator|(T x) const { return wrap(data | x); }
+ };
+
+ # define CONVERT(vector, type) ((type)(vector))
+-# define SHUFFLE(a, b, ...) a.shuffle(b, __VA_ARGS__)
++# define SHUFFLE(a, b, ...) ((a).template shuffle<__VA_ARGS__>(b))
+
+ template <typename T, int N>
+ SI VectorType<T, N * 2> combine(VectorType<T, N> a, VectorType<T, N> b) {
+ return VectorType<T, N * 2>::wrap(a.data, b.data);
+ }
+
+ template <typename T, int N>
+ SI VectorType<T, N / 2> lowHalf(VectorType<T, N> a) {
+@@ -473,32 +487,25 @@ SI VectorType<T, 8> zip2Low(VectorType<T
+ return SHUFFLE(a, b, 0, 1, 8, 9, 2, 3, 10, 11);
+ }
+
+ template <typename T>
+ SI VectorType<T, 8> zip2High(VectorType<T, 8> a, VectorType<T, 8> b) {
+ return SHUFFLE(a, b, 4, 5, 12, 13, 6, 7, 14, 15);
+ }
+
+-#ifdef __clang__
+ template <typename T>
+ SI VectorType<T, 8> zip(VectorType<T, 4> a, VectorType<T, 4> b) {
+ return SHUFFLE(a, b, 0, 4, 1, 5, 2, 6, 3, 7);
+ }
+
+ template <typename T>
+ SI VectorType<T, 16> zip(VectorType<T, 8> a, VectorType<T, 8> b) {
+ return SHUFFLE(a, b, 0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7,
15);
+ }
+-#else
+-template <typename T, int N>
+-SI VectorType<T, N * 2> zip(VectorType<T, N> a, VectorType<T, N> b) {
+- return combine(zipLow(a, b), zipHigh(a, b));
+-}
+-#endif
+
+ template <typename T>
+ struct Unaligned {
+ template <typename P>
+ SI T load(const P* p) {
+ T v;
+ memcpy(&v, p, sizeof(v));
+ return v;
+
diff --git a/http/firefox/patches/0029-bmo-1917964-gcc-15-swgl-fix.patch
b/http/firefox/patches/0029-bmo-1917964-gcc-15-swgl-fix.patch
deleted file mode 100644
index 151289c..0000000
--- a/http/firefox/patches/0029-bmo-1917964-gcc-15-swgl-fix.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-
-# HG changeset patch
-# User Sam James <sam AT cmpct.info>
-# Date 1726081531 0
-# Node ID 0249085453e0d5c8378a1a053b94753fd52c956c
-# Parent 3fca72d15659808d8f453b44a13320d4f6ceca86
-Bug 1917964 - Fix swgl build with GCC 15. r=gfx-reviewers,lsalzman
-
-Fix broken specialisations which are exposed by a recent change in GCC trunk.
-
-See https://gcc.gnu.org/PR116666.
-
-Differential Revision: https://phabricator.services.mozilla.com/D221744
-
-diff --git a/gfx/wr/swgl/src/vector_type.h b/gfx/wr/swgl/src/vector_type.h
---- a/gfx/wr/swgl/src/vector_type.h
-+++ b/gfx/wr/swgl/src/vector_type.h
-@@ -235,33 +235,33 @@ struct VectorType {
- data /= x.data;
- return *this;
- }
- VectorType& operator%=(int x) {
- data %= x;
- return *this;
- }
-
-- VectorType<mask_type, N> operator==(VectorType x) const {
-- return VectorType<mask_type, N>::wrap(data == x.data);
-+ VectorType<mask_index, N> operator==(VectorType x) const {
-+ return VectorType<mask_index, N>::wrap(data == x.data);
- }
-- VectorType<mask_type, N> operator!=(VectorType x) const {
-- return VectorType<mask_type, N>::wrap(data != x.data);
-+ VectorType<mask_index, N> operator!=(VectorType x) const {
-+ return VectorType<mask_index, N>::wrap(data != x.data);
- }
-- VectorType<mask_type, N> operator<(VectorType x) const {
-- return VectorType<mask_type, N>::wrap(data < x.data);
-+ VectorType<mask_index, N> operator<(VectorType x) const {
-+ return VectorType<mask_index, N>::wrap(data < x.data);
- }
-- VectorType<mask_type, N> operator>(VectorType x) const {
-- return VectorType<mask_type, N>::wrap(data > x.data);
-+ VectorType<mask_index, N> operator>(VectorType x) const {
-+ return VectorType<mask_index, N>::wrap(data > x.data);
- }
-- VectorType<mask_type, N> operator<=(VectorType x) const {
-- return VectorType<mask_type, N>::wrap(data <= x.data);
-+ VectorType<mask_index, N> operator<=(VectorType x) const {
-+ return VectorType<mask_index, N>::wrap(data <= x.data);
- }
-- VectorType<mask_type, N> operator>=(VectorType x) const {
-- return VectorType<mask_type, N>::wrap(data >= x.data);
-+ VectorType<mask_index, N> operator>=(VectorType x) const {
-+ return VectorType<mask_index, N>::wrap(data >= x.data);
- }
-
- VectorType operator!() const { return wrap(!data); }
- VectorType operator&&(VectorType x) const { return wrap(data & x.data); }
- VectorType operator||(VectorType x) const { return wrap(data | x.data); }
-
- VectorType& operator=(VectorType x) {
- data = x.data;
-
diff --git
a/http/firefox/patches/0030-bmo-1634961-add-option-to-list-switch-to-open-tabs-in-gnome-shell-provider.patch

b/http/firefox/patches/0030-bmo-1634961-add-option-to-list-switch-to-open-tabs-in-gnome-shell-provider.patch
new file mode 100644
index 0000000..e5d659b
--- /dev/null
+++
b/http/firefox/patches/0030-bmo-1634961-add-option-to-list-switch-to-open-tabs-in-gnome-shell-provider.patch
@@ -0,0 +1,270 @@
+diff -up firefox-131.0/browser/components/shell/moz.build.D220671
firefox-131.0/browser/components/shell/moz.build
+--- firefox-131.0/browser/components/shell/moz.build.D220671 2024-09-23
19:59:58.000000000 +0200
++++ firefox-131.0/browser/components/shell/moz.build 2024-09-25
08:55:09.196886415 +0200
+@@ -35,8 +35,11 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "coco
+ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
+ XPIDL_SOURCES += [
+ "nsIGNOMEShellService.idl",
++ "nsIOpenTabsProvider.idl",
++ ]
++ EXTRA_JS_MODULES += [
++ "OpenTabsProvider.sys.mjs",
+ ]
+-
+ SOURCES += [
+ "nsGNOMEShellService.cpp",
+ ]
+diff -up
firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp.D220671
firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp
+---
firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp.D220671
2024-09-23 19:59:58.000000000 +0200
++++ firefox-131.0/browser/components/shell/nsGNOMEShellDBusHelper.cpp
2024-09-25 09:01:04.080111999 +0200
+@@ -13,6 +13,8 @@
+ #include "nsPrintfCString.h"
+ #include "mozilla/XREAppData.h"
+ #include "nsAppRunner.h"
++#include "nsImportModule.h"
++#include "nsIOpenTabsProvider.h"
+
+ #define DBUS_BUS_NAME_TEMPLATE "org.mozilla.%s.SearchProvider"
+ #define DBUS_OBJECT_PATH_TEMPLATE "/org/mozilla/%s/SearchProvider"
+@@ -65,12 +67,23 @@ static bool GetGnomeSearchTitle(const ch
+ }
+
+ int DBusGetIndexFromIDKey(const char* aIDKey) {
+- // ID is NN:URL where NN is index to our current history
++ // ID is NN:S:URL where NN is index to our current history
+ // result container.
+ char tmp[] = {aIDKey[0], aIDKey[1], '\0'};
+ return atoi(tmp);
+ }
+
++char DBusGetStateFromIDKey(const char* aIDKey) {
++ // ID is NN:S:URL where NN is index to our current history
++ // result container, and S is the state, which can be 'o'pen or 'h'istory
++ if (std::strlen(aIDKey) > 3) {
++ return aIDKey[3];
++ }
++ // Should never happen, but just to avoid any possible segfault, we
++ // default to state 'history'.
++ return 'h';
++}
++
+ static void ConcatArray(nsACString& aOutputStr, const char** aStringArray) {
+ for (const char** term = aStringArray; *term; term++) {
+ aOutputStr.Append(*term);
+@@ -151,6 +164,7 @@ static already_AddRefed<GVariant> DBusAp
+ aSearchResult->GetSearchResultContainer();
+
+ int index = DBusGetIndexFromIDKey(aID);
++ char state = DBusGetStateFromIDKey(aID);
+ nsCOMPtr<nsINavHistoryResultNode> child;
+ container->GetChild(index, getter_AddRefs(child));
+ nsAutoCString title;
+@@ -164,6 +178,12 @@ static already_AddRefed<GVariant> DBusAp
+ }
+ }
+
++ // Check if the URI state is "open tab". If so, mark it with an asterisk
to
++ // indicate this to the user.
++ if (state == 'o') {
++ title = "(*) "_ns + title;
++ }
++
+ GVariantBuilder b;
+ g_variant_builder_init(&b, G_VARIANT_TYPE("a{sv}"));
+
+@@ -265,6 +285,7 @@ static void ActivateResultID(
+ ConstructCommandLine(std::size(urlList), urlList, nullptr, &tmp);
+ } else {
+ int keyIndex = atoi(aResultID);
++ char state = DBusGetStateFromIDKey(aResultID);
+ nsCOMPtr<nsINavHistoryResultNode> child;
+ aSearchResult->GetSearchResultContainer()->GetChild(keyIndex,
+
getter_AddRefs(child));
+@@ -278,6 +299,22 @@ static void ActivateResultID(
+ return;
+ }
+
++ // If the state of the URI is 'o'pen, we send it along to JS and let
++ // it switch the tab accordingly
++ if (state == 'o') {
++ // If we can't successfully switch to an open tab, use the existing
++ // 'open in a new tab'-mechanism as a fallback.
++ nsresult rv;
++ nsCOMPtr<nsIOpenTabsProvider> provider = do_ImportESModule(
++ "resource:///modules/OpenTabsProvider.sys.mjs", &rv);
++ if (NS_SUCCEEDED(rv)) {
++ rv = provider->SwitchToOpenTab(uri);
++ if (NS_SUCCEEDED(rv)) {
++ return;
++ }
++ }
++ }
++
+ const char* urlList[2] = {"unused", uri.get()};
+ commandLine =
+ ConstructCommandLine(std::size(urlList), urlList, nullptr, &tmp);
+diff -up
firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp.D220671
firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp
+---
firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp.D220671
2024-09-23 19:59:58.000000000 +0200
++++ firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.cpp
2024-09-25 08:55:09.197886449 +0200
+@@ -20,7 +20,8 @@
+ #include "nsServiceManagerUtils.h"
+ #include "mozilla/GUniquePtr.h"
+ #include "mozilla/UniquePtrExtensions.h"
+-
++#include "nsImportModule.h"
++#include "nsIOpenTabsProvider.h"
+ #include "imgIContainer.h"
+ #include "imgITools.h"
+
+@@ -70,7 +71,7 @@ class AsyncFaviconDataReady final : publ
+ int aIconIndex, int aTimeStamp)
+ : mSearchResult(std::move(aSearchResult)),
+ mIconIndex(aIconIndex),
+- mTimeStamp(aTimeStamp) {};
++ mTimeStamp(aTimeStamp) {}
+
+ private:
+ ~AsyncFaviconDataReady() {}
+@@ -412,10 +413,11 @@ nsresult nsGNOMEShellHistoryService::Que
+ }
+
+ static void DBusGetIDKeyForURI(int aIndex, nsAutoCString& aUri,
+- nsAutoCString& aIDKey) {
+- // Compose ID as NN:URL where NN is index to our current history
+- // result container.
+- aIDKey = nsPrintfCString("%.2d:%s", aIndex, aUri.get());
++ nsAutoCString& aIDKey, bool isOpen) {
++ // Compose ID as NN:S:URL where NN is index to our current history
++ // result container and S is the state, which can be 'o'pen or 'h'istory
++ aIDKey =
++ nsPrintfCString("%.2d:%c:%s", aIndex, isOpen ? 'o' : 'h', aUri.get());
+ }
+
+ // Send (as) rearch result reply
+@@ -456,8 +458,15 @@ void nsGNOMEShellHistorySearchResult::Ha
+ new AsyncFaviconDataReady(this, i, mTimeStamp);
+ favIconSvc->GetFaviconDataForPage(iconIri, callback, 0);
+
++ bool isOpen = false;
++ for (const auto& openuri : mOpenTabs) {
++ if (openuri.Equals(uri)) {
++ isOpen = true;
++ break;
++ }
++ }
+ nsAutoCString idKey;
+- DBusGetIDKeyForURI(i, uri, idKey);
++ DBusGetIDKeyForURI(i, uri, idKey, isOpen);
+
+ g_variant_builder_add(&b, "s", idKey.get());
+ }
+@@ -479,8 +488,30 @@ void nsGNOMEShellHistorySearchResult::Re
+ // latest requested search timestamp).
+ if (mSearchProvider->SetSearchResult(this)) {
+ mHistResultContainer = aHistResultContainer;
+- HandleSearchResultReply();
+ }
++
++ // Getting the currently open tabs to mark them accordingly
++ nsresult rv;
++ nsCOMPtr<nsIOpenTabsProvider> provider =
++ do_ImportESModule("resource:///modules/OpenTabsProvider.sys.mjs",
&rv);
++ if (NS_FAILED(rv)) {
++ // Don't fail, just log an error message
++ NS_WARNING("Failed to determine currently open tabs. Using history
only.");
++ }
++
++ nsTArray<nsCString> openTabs;
++ if (provider) {
++ rv = provider->GetOpenTabs(openTabs);
++ if (NS_FAILED(rv)) {
++ // Don't fail, just log an error message
++ NS_WARNING(
++ "Failed to determine currently open tabs. Using history only.");
++ }
++ }
++ // In case of error, we just clear out mOpenTabs with an empty new array
++ mOpenTabs = std::move(openTabs);
++
++ HandleSearchResultReply();
+ }
+
+ void nsGNOMEShellHistorySearchResult::SetHistoryIcon(int aTimeStamp,
+diff -up
firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h.D220671
firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h
+---
firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h.D220671
2024-09-23 19:59:58.000000000 +0200
++++ firefox-131.0/browser/components/shell/nsGNOMEShellSearchProvider.h
2024-09-25 08:55:09.197886449 +0200
+@@ -23,7 +23,7 @@ class nsGNOMEShellSearchProvider;
+
+ class GnomeHistoryIcon {
+ public:
+- GnomeHistoryIcon() : mTimeStamp(-1), mWidth(0), mHeight(0) {};
++ GnomeHistoryIcon() : mTimeStamp(-1), mWidth(0), mHeight(0) {}
+
+ // From which search is this icon
+ void Set(int aTimeStamp, mozilla::UniquePtr<uint8_t[]> aData, int aWidth,
+@@ -58,7 +58,7 @@ class nsGNOMEShellHistorySearchResult :
+ GDBusConnection* aConnection, int
aTimeStamp)
+ : mSearchProvider(aSearchProvider),
+ mConnection(aConnection),
+- mTimeStamp(aTimeStamp) {};
++ mTimeStamp(aTimeStamp) {}
+
+ void SetReply(RefPtr<GDBusMethodInvocation> aReply) {
+ mReply = std::move(aReply);
+@@ -96,6 +96,7 @@ class nsGNOMEShellHistorySearchResult :
+ private:
+ nsGNOMEShellSearchProvider* mSearchProvider;
+ nsCOMPtr<nsINavHistoryContainerResultNode> mHistResultContainer;
++ nsTArray<nsCString> mOpenTabs;
+ nsAutoCString mSearchTerm;
+ RefPtr<GDBusMethodInvocation> mReply;
+ GDBusConnection* mConnection = nullptr;
+diff -up
firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl.D220671
firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl
+--- firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl.D220671
2024-09-25 08:55:09.197886449 +0200
++++ firefox-131.0/browser/components/shell/nsIOpenTabsProvider.idl
2024-09-25 08:55:09.197886449 +0200
+@@ -0,0 +1,19 @@
++/* This Source Code Form is subject to the terms of the Mozilla Public
++ * 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/. */
++
++#include "nsISupports.idl"
++
++[scriptable, uuid(46e3e300-a45a-45b0-ac68-016e9496bf98)]
++interface nsIOpenTabsProvider : nsISupports
++{
++ /**
++ * List of currently open public tabs
++ */
++ Array<AUTF8String> getOpenTabs();
++
++ /**
++ * Function to switch current tab to a given already open URL
++ */
++ void switchToOpenTab(in AUTF8String url);
++};
+diff -up
firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs.D220671
firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs
+--- firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs.D220671
2024-09-25 08:55:09.197886449 +0200
++++ firefox-131.0/browser/components/shell/OpenTabsProvider.sys.mjs
2024-09-25 08:55:09.197886449 +0200
+@@ -0,0 +1,22 @@
++/* This Source Code Form is subject to the terms of the Mozilla Public
++ * 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/. */
++
++const lazy = {};
++
++ChromeUtils.defineESModuleGetters(lazy, {
++ BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
++ UrlbarProviderOpenTabs:
"resource:///modules/UrlbarProviderOpenTabs.sys.mjs",
++});
++
++export function getOpenTabs() {
++ // We only want public tabs, so isInPrivateWindow = false
++ let urls = lazy.UrlbarProviderOpenTabs.getOpenTabUrls(false);
++ return Array.from(urls.keys());
++}
++
++export function switchToOpenTab(url) {
++ // We only want public tabs, so skip private top windows
++ let win = lazy.BrowserWindowTracker.getTopWindow({ private: false });
++ win?.switchToTabHavingURI(url);
++}
diff --git
a/http/firefox/patches/0031-bmo-1921719-dont-crash-in-gnome-shell-if-there-are-no-search-results.patch

b/http/firefox/patches/0031-bmo-1921719-dont-crash-in-gnome-shell-if-there-are-no-search-results.patch
new file mode 100644
index 0000000..b1609af
--- /dev/null
+++
b/http/firefox/patches/0031-bmo-1921719-dont-crash-in-gnome-shell-if-there-are-no-search-results.patch
@@ -0,0 +1,35 @@
+diff --git a/browser/components/shell/nsGNOMEShellSearchProvider.cpp
b/browser/components/shell/nsGNOMEShellSearchProvider.cpp
+--- a/browser/components/shell/nsGNOMEShellSearchProvider.cpp
++++ b/browser/components/shell/nsGNOMEShellSearchProvider.cpp
+@@ -421,10 +421,11 @@
+ }
+
+ // Send (as) rearch result reply
+ void nsGNOMEShellHistorySearchResult::HandleSearchResultReply() {
+ MOZ_ASSERT(mReply);
++ MOZ_ASSERT(mHistResultContainer);
+
+ GVariantBuilder b;
+ g_variant_builder_init(&b, G_VARIANT_TYPE("as"));
+
+ uint32_t childCount = 0;
+@@ -484,14 +485,16 @@
+ void nsGNOMEShellHistorySearchResult::ReceiveSearchResultContainer(
+ nsCOMPtr<nsINavHistoryContainerResultNode> aHistResultContainer) {
+ // Propagate search results to nsGNOMEShellSearchProvider.
+ // SetSearchResult() checks this is up-to-date search (our time stamp
matches
+ // latest requested search timestamp).
+- if (mSearchProvider->SetSearchResult(this)) {
+- mHistResultContainer = aHistResultContainer;
++ if (!mSearchProvider->SetSearchResult(this)) {
++ return;
+ }
+
++ mHistResultContainer = aHistResultContainer;
++
+ // Getting the currently open tabs to mark them accordingly
+ nsresult rv;
+ nsCOMPtr<nsIOpenTabsProvider> provider =
+ do_ImportESModule("resource:///modules/OpenTabsProvider.sys.mjs",
&rv);
+ if (NS_FAILED(rv)) {
+


  • [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (17c4dbf31756399ce934ed0d3d63294a2659182f), Pavel Vinogradov, 10/01/2024

Archive powered by MHonArc 2.6.24.

Top of Page