mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Backport (2-0-x) - Correct the default of allowRunningInsecureContent as per docs (#12629)
* Correct the default of allowRunningInsecureContent as per docs * fix linting * Update calls to match native_mate API change
This commit is contained in:
@@ -63,8 +63,15 @@ WebContentsPreferences::WebContentsPreferences(
|
||||
SetDefaultBoolIfUndefined("images", true);
|
||||
SetDefaultBoolIfUndefined("textAreasAreResizable", true);
|
||||
SetDefaultBoolIfUndefined("webgl", true);
|
||||
SetDefaultBoolIfUndefined("webSecurity", true);
|
||||
SetDefaultBoolIfUndefined("allowRunningInsecureContent", false);
|
||||
bool webSecurity = true;
|
||||
SetDefaultBoolIfUndefined("webSecurity", webSecurity);
|
||||
// If webSecurity was explicity set to false, let's inherit that into
|
||||
// insecureContent
|
||||
if (web_preferences.Get("webSecurity", &webSecurity) && !webSecurity) {
|
||||
SetDefaultBoolIfUndefined("allowRunningInsecureContent", true);
|
||||
} else {
|
||||
SetDefaultBoolIfUndefined("allowRunningInsecureContent", false);
|
||||
}
|
||||
#if defined(OS_MACOSX)
|
||||
SetDefaultBoolIfUndefined(options::kScrollBounce, false);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user