Commit Graph

1769 Commits

Author SHA1 Message Date
Michael Drake
f1dbd523b4 layout: Drop redundant else block 2022-10-29 20:30:48 +01:00
Michael Drake
7d833537aa css: Update display property helper for grid 2022-10-29 18:24:38 +01:00
Michael Drake
ce6a2c87da content: image cache: Avoid int overflow before size_t conversion 2022-10-23 17:22:56 +01:00
Michael Drake
5fed462e88 urldb: Handle snprintf error 2022-10-23 17:22:56 +01:00
Michael Drake
743817c205 js: console: Fix argument type for formatting function 2022-10-23 17:22:56 +01:00
Michael Drake
cb5d63768c js: image data: Avoid int overflow before size_t conversion 2022-10-23 17:22:56 +01:00
Vincent Sanders
40acd620b5 Ensure image cache logging does not cause division by zero at exit 2022-09-11 13:50:55 +01:00
Michael Drake
d082717ea6 HTML: CSS media spec: Pass in dark mode preference. 2022-07-30 21:32:37 +01:00
John-Mark Bell
69adc31d07 inttypes: custom format for UnixLib ssize_t
UnixLib defines ssize_t to be a long int, which forces the
corresponding format string to need to be %ld to avoid compiler
warnings. Making this change uncovered a number of places where
we were using the wrong format specifier entirely (namely
PRIssizet where we meant PRIsizet). Fix these, too.
2022-06-03 02:34:22 +01:00
Michael Drake
c90fb03e58 Duktape: Prevent clang static analysis. 2022-05-29 13:41:14 +01:00
Michael Drake
4e3d9127bf Duktape: Update to 2.7.0 release. 2022-05-29 13:40:24 +01:00
John-Mark Bell
a9eecb30a7 About/Cert: get EC key details using OpenSSL 3 APIs
Replace the fetching and poking around inside the low-level EC
object with appropriate calls to EVP_PKEY_get_(octet|utf8)_string_param()
and add a compatibility layer for old versions of OpenSSL.
2022-05-28 16:00:10 +01:00
John-Mark Bell
09b39f2dc7 About/Cert: get RSA n/e using OpenSSL 3 APIs
Replace the fetching and poking around inside the low-level RSA
object with appropriate calls to EVP_PKEY_get_bn_param() and
add a compatibility layer for old versions of OpenSSL.
2022-05-28 15:04:25 +01:00
John-Mark Bell
cd7ed847d4 About/Cert: use EVP_PKEY_bits to get key size 2022-05-28 14:30:28 +01:00
John-Mark Bell
2c42b1898c About/Cert: contain pkey inspection in type methods
Use of the low-level key types is deprecated in OpenSSL 3. Prepare
to stop using them by removing them from function calls.
2022-05-28 14:19:00 +01:00
John-Mark Bell
7d32feecc0 about(chart): include config.h to silence warning
This file uses strndup, so needs config.h including to define it.
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
feeda29c27 WebP: Optimisation: If it's opaque avoid any PMA conversions. 2022-03-28 16:06:02 +01:00
Michael Drake
4307230331 PNG: Allow support for premultiplied alpha.
LibPNG doesn't support premultiplied alpha, so now that the core
supports it, we can't just say that the decoded PNG is in the
core bitmap format.

So we now say it's in the core pixel layout, and if it's opaque
we say it has the same premultipled alpha setting as core bitmaps
because the conversion is costly and makes no difference.

