git: fdda856f5e99 - 2026Q1 - www/*chromium: revert upstream commit to fix file dialog behaviour
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 30 Mar 2026 17:43:38 UTC
The branch 2026Q1 has been updated by rnagy:
URL: https://cgit.FreeBSD.org/ports/commit/?id=fdda856f5e99d4fa479069003c8a1aefea385702
commit fdda856f5e99d4fa479069003c8a1aefea385702
Author: Robert Nagy <rnagy@FreeBSD.org>
AuthorDate: 2026-03-30 17:39:18 +0000
Commit: Robert Nagy <rnagy@FreeBSD.org>
CommitDate: 2026-03-30 17:43:31 +0000
www/*chromium: revert upstream commit to fix file dialog behaviour
This change reverts the following commit which neuters the Enter
key in the file dialogs by not preselecting the active button by
default because of the following joke:
+// GTK_RESPONSE_ACCEPT as the default button, which should be avoided to prevent
+// an exploit where the user is instructed to hold Enter before the dialog
+// appears.
commit e93121e97478a41d529c8586a48b4ec34173f79a
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Mon Jan 5 17:42:17 2026 -0800
[GTK] Don't preselect file dialog accept buttons
(cherry picked from commit a50101eb4b6190b94c85b7cc0a0745ff44678c16)
---
www/chromium/Makefile | 2 +-
.../files/patch-ui_gtk_select__file__dialog__linux__gtk.cc | 12 ++++++++++++
www/ungoogled-chromium/Makefile | 1 +
.../files/patch-ui_gtk_select__file__dialog__linux__gtk.cc | 12 ++++++++++++
4 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/www/chromium/Makefile b/www/chromium/Makefile
index c22da2c7383b..ee4d845f2ae4 100644
--- a/www/chromium/Makefile
+++ b/www/chromium/Makefile
@@ -1,6 +1,6 @@
PORTNAME= chromium
PORTVERSION= 146.0.7680.164
-PORTREVISION= 1
+PORTREVISION= 2
PULSEMV= 16
PULSEV= ${PULSEMV}.1
CATEGORIES= www wayland
diff --git a/www/chromium/files/patch-ui_gtk_select__file__dialog__linux__gtk.cc b/www/chromium/files/patch-ui_gtk_select__file__dialog__linux__gtk.cc
new file mode 100644
index 000000000000..6ccd3daddf4f
--- /dev/null
+++ b/www/chromium/files/patch-ui_gtk_select__file__dialog__linux__gtk.cc
@@ -0,0 +1,12 @@
+--- ui/gtk/select_file_dialog_linux_gtk.cc.orig 2026-03-30 11:37:05 UTC
++++ ui/gtk/select_file_dialog_linux_gtk.cc
+@@ -49,7 +49,8 @@ namespace {
+ // GTK_RESPONSE_ACCEPT as the default button, which should be avoided to prevent
+ // an exploit where the user is instructed to hold Enter before the dialog
+ // appears.
+-constexpr GtkResponseType kResponseTypeAccept = static_cast<GtkResponseType>(0);
++// My god ^^^^^ WTF
++constexpr GtkResponseType kResponseTypeAccept = static_cast<GtkResponseType>(GTK_RESPONSE_ACCEPT);
+
+ // TODO(crbug.com/41469294): These getters will be unnecessary after
+ // migrating to GtkFileChooserNative.
diff --git a/www/ungoogled-chromium/Makefile b/www/ungoogled-chromium/Makefile
index 7923242e5e6d..08101e68a771 100644
--- a/www/ungoogled-chromium/Makefile
+++ b/www/ungoogled-chromium/Makefile
@@ -1,5 +1,6 @@
PORTNAME= ungoogled-chromium
PORTVERSION= 146.0.7680.164
+PORTREVISION= 1
PULSEMV= 16
PULSEV= ${PULSEMV}.1
UGVERSION= ${DISTVERSION}-1
diff --git a/www/ungoogled-chromium/files/patch-ui_gtk_select__file__dialog__linux__gtk.cc b/www/ungoogled-chromium/files/patch-ui_gtk_select__file__dialog__linux__gtk.cc
new file mode 100644
index 000000000000..6ccd3daddf4f
--- /dev/null
+++ b/www/ungoogled-chromium/files/patch-ui_gtk_select__file__dialog__linux__gtk.cc
@@ -0,0 +1,12 @@
+--- ui/gtk/select_file_dialog_linux_gtk.cc.orig 2026-03-30 11:37:05 UTC
++++ ui/gtk/select_file_dialog_linux_gtk.cc
+@@ -49,7 +49,8 @@ namespace {
+ // GTK_RESPONSE_ACCEPT as the default button, which should be avoided to prevent
+ // an exploit where the user is instructed to hold Enter before the dialog
+ // appears.
+-constexpr GtkResponseType kResponseTypeAccept = static_cast<GtkResponseType>(0);
++// My god ^^^^^ WTF
++constexpr GtkResponseType kResponseTypeAccept = static_cast<GtkResponseType>(GTK_RESPONSE_ACCEPT);
+
+ // TODO(crbug.com/41469294): These getters will be unnecessary after
+ // migrating to GtkFileChooserNative.