From e97074f9853dae328747c75054612a5bb941236a Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 1 Dec 2016 10:35:55 +0100 Subject: Add AllowGeolocationOnInsecureOrigins setting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This provides a way to restore earlier QtWebEngine behavior where geolocation was possible from all origins. [ChangeLog][Settings] Added setting to again allow insecure origins to request geolocation. Change-Id: I043fb7a36a56fa5acc1740d52a50b9d7ff49a2c5 Reviewed-by: Michael BrĂ¼ning --- src/core/web_engine_settings.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/web_engine_settings.cpp') diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp index c17177745..57813a82f 100644 --- a/src/core/web_engine_settings.cpp +++ b/src/core/web_engine_settings.cpp @@ -242,6 +242,7 @@ void WebEngineSettings::initDefaults(bool offTheRecord) s_defaultAttributes.insert(FocusOnNavigationEnabled, true); s_defaultAttributes.insert(PrintElementBackgrounds, true); s_defaultAttributes.insert(AllowRunningInsecureContent, allowRunningInsecureContent); + s_defaultAttributes.insert(AllowGeolocationOnInsecureOrigins, false); } if (offTheRecord) m_attributes.insert(LocalStorageEnabled, false); @@ -320,6 +321,7 @@ void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *p prefs->experimental_webgl_enabled = testAttribute(WebGLEnabled); prefs->should_print_backgrounds = testAttribute(PrintElementBackgrounds); prefs->allow_running_insecure_content = testAttribute(AllowRunningInsecureContent); + prefs->allow_geolocation_on_insecure_origins = testAttribute(AllowGeolocationOnInsecureOrigins); // Fonts settings. prefs->standard_font_family_map[content::kCommonScript] = toString16(fontFamily(StandardFont)); -- cgit v1.2.3