On the other hand if it is not opaque we now admit that it is
not premultipled alpha so it gets converted if needed.
2022-03-28 16:05:47 +01:00
Michael Drake
8ad21395be About: Chart: Squash implicit declaration of strndup. 2022-03-28 11:06:16 +01:00
Michael Drake
d0da09a7ca Image: JPEG: Decode to client bitmap format where possible. 2022-03-27 13:25:37 +01:00
Michael Drake
bbfc0ca353 Image: JPEG: Warn if not using libjpeg-turbo.
Replaces RISC OS warning with a more general and relevant one.
2022-03-27 11:03:43 +01:00
Michael Drake
d33af42911 Image: WebP: Decode to client bitmap format where possible. 2022-03-27 10:50:29 +01:00
Michael Drake
41995c3999 Image: WebP: Correct output buffer size for rowstride. 2022-03-27 10:41:27 +01:00
Michael Drake
fba7a349c0 Image: Sprite: Avoid multiple bitmap format conversions. 2022-03-27 10:17:48 +01:00
Michael Drake
694a3b4c98 Image: RSVG: Just use bitmap to client for conversion. 2022-03-27 09:58:21 +01:00
Michael Drake
b0e7de8bff Image: PNG: Decode to client bitmap format. 2022-03-27 09:58:21 +01:00
Michael Drake
cde6a10ef4 Image: GIF: Decode directly to client bitmap format. 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
1bbb499f88 Image: WebP: Call bitmap format conversion after decode.
Currently a no-op, because we decode to the default format
and no front end requests anything but the default format.
2022-03-27 09:58:21 +01:00
Michael Drake
df6ff85305 Image: RSVG: Call bitmap format conversion after decode.
Currently a no-op, because we decode to the default format
and no front end requests anything but the default format.
2022-03-27 09:58:21 +01:00
Michael Drake
052acc752c Image: PNG: Call bitmap format conversion after decode.
Currently a no-op, because we decode to the default format
and no front end requests anything but the default format.
2022-03-26 15:45:00 +00:00
Michael Drake
7bf6a88c9c Image: Sprite: Call bitmap format conversion after decode.
Currently a no-op, because we decode to the default format
and no front end requests anything but the default format.
2022-03-26 15:45:00 +00:00
Michael Drake
2f0fbbcaa0 Image: JPEG: Call bitmap format conversion after decode.
Currently a no-op, because we decode to the default format
and no front end requests anything but the default format.
2022-03-26 15:45:00 +00:00
Michael Drake
c7dce05437 Image: ICO: Abstract image decode into helper. 2022-03-26 15:45:00 +00:00
Michael Drake
60b12cd9fe Image: ICO: Call bitmap format conversion after decode.
Currently a no-op, because we decode to the default format
and no front end requests anything but the default format.
2022-03-26 15:45:00 +00:00
Michael Drake
e7a355bf8d Image: GIF: Call bitmap format conversion before/after decode.
Currently a no-op, because we decode to the default format
and no front end requests anything but the default format.
2022-03-26 15:45:00 +00:00
Michael Drake
27a89439a2 Image: BMP: Call bitmap format conversion after decode.
Currently a no-op, because we decode to the default format
and no front end requests anything but the default format.
2022-03-26 15:45:00 +00:00
Michael Drake
002c3c1a7c Bitmap API: Clean up creation flags. 2022-03-24 18:09:28 +00:00
Michael Drake
a4cb24ed46 Image: ICO: Update for new libnsbmp API. 2022-03-24 12:01:53 +00:00
Michael Drake
b6238c6c5c Image: BMP: Update for new libnsbmp API. 2022-03-24 12:01:36 +00:00
Michael Drake
1dd3c80d9b PNG: Bytes per pixel is always 4. 2022-03-24 11:12:57 +00:00
Michael Drake
7c3382834e GIF: Update to new libnsgif API.
Set required colour component order.
2022-03-23 17:52:20 +00:00
Michael Drake
ae9047b1ed GIF: Tolerate errors during scan if at least one frame. 2022-03-03 19:03:29 +00:00
Michael Drake
2e9ef8feae GIF: Update to latest libnsgif API. 2022-02-26 14:55:13 +00:00
Michael Drake
251cce29b7 CSS: Selection callbacks: Update to latest LibDOM API. 2021-07-05 14:59:10 +01:00
Michael Drake
fa64d91d12 Switch to new libcss API for unit conversion. 2021-05-30 11:52:33 +01:00
Michael Drake
638a408dde CSS: Update to latest libcss: Remove weird units.
The 'rlh', 'ic' and 'cap' units were never implemented by anyone.
2021-05-30 11:52:33 +01:00
Vincent Sanders
5a2f69388c hoist the Referer header generation logic up to the low level cache
This removes the need for the fetchers to have any interaction with
 the Referer header. It has not been completely removed from the
 fetch interface as fetch.c:fetch_set_cookie() still uses it for
 unverifiable cookie decision logic. (There is an anchient todo here)
2021-03-25 23:36:41 +00:00
Michael Drake
9e3ef18255 html: layout: Cleanup dom node tag name getting with helper. 2021-02-20 17:03:49 +00:00
Michael Drake
920041a131 html: layout: Fix to ignore non-element children of lists. 2021-02-20 12:00:42 +00:00
Michael Drake
9783296c4f layout: Add support for OL reversed attribute. 2021-02-10 17:59:51 +00:00
Michael Drake
496b1eca08 layout: list handling: Scope reduce some variables in the recursive call. 2021-02-10 17:57:57 +00:00
Michael Drake
d29f6d6c1e html: layout: Change list value step to variable. 2021-02-10 17:57:57 +00:00
Michael Drake
e18bb8fde1 html: Add support for OL start attribute.
Note: Added new box member because rows was unsigned, and it was
      naughty to use something meant for tables.

Note: Now numbers <= 0 can be generated, but LibCSS needs updated
      to support that.
2021-02-10 17:57:57 +00:00
Michael Drake
64680a8edb layout: Add support for list item value attribute. 2021-02-09 21:33:06 +00:00
Michael Drake
41a0c21812 html: Do list item counting at layout time. 2021-02-09 20:36:52 +00:00
Michael Drake
9434fe1ff0 layout: Pass content into list layout function. 2021-02-09 20:36:52 +00:00
Michael Drake
839fb8570a layout: Add counting for list items to layout. 2021-02-09 20:36:52 +00:00
Vincent Sanders
ff225194f3 use list style formatting from libcss 2021-02-07 00:07:24 +00:00
Michael Drake
55fadc802a html: list counter style: Revert to string for {pre|post}fix. 2021-02-02 16:39:41 +00:00
Michael Drake
3b57deb046 html: list counter style: Constify {pre|post}fix memebers. 2021-02-02 15:06:04 +00:00
Michael Drake
87b5fd1bcc html: list counter style: Split out symbol copy. 2021-02-02 15:04:09 +00:00
Vincent Sanders
60d9dbe390 change list counter style formatting to be table driven 2021-02-02 01:19:32 +00:00
Vincent Sanders
bca82dfe83 do not count the null terminator in list counter style length formatting 2021-01-31 23:30:07 +00:00
Vincent Sanders
27b178b04b implement armenian and georgian list counter styles 2021-01-31 22:56:35 +00:00
Vincent Sanders
83ebc3bb8e split counter style handling out of the box code 2021-01-31 10:49:13 +00:00
Michael Drake
13c1b11317 css: hints: Add support for OL type attribute. 2021-01-31 09:36:02 +00:00
Vincent Sanders
4455f1b712 implement list marker counting for roman, latin and greek 2021-01-30 23:00:44 +00:00
Vincent Sanders
06c721c5bb add simple chart generator and use it from the imagecache 2020-10-05 23:01:24 +01:00
Daniel Silverstone
ba4c20a0c7
dukky: Fix assignment in assert
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-10-03 14:21:26 +01:00
Daniel Silverstone
926e560716
about: Check senddata return in blank handler
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-10-03 14:04:38 +01:00
Daniel Silverstone
2d58372ec2
Console: Do not try and log through a closed down window
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-10-02 20:15:23 +01:00
Vincent Sanders
44225f1b34 split out about scheme handler for nscolours css 2020-09-29 22:50:08 +01:00
Vincent Sanders
7e45969993 split out about scheme query fetcherror handler 2020-09-29 22:50:08 +01:00
Vincent Sanders
f0b7955d3d split out about scheme query timeout page 2020-09-29 22:50:08 +01:00
Vincent Sanders
746affa782 split out about scheme query auth handler 2020-09-29 22:50:04 +01:00
Vincent Sanders
b1844cbf2a split out about scheme query private handler 2020-09-27 23:09:56 +01:00
Vincent Sanders
ff3b948ac0 split out choices about scheme handler 2020-09-27 13:46:39 +01:00
Vincent Sanders
86ecde9a47 split out about handler config handler 2020-09-27 00:37:32 +01:00
Vincent Sanders
da7904554c split out about scheme testament handler 2020-09-23 08:48:17 +01:00
Vincent Sanders
dd541886fe split out about scheme certificate viewer generator 2020-09-21 12:53:39 +01:00
Vincent Sanders
4cbc8f16b6 split out blank handler for about scheme 2020-09-21 08:25:56 +01:00
Vincent Sanders
5207ecf308 split out the about scheme imagecache page generator 2020-09-20 16:36:01 +01:00
Vincent Sanders
c74509cdf5 move about fetcher into its own directory 2020-09-20 10:54:48 +01:00
Vincent Sanders
1f2946a710 remove unecessary exported function from plain text content handler 2020-07-27 22:56:17 +01:00
Vincent Sanders
652078f8cf fix erronenous child variable assignment 2020-07-12 18:49:47 +01:00
Vincent Sanders
313e5cabba ensure the html layout is present for text selection
The text selection operations can be called regardless
  of when the html layout box tree is actually
  available (e.g. if it is still loading when opened)

