Added webkit setting for file uri handling.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 6 Aug 2018 20:46:36 +0000 (22:46 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 6 Aug 2018 20:46:36 +0000 (22:46 +0200)
doc/vimb.1
src/setting.c

index dd76cc7..11bd3fd 100644 (file)
@@ -967,13 +967,25 @@ The search completion allows a filtered list of already done searches.
 This completion starts by `/` or `?` in inputbox and performs a prefix
 comparison for further typed chars.
 .SH SETTINGS
-All settings listed below can be set with the `:set' command. See \fBSettings\fP under \fBCOMMAND MODE\fP for syntax.
+All settings listed below can be set with the `:set' command.
+See \fBSettings\fP under \fBCOMMAND MODE\fP for syntax.
 .TP
 .B accelerated-2d-canvas (bool)
 Enable or disable accelerated 2D canvas.
 When accelerated 2D canvas is enabled, WebKit may render some 2D canvas
 content using hardware accelerated drawing operations.
 .TP
+.B allow-file-access-from-file-urls (bool)
+Indicates whether file access is allowed from file URLs.
+By default, when something is loaded using a file URI, cross origin requests
+to other file resources are not allowed.
+.TP
+.B allow-universal-access-from-file-urls (bool)
+Indicates whether or not JavaScript running in the context of a file scheme
+URL should be allowed to access content from any origin.
+By default, when something is loaded in a using a file scheme URL, access to
+the local file system and arbitrary local storage is not allowed.
+.TP
 .B caret (bool)
 Whether to enable accessibility enhanced keyboard navigation.
 .TP
index cc42ca0..d6c69b6 100644 (file)
@@ -81,6 +81,12 @@ void setting_init(Client *c)
     /* TODO use the real names for webkit settings */
     i = 14;
     setting_add(c, "accelerated-2d-canvas", TYPE_BOOLEAN, &off, webkit, 0, "enable-accelerated-2d-canvas");
+#if WEBKIT_CHECK_VERSION (2, 10, 0)
+    setting_add(c, "allow-file-access-from-file-urls", TYPE_BOOLEAN, &off, webkit, 0, "allow-file-access-from-file-urls");
+#endif
+#if WEBKIT_CHECK_VERSION (2, 14, 0)
+    setting_add(c, "allow-universal-access-from-file-urls", TYPE_BOOLEAN, &off, webkit, 0, "allow-universal-access-from-file-urls");
+#endif
     setting_add(c, "caret", TYPE_BOOLEAN, &off, webkit, 0, "enable-caret-browsing");
     setting_add(c, "cursiv-font", TYPE_CHAR, &"serif", webkit, 0, "cursive-font-family");
     setting_add(c, "default-charset", TYPE_CHAR, &"utf-8", webkit, 0, "default-charset");