summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_settings.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2016-12-01 10:35:55 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-12-01 11:46:16 +0000
commite97074f9853dae328747c75054612a5bb941236a (patch)
tree21bce189423401251b30e9ac807c51e3edfcbc72 /src/core/web_engine_settings.cpp
parent15a38cb07539dce2b6f7e9008d79e2b7335d3289 (diff)
Add AllowGeolocationOnInsecureOrigins setting
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 <michael.bruning@qt.io>
Diffstat (limited to 'src/core/web_engine_settings.cpp')
-rw-r--r--src/core/web_engine_settings.cpp2
1 files changed, 2 insertions, 0 deletions
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));