sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (f3b46692fd30361e85c1718ca1db3ec8fbd89f0c)
- 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 (f3b46692fd30361e85c1718ca1db3ec8fbd89f0c)
- Date: Wed, 30 Oct 2024 02:17:46 +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/0027-bmo-1913286-filter-out-unsupported-devices-for-pipewire-camera-screencasting.patch
| 330 ----------
http/firefox/patches/0027-gcc-always-inline-from-fedora.patch
| 14
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/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 -
9 files changed, 22 insertions(+), 1029 deletions(-)
New commits:
commit f3b46692fd30361e85c1718ca1db3ec8fbd89f0c
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>
http/firefox: version 132.0, SECURITY_PATCH++
diff --git a/http/firefox/DEPENDS b/http/firefox/DEPENDS
index 1cea29f..cb5e902 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.104" &&
+local NSS_BRANCH="3.105" &&
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 6b89520..d339e41 100755
--- a/http/firefox/DETAILS
+++ b/http/firefox/DETAILS
@@ -1,6 +1,6 @@
SPELL=firefox
- VERSION=131.0.3
- SECURITY_PATCH=199
+ VERSION=132.0
+ SECURITY_PATCH=200
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 ce523c4..9f82ac1 100644
--- a/http/firefox/HISTORY
+++ b/http/firefox/HISTORY
@@ -1,3 +1,8 @@
+2024-10-29 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS: version 132.0, SECURITY_PATCH++
+ * DEPENDS: nss >= 3.105
+ * patches/*: updated
+
2024-10-14 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 131.0.3, SECURITY_PATCH++, (CVE-2024-9936)
* PRE_BUILD: simplified checks for Python 3.13.x availability and
removed some
diff --git
a/http/firefox/patches/0027-bmo-1913286-filter-out-unsupported-devices-for-pipewire-camera-screencasting.patch
b/http/firefox/patches/0027-bmo-1913286-filter-out-unsupported-devices-for-pipewire-camera-screencasting.patch
deleted file mode 100644
index 7131aa0..0000000
---
a/http/firefox/patches/0027-bmo-1913286-filter-out-unsupported-devices-for-pipewire-camera-screencasting.patch
+++ /dev/null
@@ -1,330 +0,0 @@
-
-# HG changeset patch
-# User Jan Grulich <jgrulich AT redhat.com>
-# Date 1725275240 0
-# Node ID 25415f3c344023667c01089f74b9f0c6fc7b6a56
-# Parent 3071e3421b420019ce714503e0d96f68f0289268
-Bug 1913286 - WebRTC backport: PipeWire camera: filter out devices with no
capabilities r=pehrsons,webrtc-reviewers
-
-Filter out devices that do not support any format supported by WebRTC.
-This will for example be IR cameras that show as duplicated in the list
-of cameras, but support only GRAY8 format and for that reason do not
-work at all.
-
-This is a simple backport of an WebRTC upstream change.
-
-Upstream commit: b4aba7834e6c94adace1cb4c20e2e1ee70eb9cc5
-
-Differential Revision: https://phabricator.services.mozilla.com/D219224
-
-diff --git
a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc
b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc
----
a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc
-+++
b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc
-@@ -52,56 +52,56 @@ int32_t DeviceInfoPipeWire::GetDeviceNam
- uint32_t
productUniqueIdUTF8Length,
- pid_t* pid,
- bool* deviceIsPlaceholder) {
- RTC_CHECK(pipewire_session_);
-
- if (deviceNumber >= NumberOfDevices())
- return -1;
-
-- const PipeWireNode& node = pipewire_session_->nodes().at(deviceNumber);
-+ const auto& node = pipewire_session_->nodes().at(deviceNumber);
-
-- if (deviceNameLength <= node.display_name().length()) {
-+ if (deviceNameLength <= node->display_name().length()) {
- RTC_LOG(LS_INFO) << "deviceNameUTF8 buffer passed is too small";
- return -1;
- }
-- if (deviceUniqueIdUTF8Length <= node.unique_id().length()) {
-+ if (deviceUniqueIdUTF8Length <= node->unique_id().length()) {
- RTC_LOG(LS_INFO) << "deviceUniqueIdUTF8 buffer passed is too small";
- return -1;
- }
- if (productUniqueIdUTF8 &&
-- productUniqueIdUTF8Length <= node.model_id().length()) {
-+ productUniqueIdUTF8Length <= node->model_id().length()) {
- RTC_LOG(LS_INFO) << "productUniqueIdUTF8 buffer passed is too small";
- return -1;
- }
-
- memset(deviceNameUTF8, 0, deviceNameLength);
-- node.display_name().copy(deviceNameUTF8, deviceNameLength);
-+ node->display_name().copy(deviceNameUTF8, deviceNameLength);
-
- memset(deviceUniqueIdUTF8, 0, deviceUniqueIdUTF8Length);
-- node.unique_id().copy(deviceUniqueIdUTF8, deviceUniqueIdUTF8Length);
-+ node->unique_id().copy(deviceUniqueIdUTF8, deviceUniqueIdUTF8Length);
-
- if (productUniqueIdUTF8) {
- memset(productUniqueIdUTF8, 0, productUniqueIdUTF8Length);
-- node.model_id().copy(productUniqueIdUTF8, productUniqueIdUTF8Length);
-+ node->model_id().copy(productUniqueIdUTF8, productUniqueIdUTF8Length);
- }
-
- return 0;
- }
-
- int32_t DeviceInfoPipeWire::CreateCapabilityMap(
- const char* deviceUniqueIdUTF8) {
- RTC_CHECK(pipewire_session_);
-
- for (auto& node : pipewire_session_->nodes()) {
-- if (node.unique_id().compare(deviceUniqueIdUTF8) != 0)
-+ if (node->unique_id().compare(deviceUniqueIdUTF8) != 0)
- continue;
-
-- _captureCapabilities = node.capabilities();
-- _lastUsedDeviceNameLength = node.unique_id().length();
-+ _captureCapabilities = node->capabilities();
-+ _lastUsedDeviceNameLength = node->unique_id().length();
- _lastUsedDeviceName = static_cast<char*>(
- realloc(_lastUsedDeviceName, _lastUsedDeviceNameLength + 1));
- memcpy(_lastUsedDeviceName, deviceUniqueIdUTF8,
- _lastUsedDeviceNameLength + 1);
- return _captureCapabilities.size();
- }
- return -1;
- }
-diff --git
a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc
b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc
---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc
-+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc
-@@ -47,16 +47,29 @@ VideoType PipeWireRawFormatToVideoType(u
- return VideoType::kABGR;
- case SPA_VIDEO_FORMAT_ARGB:
- return VideoType::kBGRA;
- default:
- return VideoType::kUnknown;
- }
- }
-
-+void PipeWireNode::PipeWireNodeDeleter::operator()(
-+ PipeWireNode* node) const noexcept {
-+ pw_proxy_destroy(node->proxy_);
-+ spa_hook_remove(&node->node_listener_);
-+}
-+
-+// static
-+PipeWireNode::PipeWireNodePtr PipeWireNode::Create(PipeWireSession* session,
-+ uint32_t id,
-+ const spa_dict* props) {
-+ return PipeWireNodePtr(new PipeWireNode(session, id, props));
-+}
-+
- PipeWireNode::PipeWireNode(PipeWireSession* session,
- uint32_t id,
- const spa_dict* props)
- : session_(session),
- id_(id),
- display_name_(spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION)),
- unique_id_(rtc::ToString(id)) {
- RTC_LOG(LS_VERBOSE) << "Found Camera: " << display_name_;
-@@ -68,21 +81,16 @@ PipeWireNode::PipeWireNode(PipeWireSessi
- .version = PW_VERSION_NODE_EVENTS,
- .info = OnNodeInfo,
- .param = OnNodeParam,
- };
-
- pw_node_add_listener(proxy_, &node_listener_, &node_events, this);
- }
-
--PipeWireNode::~PipeWireNode() {
-- pw_proxy_destroy(proxy_);
-- spa_hook_remove(&node_listener_);
--}
--
- // static
- void PipeWireNode::OnNodeInfo(void* data, const pw_node_info* info) {
- PipeWireNode* that = static_cast<PipeWireNode*>(data);
-
- if (info->change_mask & PW_NODE_CHANGE_MASK_PROPS) {
- const char* vid_str;
- const char* pid_str;
- absl::optional<int> vid;
-@@ -94,17 +102,19 @@ void PipeWireNode::OnNodeInfo(void* data
- pid = pid_str ? rtc::StringToNumber<int>(pid_str) : absl::nullopt;
-
- if (vid && pid) {
- char model_str[10];
- snprintf(model_str, sizeof(model_str), "%04x:%04x", vid.value(),
- pid.value());
- that->model_id_ = model_str;
- }
-- } else if (info->change_mask & PW_NODE_CHANGE_MASK_PARAMS) {
-+ }
-+
-+ if (info->change_mask & PW_NODE_CHANGE_MASK_PARAMS) {
- for (uint32_t i = 0; i < info->n_params; i++) {
- uint32_t id = info->params[i].id;
- if (id == SPA_PARAM_EnumFormat &&
- info->params[i].flags & SPA_PARAM_INFO_READ) {
- pw_node_enum_params(that->proxy_, 0, id, 0, UINT32_MAX, nullptr);
- break;
- }
- }
-@@ -345,58 +355,67 @@ void PipeWireSession::OnCoreError(void*
-
- // static
- void PipeWireSession::OnCoreDone(void* data, uint32_t id, int seq) {
- PipeWireSession* that = static_cast<PipeWireSession*>(data);
-
- if (id == PW_ID_CORE) {
- if (seq == that->sync_seq_) {
- RTC_LOG(LS_VERBOSE) << "Enumerating PipeWire camera devices
complete.";
-+
-+ // Remove camera devices with no capabilities
-+ auto it = std::remove_if(that->nodes_.begin(), that->nodes_.end(),
-+ [](const PipeWireNode::PipeWireNodePtr&
node) {
-+ return node->capabilities().empty();
-+ });
-+ that->nodes_.erase(it, that->nodes_.end());
-+
- that->Finish(VideoCaptureOptions::Status::SUCCESS);
- }
- }
- }
-
- // static
- void PipeWireSession::OnRegistryGlobal(void* data,
- uint32_t id,
- uint32_t permissions,
- const char* type,
- uint32_t version,
- const spa_dict* props) {
- PipeWireSession* that = static_cast<PipeWireSession*>(data);
-
- // Skip already added nodes to avoid duplicate camera entries
- if (std::find_if(that->nodes_.begin(), that->nodes_.end(),
-- [id](const PipeWireNode& node) {
-- return node.id() == id;
-+ [id](const PipeWireNode::PipeWireNodePtr& node) {
-+ return node->id() == id;
- }) != that->nodes_.end())
- return;
-
- if (type != absl::string_view(PW_TYPE_INTERFACE_Node))
- return;
-
- if (!spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION))
- return;
-
- auto node_role = spa_dict_lookup(props, PW_KEY_MEDIA_ROLE);
- if (!node_role || strcmp(node_role, "Camera"))
- return;
-
-- that->nodes_.emplace_back(that, id, props);
-+ that->nodes_.push_back(PipeWireNode::Create(that, id, props));
- that->PipeWireSync();
- }
-
- // static
- void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) {
- PipeWireSession* that = static_cast<PipeWireSession*>(data);
-
-- auto it = std::remove_if(
-- that->nodes_.begin(), that->nodes_.end(),
-- [id](const PipeWireNode& node) { return node.id() == id; });
-+ auto it = std::remove_if(that->nodes_.begin(), that->nodes_.end(),
-+ [id](const PipeWireNode::PipeWireNodePtr& node) {
-+ return node->id() == id;
-+ });
- that->nodes_.erase(it, that->nodes_.end());
- }
-
- void PipeWireSession::Finish(VideoCaptureOptions::Status status) {
- webrtc::MutexLock lock(&callback_lock_);
-
- if (callback_) {
- callback_->OnInitialized(status);
-diff --git
a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h
b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h
---- a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h
-+++ b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.h
-@@ -32,27 +32,37 @@ namespace videocapturemodule {
- class PipeWireSession;
- class VideoCaptureModulePipeWire;
-
- // PipeWireNode objects are the local representation of PipeWire node
objects.
- // The portal API ensured that only camera nodes are visible to the client.
- // So they all represent one camera that is available via PipeWire.
- class PipeWireNode {
- public:
-- PipeWireNode(PipeWireSession* session, uint32_t id, const spa_dict*
props);
-- ~PipeWireNode();
-+ struct PipeWireNodeDeleter {
-+ void operator()(PipeWireNode* node) const noexcept;
-+ };
-+
-+ using PipeWireNodePtr =
-+ std::unique_ptr<PipeWireNode, PipeWireNode::PipeWireNodeDeleter>;
-+ static PipeWireNodePtr Create(PipeWireSession* session,
-+ uint32_t id,
-+ const spa_dict* props);
-
- uint32_t id() const { return id_; }
- std::string display_name() const { return display_name_; }
- std::string unique_id() const { return unique_id_; }
- std::string model_id() const { return model_id_; }
- std::vector<VideoCaptureCapability> capabilities() const {
- return capabilities_;
- }
-
-+ protected:
-+ PipeWireNode(PipeWireSession* session, uint32_t id, const spa_dict*
props);
-+
- private:
- static void OnNodeInfo(void* data, const pw_node_info* info);
- static void OnNodeParam(void* data,
- int seq,
- uint32_t id,
- uint32_t index,
- uint32_t next,
- const spa_pod* param);
-@@ -82,18 +92,19 @@ class CameraPortalNotifier : public Came
-
- class PipeWireSession : public rtc::RefCountedNonVirtual<PipeWireSession> {
- public:
- PipeWireSession();
- ~PipeWireSession();
-
- void Init(VideoCaptureOptions::Callback* callback,
- int fd = kInvalidPipeWireFd);
--
-- const std::deque<PipeWireNode>& nodes() const { return nodes_; }
-+ const std::deque<PipeWireNode::PipeWireNodePtr>& nodes() const {
-+ return nodes_;
-+ }
-
- friend class CameraPortalNotifier;
- friend class PipeWireNode;
- friend class VideoCaptureModulePipeWire;
-
- private:
- void InitPipeWire(int fd);
- bool StartPipeWire(int fd);
-@@ -129,17 +140,17 @@ class PipeWireSession : public rtc::RefC
- struct pw_core* pw_core_ = nullptr;
- struct spa_hook core_listener_;
-
- struct pw_registry* pw_registry_ = nullptr;
- struct spa_hook registry_listener_;
-
- int sync_seq_ = 0;
-
-- std::deque<PipeWireNode> nodes_;
-+ std::deque<PipeWireNode::PipeWireNodePtr> nodes_;
- std::unique_ptr<CameraPortal> portal_;
- std::unique_ptr<CameraPortalNotifier> portal_notifier_;
- };
-
- } // namespace videocapturemodule
- } // namespace webrtc
-
- #endif // MODULES_VIDEO_CAPTURE_LINUX_PIPEWIRE_SESSION_H_
-diff --git
a/third_party/libwebrtc/moz-patch-stack/b4aba7834e.no-op-cherry-pick-msg
b/third_party/libwebrtc/moz-patch-stack/b4aba7834e.no-op-cherry-pick-msg
-new file mode 100644
---- /dev/null
-+++ b/third_party/libwebrtc/moz-patch-stack/b4aba7834e.no-op-cherry-pick-msg
-@@ -0,0 +1,1 @@
-+We cherry-picked this in bug 1913286.
-
diff --git a/http/firefox/patches/0027-gcc-always-inline-from-fedora.patch
b/http/firefox/patches/0027-gcc-always-inline-from-fedora.patch
new file mode 100644
index 0000000..d7af60f
--- /dev/null
+++ b/http/firefox/patches/0027-gcc-always-inline-from-fedora.patch
@@ -0,0 +1,14 @@
+diff -up firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline
firefox-114.0.2/gfx/wr/swgl/src/gl.cc
+--- firefox-114.0.2/gfx/wr/swgl/src/gl.cc.inline 2023-06-22
11:08:53.294593327 +0200
++++ firefox-114.0.2/gfx/wr/swgl/src/gl.cc 2023-06-22 11:12:43.663486734
+0200
+@@ -58,9 +58,7 @@ WINBASEAPI BOOL WINAPI QueryPerformanceF
+ }
+
+ #else
+-// GCC is slower when dealing with always_inline, especially in debug
builds.
+-// When using Clang, use always_inline more aggressively.
+-# if defined(__clang__) || defined(NDEBUG)
++# if defined(__clang__) || defined (__GNUC__) || defined(NDEBUG)
+ # define ALWAYS_INLINE __attribute__((always_inline)) inline
+ # else
+ # define ALWAYS_INLINE inline
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
deleted file mode 100644
index 151289c..0000000
--- a/http/firefox/patches/0028-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/0029-bmo-1917964-gcc-15-swgl-fix-2.patch
b/http/firefox/patches/0029-bmo-1917964-gcc-15-swgl-fix-2.patch
deleted file mode 100644
index a992c73..0000000
--- a/http/firefox/patches/0029-bmo-1917964-gcc-15-swgl-fix-2.patch
+++ /dev/null
@@ -1,327 +0,0 @@
-
-# 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/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
deleted file mode 100644
index e5d659b..0000000
---
a/http/firefox/patches/0030-bmo-1634961-add-option-to-list-switch-to-open-tabs-in-gnome-shell-provider.patch
+++ /dev/null
@@ -1,270 +0,0 @@
-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
deleted file mode 100644
index b1609af..0000000
---
a/http/firefox/patches/0031-bmo-1921719-dont-crash-in-gnome-shell-if-there-are-no-search-results.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-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 (f3b46692fd30361e85c1718ca1db3ec8fbd89f0c), Pavel Vinogradov, 10/29/2024
Archive powered by MHonArc 2.6.24.