mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Remove CefBrowserSettings related to file URL access (fixes issue #2820)
This removes CefBrowserSettings.universal_access_from_file_urls and CefBrowserSettings.file_access_from_file_urls. Due to NetworkService requirements these values must now be configured globally via command-line flags ("allow-universal-access-from-files" and "allow-file-access-from-files" respectively). Also remove the kAllowFileAccessFromFileUrls switch in CEF which duplicates the existing kAllowFileAccessFromFiles switch in Chromium (see issue #1785).
This commit is contained in:
@@ -261,8 +261,6 @@ void SetDefaultPrefs(blink::web_pref::WebPreferences& web) {
|
||||
!command_line->HasSwitch(switches::kDisableJavascriptAccessClipboard);
|
||||
web.allow_universal_access_from_file_urls =
|
||||
command_line->HasSwitch(switches::kAllowUniversalAccessFromFileUrls);
|
||||
web.allow_file_access_from_file_urls =
|
||||
command_line->HasSwitch(switches::kAllowFileAccessFromFileUrls);
|
||||
web.shrinks_standalone_images_to_fit =
|
||||
command_line->HasSwitch(switches::kImageShrinkStandaloneToFit);
|
||||
web.text_areas_are_resizable =
|
||||
@@ -323,10 +321,6 @@ void SetCefPrefs(const CefBrowserSettings& cef,
|
||||
web.javascript_can_access_clipboard);
|
||||
SET_STATE(cef.javascript_dom_paste, web.dom_paste_enabled);
|
||||
SET_STATE(cef.plugins, web.plugins_enabled);
|
||||
SET_STATE(cef.universal_access_from_file_urls,
|
||||
web.allow_universal_access_from_file_urls);
|
||||
SET_STATE(cef.file_access_from_file_urls,
|
||||
web.allow_file_access_from_file_urls);
|
||||
SET_STATE(cef.image_loading, web.loads_images_automatically);
|
||||
SET_STATE(cef.image_shrink_standalone_to_fit,
|
||||
web.shrinks_standalone_images_to_fit);
|
||||
|
@@ -48,9 +48,6 @@ const char kDisableJavascriptDomPaste[] = "disable-javascript-dom-paste";
|
||||
const char kAllowUniversalAccessFromFileUrls[] =
|
||||
"allow-universal-access-from-files";
|
||||
|
||||
// Allow access from file URLs.
|
||||
const char kAllowFileAccessFromFileUrls[] = "allow-file-access-from-files";
|
||||
|
||||
// Disable loading of images from the network. A cached image will still be
|
||||
// rendered if requested.
|
||||
const char kDisableImageLoading[] = "disable-image-loading";
|
||||
|
@@ -29,7 +29,6 @@ extern const char kDisableJavascriptCloseWindows[];
|
||||
extern const char kDisableJavascriptAccessClipboard[];
|
||||
extern const char kDisableJavascriptDomPaste[];
|
||||
extern const char kAllowUniversalAccessFromFileUrls[];
|
||||
extern const char kAllowFileAccessFromFileUrls[];
|
||||
extern const char kDisableImageLoading[];
|
||||
extern const char kImageShrinkStandaloneToFit[];
|
||||
extern const char kDisableTextAreaResize[];
|
||||
|
Reference in New Issue
Block a user