Correct the default of allowRunningInsecureContent as per docs (#12556)
* Correct the default of allowRunningInsecureContent as per docs * fix linting * Update calls to match native_mate API change
This commit is contained in:
parent
7cc3b877dc
commit
d06c79f5d3
1 changed files with 9 additions and 2 deletions
|
@ -64,8 +64,15 @@ WebContentsPreferences::WebContentsPreferences(
|
||||||
SetDefaultBoolIfUndefined("images", true);
|
SetDefaultBoolIfUndefined("images", true);
|
||||||
SetDefaultBoolIfUndefined("textAreasAreResizable", true);
|
SetDefaultBoolIfUndefined("textAreasAreResizable", true);
|
||||||
SetDefaultBoolIfUndefined("webgl", true);
|
SetDefaultBoolIfUndefined("webgl", true);
|
||||||
SetDefaultBoolIfUndefined("webSecurity", true);
|
bool webSecurity = true;
|
||||||
SetDefaultBoolIfUndefined("allowRunningInsecureContent", false);
|
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)
|
#if defined(OS_MACOSX)
|
||||||
SetDefaultBoolIfUndefined(options::kScrollBounce, false);
|
SetDefaultBoolIfUndefined(options::kScrollBounce, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue