This adds a new config option, `author_level_css`.
When it is disabled, NetSurf will ignore all CSS from the web
page. In this case only the default CSS rules from the browser
and user CSS rules will be applied. It is enabled by default.
Tested by running:
./nsgtk3 --author_level_css=0
Not all runtime library headers declare the first argument to
regexec as being const so don't make our snregexec wrapper do so.
Additionally, make save_complete_import_re static.
This bug can be seen by selecting some text starting from the beginning
of a textarea (so that caret is 0) and then pressing the
NS_KEY_WORD_LEFT binding.
NS_KEY_WORD_LEFT was breaking early when caret was 0. So, to always
clear the selection, the clear selection code has been brought above the
break statement.
NS_KEY_WORD_RIGHT did not have such a break statement, so one has been
added for consistency, and because string operations are expensive.
NS_KEY_DELETE_WORD_{LEFT,RIGHT} have been added to
include/netsurf/keypress.h and implemented in desktop/textarea.c
An unsigned int, caret_copy, has been added since both of these require
a temporary variable to hold the original position of the caret.
The LEFT one deletes separators towards the left till it encounters a
non-separator and then deletes the non-separators until it encounters a
separator. The caret is moved towards the left by the number of
characters deleted.
The RIGHT one does the same towards the right, but the caret is kept at
its original position.
These are intended to be mapped to Ctrl+Backspace and Ctrl+Delete by
most frontends.
Additionally, some style and typo fixes have been made.
The default disc cache size is 1GB (1024 * 1024 * 1024).
On systems with 32bit size_t, the hysteresis calculation,
which multiplied 1GB by 20 would overflow, causing a zero
hysteresis.
(1024 * 1024 * 1024) * 20 % (2^32)
= 0
Thanks to Jonas Amoson for reporting.
remove unecessary inclusion of desktop search header in content
header which has knock on effect of not having ctype or string
system headers dragged in unecessarily.
Futher this highlighted use of ctype API where internal ascii
processing ought to be used.
In order that we present the cookies window usefully, change
browser_window to request presentation of the cookies window
via a gui misc callback.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>