🐛 Fix webpreferences not accepting numeric options
The webpreferences attribute values are parsed as strings instead of numbers. Therefore, a conversion is required.
This commit is contained in:
parent
852519a826
commit
42f65c52fb
2 changed files with 27 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
|||
#ifndef ATOM_BROWSER_WEB_CONTENTS_PREFERENCES_H_
|
||||
#define ATOM_BROWSER_WEB_CONTENTS_PREFERENCES_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/values.h"
|
||||
|
@ -38,6 +39,9 @@ class WebContentsPreferences
|
|||
|
||||
static bool IsSandboxed(content::WebContents* web_contents);
|
||||
|
||||
static bool ConvertValueToIntegerFromString(
|
||||
WebContentsPreferences* pref, std::string attributeName, int* intValue);
|
||||
|
||||
// Modify the WebPreferences according to |web_contents|'s preferences.
|
||||
static void OverrideWebkitPrefs(
|
||||
content::WebContents* web_contents, content::WebPreferences* prefs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue