Commit Graph

14838 Commits

Author SHA1 Message Date
Vincent Sanders
f01a948329 move core window callbacks to the standard gui tables 2024-05-26 19:59:17 +01:00
Michael Drake
15d3de0d37 content: css: dump: Handle CALC unit type
We won't actually reach this, because the type won't be SET if
it's CALC.
2024-05-26 19:51:10 +01:00
Michael Drake
e1d7a346dd calc(): layout: find dimensions: Use new css width getter API 2024-05-26 13:30:19 +01:00
Michael Drake
68e6876c8d calc(): layout: table: Use new css width getter API 2024-05-26 11:50:12 +01:00
Michael Drake
052550c667 calc(): layout: minmax block: Use new css width getter API 2024-05-26 11:45:35 +01:00
Michael Drake
09b076c141 calc(): layout: minmax line: Use new css width getter API 2024-05-26 10:47:33 +01:00
Michael Drake
0f18e7a7fd calc(): layout: minmax table: Use new css width getter API 2024-05-26 10:11:31 +01:00
Michael Drake
9448c44bab css, html: Update to new LibCSS css_computed_width API
Currently using the static variant, but in future we'll
switch to using the one that resolves to pixels for us.
2024-05-25 22:41:57 +01:00
Michael Drake
120be3d771 html: layout: FPCT_OF_INT_TOINT is now in LibCSS 2024-05-25 22:41:57 +01:00
Vincent Sanders
5f2065ecfb Ensure perl tool expansion is used everywhere 2024-05-25 18:24:03 +01:00
Daniel Silverstone
553dc93ec8
nsurl: Add support for IPv6 literals
Unfortunately, despite previous assertions to the contrary,
we do need to deal with IPv6 literals.  For now we validate
just that they are encased by square brackets and consist only
of hex digits and colons.  We do not validate that they are
actually valid IPv6 addresses.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2024-05-25 12:05:20 +01:00
Daniel Silverstone
1cf1391916
test: Correct nsurl case which should fail
We were previously assuming a badly escaped hostname would
not be a url parse failure; but in practice firefox expects
it to fail and thus omnis to a search instead.  This behaviour
is expected, thus we update the test case.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2024-05-25 12:04:01 +01:00
Daniel Silverstone
1b10fcedcf
nsurl: Add underscore to permitted characters
The host component must be a valid DNS name; and unfortunately
underscores are present in some DNS names already, despite a 2019
decision to not issue them going forward.  As such we permit the
underscore as well in order to work with old-school URLs which may
exist in the wild.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2024-05-25 11:50:40 +01:00
Vincent Sanders
97fec7e47f Change env script help text display 2024-05-25 10:30:58 +01:00
Vincent Sanders
7afa51af0d Change env script to use posix command -v 2024-05-25 10:30:58 +01:00
Daniel Silverstone
4a50da326a nsurl: Reject URLs with invalid host components
The host component, by the time we hit the validation code, should
be a valid DNS name.  In theory it could also be an IPv6 address,
but those are far more painful to deal with so we're ignoring that
opportunity for now.

This fixes a problem where the search_web_omni logic would fail
to generate a search because nsurl_create() succeeded even though
it shouldn't have.

Signed-off-by: Daniel Silverstone <dsilvers@netsurf-browser.org>
2024-05-24 21:51:35 +01:00
Michael Drake
506f4b14bb frontends: monkey: Squash -Wcalloc-transposed-args (gcc-14) 2024-05-24 21:11:30 +01:00
Michael Drake
ff87de87f3 desktop: textarea: Squash -Wcalloc-transposed-args (gcc-14) 2024-05-24 21:09:24 +01:00
Michael Drake
67005a0d7e content caches: Squash -Wcalloc-transposed-args (gcc-14) 2024-05-24 21:09:24 +01:00
Michael Drake
2bffbebad7 image handlers: Squash -Wcalloc-transposed-args (gcc-14) 2024-05-24 21:09:24 +01:00
Michael Drake
0843a9b43d fetch: Squash -Wcalloc-transposed-args (gcc-14) 2024-05-24 21:09:24 +01:00
Michael Drake
a87ff23666 js: duktape bindings: Squash -Wcalloc-transposed-args (gcc-14) 2024-05-24 21:09:24 +01:00
Daniel Silverstone
8767befca6 monkey: Fix off-by-one which could result in overflow
The buffer for storing the js_exec arguments could be one
byte too small in which case bad things might happen.  This
fixes that.

Signed-off-by: Daniel Silverstone <dsilvers@netsurf-browser.org>
2024-05-24 20:02:05 +01:00
Daniel Silverstone
74791c0229 utils: Belt and braces to satisfy gcc
GCC was upset that it was theoretically possible for this
format string to result in a buffer overrun.  This is because
it could not work out that `i` would never be negative. To
silence the warning, we use %u and cast to unsigned during the
formatting of the output filename.

Signed-off-by: Daniel Silverstone <dsilvers@netsurf-browser.org>
2024-05-24 19:44:40 +01:00
Daniel Silverstone
9e448ebfcd utils: Update config.h for confusing define problems
For some reason, we have to use the __GLIBC_PREREQ macro
in a more confined way otherwise the preprocessor gets confused.

