[epiphany/mcatanzaro/settings-cleanup-2: 2/3] Remove enable-webgl and enable-webaudio settings



commit 6e4277680c4020e25eee62e7e2634b93f6ced7e2
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Dec 16 21:26:28 2019 -0600

    Remove enable-webgl and enable-webaudio settings
    
    These are weird settings. Epiphany doesn't let the user decide whether
    to enable other WebKit-level features, except when it actually makes
    sense to offer the user a choice of whether or not to do so. But letting
    the user decide to break the web by disabling WebAudio or WebGL doesn't
    make any sense. So remove these hidden settings.
    
    Also, don't manually enable settings that are already enabled by default
    in WebKitSettings.

 data/org.gnome.epiphany.gschema.xml | 10 ----------
 embed/ephy-embed-prefs.c            | 17 ++++-------------
 lib/ephy-prefs.h                    |  4 ----
 3 files changed, 4 insertions(+), 27 deletions(-)
---
diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml
index bbd13eaf0..e4e5f0117 100644
--- a/data/org.gnome.epiphany.gschema.xml
+++ b/data/org.gnome.epiphany.gschema.xml
@@ -160,16 +160,6 @@
                        <default>false</default>
                        <summary>Enable Plugins</summary>
                </key>
-               <key type="b" name="enable-webgl">
-                       <default>true</default>
-                       <summary>Enable WebGL</summary>
-                       <description>Whether to enable support for WebGL contexts.</description>
-               </key>
-               <key type="b" name="enable-webaudio">
-                       <default>true</default>
-                       <summary>Enable WebAudio</summary>
-                       <description>Whether to enable support for WebAudio.</description>
-               </key>
                <key type="b" name="enable-smooth-scrolling">
                        <default>true</default>
                        <summary>Enable smooth scrolling</summary>
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index a7bf7b80d..e935cf9f3 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -499,13 +499,12 @@ ephy_embed_prefs_init (gpointer user_data)
 {
   guint i;
 
-  webkit_settings = webkit_settings_new_with_settings ("enable-developer-extras", TRUE,
-                                                       "enable-fullscreen", TRUE,
-                                                       "enable-javascript", TRUE,
+  webkit_settings = webkit_settings_new_with_settings ("enable-back-forward-navigation-gestures", TRUE,
+                                                       "enable-developer-extras", TRUE,
                                                        "enable-dns-prefetching", TRUE,
-                                                       "enable-mediasource", TRUE,
+                                                       "enable-webaudio", TRUE, /* FIXME: 
https://bugs.webkit.org/show_bug.cgi?id=205334 */
+                                                       "enable-webgl", TRUE, /* FIXME: 
https://bugs.webkit.org/show_bug.cgi?id=205335 */
                                                        "javascript-can-open-windows-automatically", TRUE,
-                                                       "enable-back-forward-navigation-gestures", TRUE,
                                                        NULL);
 
   for (i = 0; i < G_N_ELEMENTS (webkit_pref_entries); i++) {
@@ -541,14 +540,6 @@ ephy_embed_prefs_init (gpointer user_data)
                    EPHY_PREFS_WEB_DEFAULT_ENCODING,
                    webkit_settings, DEFAULT_ENCODING_SETTING,
                    G_SETTINGS_BIND_GET);
-  g_settings_bind (EPHY_SETTINGS_WEB,
-                   EPHY_PREFS_WEB_ENABLE_WEBGL,
-                   webkit_settings, "enable-webgl",
-                   G_SETTINGS_BIND_GET);
-  g_settings_bind (EPHY_SETTINGS_WEB,
-                   EPHY_PREFS_WEB_ENABLE_WEBAUDIO,
-                   webkit_settings, "enable-webaudio",
-                   G_SETTINGS_BIND_GET);
   g_settings_bind (EPHY_SETTINGS_WEB,
                    EPHY_PREFS_WEB_ENABLE_SMOOTH_SCROLLING,
                    webkit_settings, "enable-smooth-scrolling",
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index cbd954b9f..117de54b5 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -107,8 +107,6 @@ static const char * const ephy_prefs_state_schema[] = {
 #define EPHY_PREFS_WEB_ENABLE_POPUPS                "enable-popups"
 #define EPHY_PREFS_WEB_ENABLE_PLUGINS               "enable-plugins"
 #define EPHY_PREFS_WEB_ENABLE_SPELL_CHECKING        "enable-spell-checking"
-#define EPHY_PREFS_WEB_ENABLE_WEBGL                 "enable-webgl"
-#define EPHY_PREFS_WEB_ENABLE_WEBAUDIO              "enable-webaudio"
 #define EPHY_PREFS_WEB_ENABLE_SMOOTH_SCROLLING      "enable-smooth-scrolling"
 #define EPHY_PREFS_WEB_USER_AGENT                   "user-agent"
 #define EPHY_PREFS_WEB_MOBILE_USER_AGENT            "mobile-user-agent"
@@ -138,8 +136,6 @@ static const char * const ephy_prefs_web_schema[] = {
   EPHY_PREFS_WEB_ENABLE_POPUPS,
   EPHY_PREFS_WEB_ENABLE_PLUGINS,
   EPHY_PREFS_WEB_ENABLE_SPELL_CHECKING,
-  EPHY_PREFS_WEB_ENABLE_WEBGL,
-  EPHY_PREFS_WEB_ENABLE_WEBAUDIO,
   EPHY_PREFS_WEB_ENABLE_SMOOTH_SCROLLING,
   EPHY_PREFS_WEB_USER_AGENT,
   EPHY_PREFS_WEB_MOBILE_USER_AGENT,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]