From: Daniel Carl Date: Wed, 23 Jul 2014 21:52:18 +0000 (+0200) Subject: Added missed other webkit settings. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=e389faeba0bc97d865e4c2ca5811c23b140ad832;p=vimb.git Added missed other webkit settings. This gives the user more control over webkit. --- diff --git a/doc/vimb.1 b/doc/vimb.1 index bbd855e..6b43bec 100644 --- a/doc/vimb.1 +++ b/doc/vimb.1 @@ -683,6 +683,20 @@ comparison for further typed chars. All settings listed below can be set with the `:set' command. .SS Webkit-Settings .TP +.B accelerated-compositing (bool) +Enable or disable support for accelerated compositing on pages. Accelerated +compositing uses the GPU to render animations on pages smoothly and also +allows proper rendering of 3D CSS transforms. +.TP +.B auto-load-images (bool) +Load images automatically. +.TP +.B auto-resize-window (bool) +Indicates if vimb will honor size and position changes of the windo by various +DOM methods. +.TP auto-shrink-images (bool) +Automatically shrink standalone images to fit. +.TP .B caret (bool) Whether to enable accessibility enhanced keyboard navigation. .TP @@ -697,9 +711,37 @@ charset. The font family to use as the default for content that does not specify a font. .TP +.B dns-prefetching (bool) +Indicates if vimb prefetches domain names. +.TP +.B dom-paste (bool) +Whether to enable DOM paste. If set to TRUE, document.execCommand("Paste") +will correctly execute and paste content of the clipboard. +.TP +.B file-access-from-file-uris (bool) +Boolean property to control file access for file:// URIs. If this option is +enabled every file:// will have its own security unique domain. +.TP .B fontsize (int) The default font size used to display text. .TP +.B frame-flattening (bool) +Whether to enable the Frame Flattening. With this setting each subframe is +expanded to its contents, which will flatten all the frames to become one +scrollable page. +.TP +.B html5-database (bool) +Whether to enable HTML5 client-side SQL database support. Client-side SQL +database allows web pages to store structured data and be able to use SQL to +manipulate that data asynchronously. +.TP +.B html5-local-storage (bool) +Whether to enable HTML5 localStorage support. localStorage provides simple +synchronous storage access. +.TP +.B hyperlink-auditing (bool) +Enable or disable support for . +.TP .B images (bool) Determines whether images should be automatically loaded or not. .TP @@ -711,6 +753,38 @@ frames from non-HTTPS URIs. Only for webkit>=2.0. Whether pages loaded via HTTPS should run subresources such as CSS, scripts, and plugins from non-HTTPS URIs. Only for webkit>=2.0. .TP +.B java-applet (bool) +Enable or disable support for the Java tag. Keep in mind that Java +content can be still shown in the page through or , which are +the preferred tags for this task. +.TP +.B javascript-can-access-clipboard (bool) +Whether JavaScript can access Clipboard. +.TP +.B javascript-can-open-windows-automatically (bool) +Whether JavaScript can open popup windows automatically without user +intervention. +.TP +.B media-playback-allows-inline (bool) +Whether media playback is full-screen only or inline playback is allowed. +Setting it to false allows specifying that media playback should be always +fullscreen. +.TP +.B media-playback-requires-user-gesture (bool) +Whether a user gesture (such as clicking the play button) would be required to +start media playback or load media. Setting it on requires a gesture by the +user to start playback, or to load the media. +.TP +.B media-stream (bool) +Enable or disable support for MediaSource on pages. MediaSource is an +experimental proposal which extends HTMLMediaElement to allow JavaScript to +generate media streams for playback. +.TP +.B mediasource (bool) +Enable or disable support for MediaSource on pages. MediaSource is an +experimental proposal which extends HTMLMediaElement to allow JavaScript to +generate media streams for playback. +.TP .B minimumfontsize (int) The minimum font size used to display text. .TP @@ -730,12 +804,25 @@ Enable or disable the page cache. Disabling the page cache is generally only useful for special circumstances like low-memory scenarios or special purpose applications like static HTML viewers. .TP +.B print-backgrounds (bool) +Whether background images should be printed. +.TP +.B private-browsing (bool) +Whether to enable private browsing mode. This supresses printing of messages +into JavaScript Console. +.TP .B plugins (bool) Determines whether or not plugins on the page are enabled. .TP .B print-backgrounds (bool) Whether background images should be drawn during printing. .TP +.B resizable-text-areas (bool) +Whether text areas are resizable. +.TP +.B respect-image-orientation (bool) +Whether vimb should respect image orientation. +.TP .B sansfont (string) The font family used as the default for content using sans-serif font. .TP @@ -745,9 +832,55 @@ Determines whether or not JavaScript executes within a page. .B seriffont (string) The font family used as the default for content using serif font. .TP +.B site-specific-quirks (bool) +Enables the site-specific compatibility workarounds. +.TP +.B smooth-scrolling (bool) +Enable or disable support for smooth scrolling. +.TP +.B spacial-navigation (bool) +Whether to enable the Spatial Navigation. This feature consists in the ability +to navigate between focusable elements in a Web page, such as hyperlinks and +form controls, by using Left, Right, Up and Down arrow keys. For example, if +an user presses the Right key, heuristics determine whether there is an +element he might be trying to reach towards the right, and if there are +multiple elements, which element he probably wants. +.TP +.B spell-checking (bool) +Whether to enable spell checking while typing. +.TP +.B spell-checking-languages (string) +The languages to be used for spell checking, separated by commas. + +The locale string typically is in the form lang_COUNTRY, where lang is an +ISO-639 language code, and COUNTRY is an ISO-3166 country code. For instance, +sv_FI for Swedish as written in Finland or pt_BR for Portuguese as written in +Brazil. + +If no value is specified the default value for gtk is used. +.TP +.B tab-key-cycles-through-elements (bool) +Whether the tab key cycles through elements on the page. + +If true, pressing the tab key will focus the next element in the web view. +Else the wen view will interpret tab key presses as normal key presses. If the +selected element is editable, the tab key will cause the insertion of a tab +character. +.TP +.B universal-access-from-file-uris (bool) +Whether to allow files loaded through file:// URIs universal access to all +pages. +.TP .B useragent (string) The user-agent string used by WebKit. .TP +.B webaudio (bool) +Enable or disable support for WebAudio on pages. WebAudio is an experimental +proposal for allowing web pages to generate Audio WAVE data from JavaScript. +.TP +.B webgl (bool) +Enable or disable support for WebGL on pages. +.TP .B webinspector (bool) Determines whether or not developer tools, such as the Web Inspector, are enabled. diff --git a/src/setting.c b/src/setting.c index 0629eaa..8bf80dd 100644 --- a/src/setting.c +++ b/src/setting.c @@ -64,33 +64,68 @@ void setting_init() gboolean on = true, off = false; vb.config.settings = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify)setting_free); - - setting_add("images", TYPE_BOOLEAN, &on, webkit, "auto-load-images"); +#if WEBKIT_CHECK_VERSION(1, 7, 5) + setting_add("accelerated-compositing", TYPE_BOOLEAN, &off, webkit, "enable-accelerated-compositing"); +#endif + setting_add("auto-resize-window", TYPE_BOOLEAN, &off, webkit, "auto-resize-window"); + setting_add("auto-shrink-images", TYPE_BOOLEAN, &on, webkit, "auto-shrink-images"); + setting_add("caret", TYPE_BOOLEAN, &off, webkit, "enable-caret-browsing"); setting_add("cursivfont", TYPE_CHAR, &"serif", webkit, "cursive-font-family"); setting_add("defaultencoding", TYPE_CHAR, &"utf-8", webkit, "default-encoding"); setting_add("defaultfont", TYPE_CHAR, &"sans-serif", webkit, "default-font-family"); + setting_add("dns-prefetching", TYPE_BOOLEAN, &on, webkit, "enable-dns-prefetching"); + setting_add("dom-paste", TYPE_BOOLEAN, &off, webkit, "enable-dom-paste"); + setting_add("file-access-from-file-uris", TYPE_BOOLEAN, &off, webkit, "enable-file-access-from-file-uris"); i = SETTING_DEFAULT_FONT_SIZE; setting_add("fontsize", TYPE_INTEGER, &i, webkit, "default-font-size"); + setting_add("frame-flattening", TYPE_BOOLEAN, &off, webkit, "enable-frame-flattening"); + setting_add("html5-database", TYPE_BOOLEAN, &on, webkit, "enable-html5-database"); + setting_add("html5-local-storage", TYPE_BOOLEAN, &on, webkit, "enable-html5-local-storage"); + setting_add("hyperlink-auditing", TYPE_BOOLEAN, &off, webkit, "enable-hyperlink-auditing"); + setting_add("images", TYPE_BOOLEAN, &on, webkit, "auto-load-images"); +#if WEBKIT_CHECK_VERSION(2, 0, 0) + setting_add("insecure-content-show", TYPE_BOOLEAN, &off, webkit, "enable-display-of-insecure-content"); + setting_add("insecure-content-run", TYPE_BOOLEAN, &off, webkit, "enable-running-of-insecure-content"); +#endif + setting_add("java-applet", TYPE_BOOLEAN, &on, webkit, "enable-java-applet"); + setting_add("javascript-can-access-clipboard", TYPE_BOOLEAN, &off, webkit, "javascript-can-access-clipboard"); + setting_add("javascript-can-open-windows-automatically", TYPE_BOOLEAN, &off, webkit, "javascript-can-open-windows-automatically"); + setting_add("media-playback-allows-inline", TYPE_BOOLEAN, &on, webkit, "media-playback-allows-inline"); + setting_add("media-playback-requires-user-gesture", TYPE_BOOLEAN, &off, webkit, "media-playback-requires-user-gesture"); +#if WEBKIT_CHECK_VERSION(2, 4, 0) + setting_add("media-stream", TYPE_BOOLEAN, &off, webkit, "enable-media-stream"); + setting_add("mediasource", TYPE_BOOLEAN, &off, webkit, "enable-mediasource"); +#endif + i = 5; + setting_add("minimumfontsize", TYPE_INTEGER, &i, webkit, "minimum-font-size"); + setting_add("monofont", TYPE_CHAR, &"monospace", webkit, "monospace-font-family"); + i = SETTING_DEFAULT_FONT_SIZE; setting_add("monofontsize", TYPE_INTEGER, &i, webkit, "default-monospace-font-size"); - setting_add("caret", TYPE_BOOLEAN, &off, webkit, "enable-caret-browsing"); - setting_add("webinspector", TYPE_BOOLEAN, &off, webkit, "enable-developer-extras"); setting_add("offlinecache", TYPE_BOOLEAN, &on, webkit, "enable-offline-web-application-cache"); setting_add("pagecache", TYPE_BOOLEAN, &on, webkit, "enable-page-cache"); setting_add("plugins", TYPE_BOOLEAN, &on, webkit, "enable-plugins"); - setting_add("scripts", TYPE_BOOLEAN, &on, webkit, "enable-scripts"); - setting_add("xssauditor", TYPE_BOOLEAN, &on, webkit, "enable-xss-auditor"); - i = 5; - setting_add("minimumfontsize", TYPE_INTEGER, &i, webkit, "minimum-font-size"); - setting_add("monofont", TYPE_CHAR, &"monospace", webkit, "monospace-font-family"); setting_add("print-backgrounds", TYPE_BOOLEAN, &on, webkit, "print-backgrounds"); + setting_add("private-browsing", TYPE_BOOLEAN, &off, webkit, "enable-private-browsing"); + setting_add("resizable-text-areas", TYPE_BOOLEAN, &on, webkit, "resizable-text-areas"); + setting_add("respect-image-orientation", TYPE_BOOLEAN, &off, webkit, "respect-image-orientation"); setting_add("sansfont", TYPE_CHAR, &"sans-serif", webkit, "sans-serif-font-family"); + setting_add("scripts", TYPE_BOOLEAN, &on, webkit, "enable-scripts"); setting_add("seriffont", TYPE_CHAR, &"serif", webkit, "serif-font-family"); - setting_add("useragent", TYPE_CHAR, &"Mozilla/5.0 (X11; Linux i686) AppleWebKit/538.15+ (KHTML, like Gecko) " PROJECT "/" VERSION " Safari/538.15 Version/6.0", webkit, "user-agent"); - setting_add("spacial-navigation", TYPE_BOOLEAN, &off, webkit, "enable-spatial-navigation"); -#if WEBKIT_CHECK_VERSION(2, 0, 0) - setting_add("insecure-content-show", TYPE_BOOLEAN, &off, webkit, "enable-display-of-insecure-content"); - setting_add("insecure-content-run", TYPE_BOOLEAN, &off, webkit, "enable-running-of-insecure-content"); + setting_add("site-specific-quirks", TYPE_BOOLEAN, &off, webkit, "enable-site-specific-quirks"); +#if WEBKIT_CHECK_VERSION(1, 9, 0) + setting_add("smooth-scrolling", TYPE_BOOLEAN, &off, webkit, "enable-smooth-scrolling"); #endif + setting_add("spacial-navigation", TYPE_BOOLEAN, &off, webkit, "enable-spatial-navigation"); + setting_add("spell-checking", TYPE_BOOLEAN, &off, webkit, "enable-spell-checking"); + setting_add("spell-checking-languages", TYPE_CHAR, NULL, webkit, "spell-checking-languages"); + setting_add("tab-key-cycles-through-elements", TYPE_BOOLEAN, &on, webkit, "tab-key-cycles-through-elements"); + setting_add("universal-access-from-file-uris", TYPE_BOOLEAN, &off, webkit, "enable-universal-access-from-file-uris"); + setting_add("useragent", TYPE_CHAR, &"Mozilla/5.0 (X11; Linux i686) AppleWebKit/538.15+ (KHTML, like Gecko) " PROJECT "/" VERSION " Safari/538.15 Version/6.0", webkit, "user-agent"); + setting_add("webaudio", TYPE_BOOLEAN, &off, webkit, "enable-webaudio"); + setting_add("webgl", TYPE_BOOLEAN, &off, webkit, "enable-webgl"); + setting_add("webinspector", TYPE_BOOLEAN, &off, webkit, "enable-developer-extras"); + setting_add("xssauditor", TYPE_BOOLEAN, &on, webkit, "enable-xss-auditor"); + /* internal variables */ setting_add("stylesheet", TYPE_BOOLEAN, &on, user_style, NULL); setting_add("proxy", TYPE_BOOLEAN, &on, proxy, NULL);