Signed-off-by: Daniel Silverstone <dsilvers@netsurf-browser.org>
2024-05-24 19:32:34 +01:00
Daniel Silverstone
34239ed89f utils: Update guard checks in config.h
Since glibc 2.38 the functions strchrnul and strcasestr have been
exposed by default, rather than being hidden behind _GNU_SOURCE.

We therefore use the GLIBC_PREREQ macro to check the version of
the glibc headers and do not accidentally double-declare these
functions.

Signed-off-by: Daniel Silverstone <dsilvers@netsurf-browser.org>
2024-05-24 19:14:46 +01:00
John-Mark Bell
d3a8bdc060 Revert "RISC OS: add SocketWatch module to distribution"
This reverts commit 98b3d3c191.
2024-04-09 22:22:42 +01:00
John-Mark Bell
5efe1b456a Revert "RISC OS: use SocketWatch for socket activity"
This reverts commit 9e4f598b7b.
2024-04-09 22:22:32 +01:00
Vincent Sanders
8e4e92fc86 fix gcov flushing in assert exit 2024-03-18 23:29:25 +00:00
John-Mark Bell
9e4f598b7b RISC OS: use SocketWatch for socket activity
Use SocketWatch to monitor our sockets and convert activity into
a pollword update. This allows us to ditch the schedule-based
fetch path and take the same one as we do on other platforms.
This also allows us to refactor the main poll loop such that we
need only poll idle while waiting for things to happen (once
something has happened, we poll aggressively until there are no
non-pollword events left).
2024-03-14 00:09:58 +00:00
John-Mark Bell
98b3d3c191 RISC OS: add SocketWatch module to distribution 2024-03-14 00:09:45 +00:00
John-Mark Bell
cf2e5b5bc6 Socket: avoid warning on aos3 2024-03-14 00:05:51 +00:00
John-Mark Bell
ae8b58e408 Socket: more fixes for win32/aos3
These special snowflakes have specialised socket close APIs, so
ensure that we use the correct one. Additionally, there's no
guarantee that their socket() API signature matches the POSIX
definition, so wrap it up and cast the result.
2024-03-14 00:01:24 +00:00
John-Mark Bell
bda0a97fea Socket: fix win32/aos3 build 2024-03-13 23:22:31 +00:00
John-Mark Bell
e3a6ad7173 Fetch/curl: expose socket open/close via fetch vtable
This allows frontends to customise the behaviour of sockets. The
default implementation simply maps to socket(2)/close(2).
2024-03-13 23:03:34 +00:00
John-Mark Bell
f027a80956 RISC OS: optimisations for UTF-8<->local encoding 2024-03-13 21:45:06 +00:00
John-Mark Bell
4148b16ed4 RISC OS: use modern fallthrough mechanism 2024-03-13 21:36:06 +00:00
John-Mark Bell
3be91870a4 fetchers: drop support for ancient OpenSSL
We now require 1.1.1 or later (and, preferably, 3.x).

Also take the opportunity to add support for LibreSSL 3.5.0 or
later (we still support ancient versions of this because 3.5.0 is
still relatively modern -- give it a few more years and support
for old LibreSSL can go, too)
2024-03-13 21:26:01 +00:00
Vincent Sanders
325442a1fb another missed fallthrough 2024-03-06 10:55:35 +00:00
Vincent Sanders
4131d7a35c resolve missing fall through annotations 2024-03-06 10:00:35 +00:00
John-Mark Bell
4b937dc315 Cookie/History/Hotlist: use localtime()
Some platforms do not support the reentrant form, so don't use it.
2024-03-05 22:34:35 +00:00
John-Mark Bell
167676c335 Cookie/History/Hotlist: locale-aware time formatting
(as)ctime are defined as always formatting times using English
day/month names. As these views are for the user's benefit, use
the selected locale to format the information, instead.

Use of (as)ctime on RISC OS with UnixLib is fragile, anyway, as
that implementation always produces a locale-aware serialization
(which is not what the spec defines). This caused assertions to
fire in the previous implementation (which expected ctime to be
locale-unaware). Fixes #2869.
2024-03-05 21:43:48 +00:00
Vincent Sanders
b5f4d905f9 use attributes to indicate switch fall through instead of comments 2024-03-05 21:33:13 +00:00
Vincent Sanders
199f86dcf1 avoid increased alignment warning 2024-03-05 11:58:16 +00:00
Vincent Sanders
a8a5b16df3 fix c library API flags for freebsd when building GTK 2024-03-05 11:44:59 +00:00
Étienne Deparis
583ec72680 Resources: Add french static files 2024-03-01 16:17:15 +00:00
Étienne Deparis
5bb2e9de3c FatMessages: Improve french translation 2024-03-01 16:13:35 +00:00
Vincent Sanders
07d09bbdfc res variable could possibly be used without being set 2024-02-27 13:24:48 +00:00
Vincent Sanders
cea268ddc6 width variable is only required with misconfigured libjpeg 2024-02-27 13:23:49 +00:00
Vincent Sanders
b25ad06a34 resolve warnings in windows frontend 2024-02-27 13:22:28 +00:00