This change ensures the layout box tree is available before
  attempting to traverse it for a selection operation.
2020-07-12 13:47:52 +01:00
Vincent Sanders
0908925ca6 move the file fetcher sources into a single directory 2020-07-03 18:07:21 +01:00
Vincent Sanders
912aa6359d remove incorrect colour rule from unternal.css 2020-06-29 09:04:10 +01:00
Vincent Sanders
402ad02ff5 remove unecessary use of gui_internal in content 2020-06-25 14:37:57 +01:00
Vincent Sanders
82bb483964 remove unesessary header use in protected content 2020-06-25 12:33:52 +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
2352bea153 use the ascii locale safe handling instead of ctype API 2020-06-24 23:34:09 +01:00
Vincent Sanders
d5d14df76b initial implementation of split messages in c
functional but the compression switch still needs implementing
2020-06-15 00:21:06 +01:00
Vincent Sanders
154a6b6987 implement a minimal xxd for builds to remove external dependancy 2020-06-03 23:34:57 +01:00
Vincent Sanders
b182cc7617 remove box handling from browser window 2020-05-25 20:37:06 +01:00
Daniel Silverstone
39552607a5
canvas: Implement fully correct putImageData features
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-24 19:34:04 +01:00
Daniel Silverstone
b4c99f9e57
llcache: Free existing chain if we get a new one
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-24 17:01:05 +01:00
Michael Drake
3bf39f7f2c JS dom event binding: Squash leak of string. 2020-05-24 16:25:30 +01:00
Daniel Silverstone
74b8767ee2
Canvas: Do not overrun destination bitmap during creation
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-24 16:21:36 +01:00
Vincent Sanders
8673b035f0 commit a neatness in teh html content handler text selection code 2020-05-24 11:19:10 +01:00
Vincent Sanders
dbe63210cf fix use of uninitialised warning on older gcc 2020-05-23 23:48:38 +01:00
Daniel Silverstone
d157b505e6
canvas: Support changing canvas size at runtime
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-23 23:44:39 +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
1161029d29 remove unecessary content handler specific selection creation 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
Daniel Silverstone
291a5ec79d
fs_backing_store: Stop trying to render offsets in hex
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-23 12:16:34 +01:00
Daniel Silverstone
6d8b9a9bb4
fs_backing_store: Do not use %jx because amigaos3 can't render it properly
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-23 12:12:56 +01:00
Daniel Silverstone
d8f083bf52
Canvas: Move bitmap management to the 2D render context
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-23 10:15:30 +01:00
Daniel Silverstone
dd43748676
fix: Make it OK if the chain isn't avilable during bad-ssl querying
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-23 09:38:51 +01:00
Daniel Silverstone
804faacf82
html: Handle canvas width/height stated explicitly in px
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 20:26:51 +01:00
Daniel Silverstone
aec946b4ff
CanvasRenderingContext2D: More verbose input validation error message
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 20:26:32 +01:00
Daniel Silverstone
daed553a06
javascript: Support Canvas to a basic level
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 19:53:23 +01:00
Daniel Silverstone
4d89108072
html: Don't both building a bitmap if we're not rendering it
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 16:03:48 +01:00
Daniel Silverstone
334b498d5c
html: Handle canvas in redraw
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 16:00:46 +01:00
Daniel Silverstone
937894d654
html: set up canvas box properly
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 16:00:20 +01:00
Daniel Silverstone
b39f418bca
html: Add canvas node handling in dom_event
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 15:59:47 +01:00
Daniel Silverstone
a5572cde76
css: Support canvas width/height presentational hints
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 15:59:02 +01:00
Daniel Silverstone
1a836c9bc4
fetchers/curl: Move report_certs function outside WITH_OPENSSL
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 10:45:19 +01:00
Daniel Silverstone
b28d3c2675
query/ssl: Include link to view certificate details
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 10:37:27 +01:00
Michael Drake
c2f73310d0 Squash warning: "_GNU_SOURCE" redefined.
The utils/config.h header handles this.
2020-05-22 10:30:05 +01:00
Vincent Sanders
4cef0f955c pass the browser window to selection click handler
this means the content handlers do not have to provide a separate
  method to extract their browser window and it can simply be
  passed in.
