diff options
author | Constantine Bytensky <kostya3@gmail.com> | 2017-05-18 14:46:49 +0300 |
---|---|---|
committer | Quentin Rameau <quinq@fifth.space> | 2017-05-22 12:38:49 +0200 |
commit | 25652669ef1fc4c0024542c5d7a90a58ba99bcbd (patch) | |
tree | 3329613c3532018f7054a7d769e671733208ffce /surf.c | |
parent | bcd05ae321de686840fd560931f2894f62ba8345 (diff) |
Add config option for cross requests from file URLs
I use it to open local .xml files with .xsl style-sheets.
Diffstat (limited to 'surf.c')
-rw-r--r-- | surf.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -69,6 +69,7 @@ typedef enum { DiskCache, DefaultCharset, DNSPrefetch, + FileURLsCrossAccess, FontSize, FrameFlattening, Geolocation, @@ -711,6 +712,10 @@ setparameter(Client *c, int refresh, ParamName p, const Arg *a) case DNSPrefetch: webkit_settings_set_enable_dns_prefetching(s, a->b); return; /* do not update */ + case FileURLsCrossAccess: + webkit_settings_set_allow_file_access_from_file_urls(s, a->b); + webkit_settings_set_allow_universal_access_from_file_urls(s, a->b); + return; /* do not update */ case FontSize: webkit_settings_set_default_font_size(s, a->i); return; /* do not update */ @@ -1026,6 +1031,8 @@ newview(Client *c, WebKitWebView *rv) webkit_web_view_new_with_related_view(rv)); } else { settings = webkit_settings_new_with_settings( + "allow-file-access-from-file-urls", curconfig[FileURLsCrossAccess].val.b, + "allow-universal-access-from-file-urls", curconfig[FileURLsCrossAccess].val.b, "auto-load-images", curconfig[LoadImages].val.b, "default-charset", curconfig[DefaultCharset].val.v, "default-font-size", curconfig[FontSize].val.i, |