Remove CefBrowserSettings.application_cache (fixes issue #1785)
AppCache is deprecated in favor of Service Workers and support will be fully removed soon (~M95). See https://web.dev/appcache-removal/. Also add missing "allow-file-access-from-files" command-line switch for CefBrowserSettings.file_access_from_file_urls.
This commit is contained in:
parent
cbc5710801
commit
6516b569a9
|
@ -42,13 +42,13 @@
|
||||||
// way that may cause binary incompatibility with other builds. The universal
|
// way that may cause binary incompatibility with other builds. The universal
|
||||||
// hash value will change if any platform is affected whereas the platform hash
|
// hash value will change if any platform is affected whereas the platform hash
|
||||||
// values will change only if that particular platform is affected.
|
// values will change only if that particular platform is affected.
|
||||||
#define CEF_API_HASH_UNIVERSAL "7bc6f4ca51afa11542e22d0a3b1ccb796fa0aaa1"
|
#define CEF_API_HASH_UNIVERSAL "d158dd50a51d3338248731969e8154e92abda022"
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
#define CEF_API_HASH_PLATFORM "b5f894040c9668ed03c19976275e0611cd24b0c0"
|
#define CEF_API_HASH_PLATFORM "657f400c514c841adc27fb29142d5ad4806e1db5"
|
||||||
#elif defined(OS_MAC)
|
#elif defined(OS_MAC)
|
||||||
#define CEF_API_HASH_PLATFORM "539d29daac8c7aa3ed8c19fedbb2effdc58d33d2"
|
#define CEF_API_HASH_PLATFORM "6e88cf614e9c742b0b50b25e6cf4a22afec3aae5"
|
||||||
#elif defined(OS_LINUX)
|
#elif defined(OS_LINUX)
|
||||||
#define CEF_API_HASH_PLATFORM "fe6dd0bea2361d1b5eddd10035d5aa8cd31a552c"
|
#define CEF_API_HASH_PLATFORM "5a8b9f7961b2ebf85c5fed71eccfeb2c858c9a5a"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -611,7 +611,7 @@ typedef struct _cef_browser_settings_t {
|
||||||
|
|
||||||
///
|
///
|
||||||
// Controls whether file URLs will have access to other file URLs. Also
|
// Controls whether file URLs will have access to other file URLs. Also
|
||||||
// configurable using the "allow-access-from-files" command-line switch.
|
// configurable using the "allow-file-access-from-files" command-line switch.
|
||||||
///
|
///
|
||||||
cef_state_t file_access_from_file_urls;
|
cef_state_t file_access_from_file_urls;
|
||||||
|
|
||||||
|
@ -653,12 +653,6 @@ typedef struct _cef_browser_settings_t {
|
||||||
///
|
///
|
||||||
cef_state_t databases;
|
cef_state_t databases;
|
||||||
|
|
||||||
///
|
|
||||||
// Controls whether the application cache can be used. Also configurable using
|
|
||||||
// the "disable-application-cache" command-line switch.
|
|
||||||
///
|
|
||||||
cef_state_t application_cache;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
// Controls whether WebGL can be used. Note that WebGL requires hardware
|
// Controls whether WebGL can be used. Note that WebGL requires hardware
|
||||||
// support and may not work on all systems even when enabled. Also
|
// support and may not work on all systems even when enabled. Also
|
||||||
|
|
|
@ -717,7 +717,6 @@ struct CefBrowserSettingsTraits {
|
||||||
target->tab_to_links = src->tab_to_links;
|
target->tab_to_links = src->tab_to_links;
|
||||||
target->local_storage = src->local_storage;
|
target->local_storage = src->local_storage;
|
||||||
target->databases = src->databases;
|
target->databases = src->databases;
|
||||||
target->application_cache = src->application_cache;
|
|
||||||
target->webgl = src->webgl;
|
target->webgl = src->webgl;
|
||||||
|
|
||||||
target->background_color = src->background_color;
|
target->background_color = src->background_color;
|
||||||
|
|
|
@ -261,6 +261,8 @@ void SetDefaultPrefs(blink::web_pref::WebPreferences& web) {
|
||||||
!command_line->HasSwitch(switches::kDisableJavascriptAccessClipboard);
|
!command_line->HasSwitch(switches::kDisableJavascriptAccessClipboard);
|
||||||
web.allow_universal_access_from_file_urls =
|
web.allow_universal_access_from_file_urls =
|
||||||
command_line->HasSwitch(switches::kAllowUniversalAccessFromFileUrls);
|
command_line->HasSwitch(switches::kAllowUniversalAccessFromFileUrls);
|
||||||
|
web.allow_file_access_from_file_urls =
|
||||||
|
command_line->HasSwitch(switches::kAllowFileAccessFromFileUrls);
|
||||||
web.shrinks_standalone_images_to_fit =
|
web.shrinks_standalone_images_to_fit =
|
||||||
command_line->HasSwitch(switches::kImageShrinkStandaloneToFit);
|
command_line->HasSwitch(switches::kImageShrinkStandaloneToFit);
|
||||||
web.text_areas_are_resizable =
|
web.text_areas_are_resizable =
|
||||||
|
@ -332,7 +334,6 @@ void SetCefPrefs(const CefBrowserSettings& cef,
|
||||||
SET_STATE(cef.tab_to_links, web.tabs_to_links);
|
SET_STATE(cef.tab_to_links, web.tabs_to_links);
|
||||||
SET_STATE(cef.local_storage, web.local_storage_enabled);
|
SET_STATE(cef.local_storage, web.local_storage_enabled);
|
||||||
SET_STATE(cef.databases, web.databases_enabled);
|
SET_STATE(cef.databases, web.databases_enabled);
|
||||||
SET_STATE(cef.application_cache, web.application_cache_enabled);
|
|
||||||
|
|
||||||
// Never explicitly enable GPU-related functions in this method because the
|
// Never explicitly enable GPU-related functions in this method because the
|
||||||
// GPU blacklist is not being checked here.
|
// GPU blacklist is not being checked here.
|
||||||
|
|
|
@ -48,6 +48,9 @@ const char kDisableJavascriptDomPaste[] = "disable-javascript-dom-paste";
|
||||||
const char kAllowUniversalAccessFromFileUrls[] =
|
const char kAllowUniversalAccessFromFileUrls[] =
|
||||||
"allow-universal-access-from-files";
|
"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
|
// Disable loading of images from the network. A cached image will still be
|
||||||
// rendered if requested.
|
// rendered if requested.
|
||||||
const char kDisableImageLoading[] = "disable-image-loading";
|
const char kDisableImageLoading[] = "disable-image-loading";
|
||||||
|
|
|
@ -29,6 +29,7 @@ extern const char kDisableJavascriptCloseWindows[];
|
||||||
extern const char kDisableJavascriptAccessClipboard[];
|
extern const char kDisableJavascriptAccessClipboard[];
|
||||||
extern const char kDisableJavascriptDomPaste[];
|
extern const char kDisableJavascriptDomPaste[];
|
||||||
extern const char kAllowUniversalAccessFromFileUrls[];
|
extern const char kAllowUniversalAccessFromFileUrls[];
|
||||||
|
extern const char kAllowFileAccessFromFileUrls[];
|
||||||
extern const char kDisableImageLoading[];
|
extern const char kDisableImageLoading[];
|
||||||
extern const char kImageShrinkStandaloneToFit[];
|
extern const char kImageShrinkStandaloneToFit[];
|
||||||
extern const char kDisableTextAreaResize[];
|
extern const char kDisableTextAreaResize[];
|
||||||
|
|
Loading…
Reference in New Issue