Commit Graph

2172 Commits

Author SHA1 Message Date
Vincent Sanders
7c957b4564 remove pointless box structure 2024-01-08 22:40:11 +00:00
Vincent Sanders
50f3460426 Update version for next development cycle 2023-12-28 00:30:37 +00:00
Michael Drake
4cb38c4704 css: Add option to ignore author level CSS
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
2023-11-25 20:02:23 +00:00
DeltaVonNeumann
a16d5ff10b Avoid integer types with platform dependent size 2023-06-17 10:29:39 +01:00
Michael Drake
64d90e014b Core: Options: Add user preference for dark mode colours 2022-07-30 21:28:41 +01:00
John-Mark Bell
b81c95aca8 s/http/https/ in user-facing URIs 2022-05-27 17:58:51 +01:00
John-Mark Bell
9ab9eabfa6 Browser window: include theme.h
This is necessary to avoid a warning on platforms that support
theme installation.
2022-05-27 15:09:48 +01:00
John-Mark Bell
a558f12b53 Save complete: silence warning
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.
2022-05-27 15:09:48 +01:00
Michael Drake
8e56cc3b1a Bitmap: Implement test_opaque in core instead of in every frontend. 2022-03-29 15:25:33 +01:00
Michael Drake
cfbd16cf7e Bitmap: Try to squash -Wtautological-constant-out-of-range-compare 2022-03-28 16:52:29 +01:00
Michael Drake
01ce05ae65 Bitmap: Log the bitmap format that gets set. 2022-03-28 16:28:47 +01:00
Michael Drake
c93ed6d63a Bitmap: Add support for premultiplied alpha conversion. 2022-03-28 16:05:47 +01:00
Michael Drake
6ecf0c2c6a Desktop: Browser window: Squash theme install start warning. 2022-03-28 11:06:16 +01:00
Michael Drake
c69bc8ba9c Bitmap: Colour layout converter doesn't need to be exposed. 2022-03-27 09:58:21 +01:00
Michael Drake
05a0a6997e Treeview: Use bitmap layout for bitmap generation. 2022-03-27 09:58:21 +01:00
Michael Drake
aeead57677 Bitmap: Convert pixel_to_colour to layout-aware function. 2022-03-27 09:58:21 +01:00
Michael Drake
d00c049d02 Bitmap: Move bitmap pixel to colour macro to bitmap header. 2022-03-27 09:58:21 +01:00
Michael Drake
976f54bf48 Bitmap: Initialise layout for default pixel format. 2022-03-26 15:45:00 +00:00
Michael Drake
f27db5f80b Bitmap: Add format conversion routines. 2022-03-26 15:45:00 +00:00
Michael Drake
e9d1a1fa9d Include: Bitmap: Add API for setting core bitmap format. 2022-03-26 15:45:00 +00:00
Michael Drake
725d1c9911 Treeview: Change bitmap generation to per-pixel channel indexing.
This will be needed when the core bitmap layout is client controlled.
2022-03-25 20:18:13 +00:00
Michael Drake
002c3c1a7c Bitmap API: Clean up creation flags. 2022-03-24 18:09:28 +00:00
Michael Drake
2fb5fcdda2 GUI: Bitmap save callback was never required. 2022-03-24 15:24:25 +00:00
Michael Drake
1d9526d44d GUI: Bitmap bytes per pixel callback is not required now. 2022-03-24 12:10:09 +00:00
Pranjal Kole
4fc78449ff textarea: always clear selection on NS_KEY_WORD_{LEFT,RIGHT}
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.
2022-01-23 14:22:40 +00:00
Pranjal Kole
76ede0f7d6 textarea: implement NS_KEY_DELETE_WORD_{LEFT,RIGHT}
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.
2022-01-22 19:39:26 +00:00
Michael Drake
fa64d91d12 Switch to new libcss API for unit conversion. 2021-05-30 11:52:33 +01:00
Vincent Sanders
847d568061 fix missing bitmap from preventing history and scroll updates 2021-03-23 22:09:56 +00:00
Vincent Sanders
5749ace60f split out internal local history macros from public interface header 2021-03-23 22:09:37 +00:00
Michael Drake
da2aa05b73 Prevent overflow of disc cache hysteresis.
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.
2021-01-25 13:39:28 +00:00
Michael Drake
833c9957a1 treeview: Squash warnings about enum value conversion. 2020-10-23 17:37:23 +01:00
Daniel Silverstone
6848cc890a
browser_window: Check for bw==NULL before dereferencing it
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-10-03 14:23:43 +01:00
Vincent Sanders
ebe1b05114 improve desktop text search header usage
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.
2020-06-24 23:49:59 +01:00
Vincent Sanders
85dea6eed3 remove unecessary headers from browser window 2020-05-25 23:52:39 +01:00
Vincent Sanders
b182cc7617 remove box handling from browser window 2020-05-25 20:37:06 +01:00
Vincent Sanders
860fbc2f8c make browser_window_update internal to browser window as intended 2020-05-25 13:45:54 +01:00
Vincent Sanders
5c02f9bd97 rename browser window internal redraw request function
remove confusing reference to boxes
2020-05-25 11:28:35 +01:00
Vincent Sanders
9993c37d5b Update version for next development cycle 2020-05-24 21:58:37 +01:00
Vincent Sanders
121c41a730 remove unused text selection interface 2020-05-23 23:40:29 +01:00
Vincent Sanders
5ce8f0baf1 make text selection context an opaque interface 2020-05-23 23:33:52 +01:00
Vincent Sanders
6108d210d5 remove all direct access to selection structure 2020-05-23 23:00:08 +01:00
Vincent Sanders
2ea577c47e remove unused is_html parameter to text selection routines 2020-05-23 23:00:08 +01:00
Vincent Sanders
a8c540ea59 move content specific selection end to content handlers 2020-05-23 23:00:08 +01:00
Vincent Sanders
cfe57002fe remove unused css length usage in selection 2020-05-23 23:00:08 +01:00
Vincent Sanders
e65e41e2d6 move content handler specific selection copying into handlers 2020-05-23 23:00:08 +01:00
Vincent Sanders
36b9262e14 split selection redraw into content handler specific implementations 2020-05-23 23:00:08 +01:00
Michael Drake
0432d95561 Browser window: Handle counting cookies when URLdb gives use none. 2020-05-23 22:28:00 +01:00
Michael Drake
6a1511ce99 Treeview: Redraw full text on treeview search text sets. 2020-05-23 21:58:56 +01:00
Michael Drake
3e90cdf689 Treeview: Use text input colour style for search bar. 2020-05-23 21:33:42 +01:00
Daniel Silverstone
26df6ab7dd
misc: Add a present_cookies to guit->misc and use it
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>
2020-05-23 21:18:46 +01:00