epiphany/epiphany-bring-back-tabs-webapp.patch
Dominique Leuenberger e5c982f906 Accepting request 612915 from home:iznogood
- Update to version 3.28.2.1:
  + Again disallow Ctrl+T in app mode (bgo#795007).
  + Remove problematic adblock filters (bgo#796245).
  + Fix crashes when signing out of Firefox Sync.
- Add epiphany-bring-back-tabs-webapp.patch: Revert the revert for
  tabs in webapps (bgo#795007, bgo#796204).
- Add epiphany-fix-crash-CVE-2018-11396.patch: session: Fix crash
  when JS opens an invalid URI (CVE-2018-11396, bgo#795740,
  boo#1094464).

OBS-URL: https://build.opensuse.org/request/show/612915
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/epiphany?expand=0&rev=290
2018-05-30 13:00:29 +00:00

57 lines
2.2 KiB
Diff

From c56294dd46db69c94f8238dd47f568ca57bc51c0 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@igalia.com>
Date: Thu, 5 Apr 2018 11:52:24 -0500
Subject: Again disallow new tab action in app mode
Tabs still work, but only when opening a link
https://bugzilla.gnome.org/show_bug.cgi?id=795007
---
src/ephy-notebook.c | 7 +++++--
src/ephy-window.c | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 3833862..4a05b93 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -344,10 +344,12 @@ static void
update_tabs_visibility (EphyNotebook *nb,
gboolean before_inserting)
{
+ EphyEmbedShellMode mode;
gboolean show_tabs = FALSE;
guint num;
EphyPrefsUITabsBarVisibilityPolicy policy;
+ mode = ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (ephy_shell_get_default ()));
num = gtk_notebook_get_n_pages (GTK_NOTEBOOK (nb));
if (before_inserting)
@@ -356,8 +358,9 @@ update_tabs_visibility (EphyNotebook *nb,
policy = g_settings_get_enum (EPHY_SETTINGS_UI,
EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY);
- if (((policy == EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_MORE_THAN_ONE && num > 1) ||
- policy == EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_ALWAYS))
+ if (mode != EPHY_EMBED_SHELL_MODE_APPLICATION &&
+ ((policy == EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_MORE_THAN_ONE && num > 1) ||
+ policy == EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_ALWAYS))
show_tabs = TRUE;
/* Only show the tabs when the "tabs-allowed" property is TRUE. */
diff --git a/src/ephy-window.c b/src/ephy-window.c
index e7aa10f..2bdf442 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2997,6 +2997,7 @@ static const char *disabled_actions_for_app_mode[] = { "open",
"save-as-application",
"encoding",
"bookmark-page",
+ "new-tab",
"home" };
static void
--
cgit v0.12