2020-05-20 23:17:48 +01:00
Vincent Sanders
2f67227901 cleanup selection code formatting and documentation
removes forward declarations
cleans up documentation comments in header
removes unecessarily exported functions
2020-05-20 22:17:16 +01:00
Vincent Sanders
6fe2f7de47 do not export texplain interfaces unnecessarily 2020-05-19 23:38:34 +01:00
Daniel Silverstone
20d46406ed
about: Rework freeing the san_names structure
AmiSSL's approach to replacing 90% of OpenSSL calls with assembly
means that the official way to pop_free a stack type won't work.

As such, we open-code it here.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-19 13:39:07 +01:00
Vincent Sanders
3ab21dbaa4 add subject alternative names to certificate viewer 2020-05-18 23:16:56 +01:00
Michael Drake
e201597a8d Page info: Improve certificate fault display style. 2020-05-18 21:53:28 +01:00
Vincent Sanders
c50b19469e Display errors properly in certificate window 2020-05-18 18:32:01 +01:00
Michael Drake
09accc91e9 Improve certificate page styling. 2020-05-17 17:29:27 +01:00
Vincent Sanders
181777791b add fingerprints to the certificate viewer 2020-05-17 16:43:01 +01:00
Vincent Sanders
e09ea43dbb split out public key table formatted output 2020-05-17 15:48:15 +01:00
Vincent Sanders
aaa507b09f use entity for colon in certificate hex values to allow netsurf to break properly 2020-05-17 15:20:30 +01:00
Vincent Sanders
6002efff27 get the sign right on the certificate openssl compatability interface 2020-05-17 13:40:59 +01:00
Vincent Sanders
125b96b818 fix typo in certificate openssl compatability 2020-05-17 12:18:05 +01:00
Vincent Sanders
c8d9dfd2e0 add openssl compatability to certificate decode 2020-05-17 11:12:02 +01:00
Vincent Sanders
297448cfff make about handler ssenddataf cope with longer data 2020-05-16 23:23:40 +01:00
Vincent Sanders
7d59f09bea improve certificate viewer 2020-05-16 22:46:18 +01:00
Vincent Sanders
3a7fc30a5f implement content opacity check through the function table 2020-05-13 19:03:14 +01:00
Vincent Sanders
95e0a24fac use content messages to inform frontend of text search changes 2020-05-13 14:31:39 +01:00
Vincent Sanders
f4e50b45c8 make free text search content handler agnostic 2020-05-12 23:22:05 +01:00
Vincent Sanders
68b9417a6b consolodate the textsearch code into a single module 2020-05-12 21:29:32 +01:00
Vincent Sanders
3c7538a9f9 hoist common text search out of content handlers 2020-05-12 21:09:41 +01:00
Vincent Sanders
a8596a80ae move free text search general interface to content.
needs additional cleanup to call content through handler table to
  perform searches.
2020-05-10 23:22:29 +01:00
Vincent Sanders
e72ca36863 remove unecessary includes 2020-05-10 15:15:33 +01:00