Commit Graph

1769 Commits

Author SHA1 Message Date
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
Vincent Sanders
b39db1dac4 add missing header includes from previous change 2020-05-08 09:08:31 +01:00
Vincent Sanders
ab952e0634 improve content header usage 2020-05-07 20:55:44 +01:00
Vincent Sanders
5f8b1497e1 clean up content headers and documentation comments
pure formatting and documentation changes, no code difference
2020-05-06 23:38:50 +01:00
Vincent Sanders
c2f9bcac19 remove junk content_add_error api 2020-05-06 22:54:52 +01:00
Vincent Sanders
b832bfaea8 remove unused junk error values from content struct
saves over half a kilobyte for every content
2020-05-06 22:22:16 +01:00
Vincent Sanders
d9a593c984 split dom event handling into separate module 2020-05-05 20:05:37 +01:00
Vincent Sanders
1d8542166c Clean up html content dom element insertion processing 2020-05-05 11:14:26 +01:00
Daniel Silverstone
754e3f4f8c
curl: Pass cert chain on even if we get no headers
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-04 18:29:46 +01:00
Daniel Silverstone
bb5d5562bc
llcache: Actually pass on certificate chain properly
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-04 18:29:33 +01:00
Vincent Sanders
82559d2ff4 remove the forward references in html form internal handling 2020-05-03 21:56:51 +01:00
Vincent Sanders
2a0f552524 remove forward delcarations and clean up formatting in html table layout processing 2020-05-03 19:02:47 +01:00
Vincent Sanders
a40727cd29 Improve hsndling of html content objects with no associated box 2020-05-03 17:00:04 +01:00
Vincent Sanders
fcd8d50359 remove unecessary include 2020-05-03 10:06:43 +01:00
Vincent Sanders
a706c69bf4 improve html content handler private headers 2020-05-02 20:47:53 +01:00
Vincent Sanders
19cd5cb3b3 add missing include 2020-05-01 21:36:50 +01:00
Vincent Sanders
986d4d5f82 put html content handler object interface into its own header 2020-05-01 21:25:23 +01:00
Vincent Sanders
479d0cb29a remove unused available width and height parameters from html_fecth_object() 2020-04-30 22:16:41 +01:00
Vincent Sanders
6b6bbad2b7 remove unecessary filename prefixes in the html content handler 2020-04-30 21:59:21 +01:00
Vincent Sanders
e8d0ba15ad split html box processing code
reduce the module size of the html box handling code by
 splitting into smaller sections.

No functional code change.
2020-04-29 20:37:42 +01:00
Vincent Sanders
a64261c3bd Initial special canvas handling to not show fallback 2020-04-28 23:35:00 +01:00
Vincent Sanders
c0ef8ce645 clean up html box, no functionality change just cosmetic
split up the html box headers
tidy up the documentation comments
avoid forward declarations in normalisation implementation
2020-04-28 23:30:20 +01:00
Vincent Sanders
f6883d6761 use dom type interface instead of strcasecmp 2020-04-26 17:31:15 +01:00
Daniel Silverstone
d3d17ded9c
dukky: Don't allow js_exec on a thread pending destruction
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-04-26 15:46:54 +01:00
Daniel Silverstone
2cb33b0c33
dukky: Various checks for win being NULL
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-04-26 15:35:36 +01:00
Vincent Sanders
b577de7c5b remove forward declarations
reorder module to remove need for forward function declarations.
remove unecessary and confusing parameter macros
2020-04-26 11:21:02 +01:00
Daniel Silverstone
24ec30359b
Window: Do not get stuck if callbacks are in-train during compartment close
When we close the JS compartment we try and cancel all callbacks so that
they do not fire after the compartment is closed.  However if we have
in-train callbacks, they can gum up the closedown and so we need to check
and if we've done all we can, we break out of the callback removal loop.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-04-25 14:04:54 +01:00
Vincent Sanders
bf4cbc95b0 add bindings for canvas width and height 2020-04-24 22:05:57 +01:00
Vincent Sanders
084861a31b Implement javascript scheme url script https://wiki.whatwg.org/wiki/URL_schemes 2020-04-17 22:43:44 +01:00
Vincent Sanders
e2f34232a2 refactor html mouse action
This reduces the source complexity of the html_mouse_action()
 previously this was a single function of several thousand
 lines with over 30 local variables allocated on the stack.

Variables are now mostly held in a single static structure which
 drasticaly reduces the size of stack frame required and improves
 lookup locality.

The generated code does cause two additional function calls as the
 compiler avoids inlining the sub functions. The optimiser seems to
 produce somewhat better code within the sub functions.

In the final analysis there appears to be no significant performance
 loss or gain with this change, just more readable source.
2020-04-13 12:09:07 +01:00
Michael Drake
15342b5f5b About pages: Update presentation using nscolour. 2020-04-07 21:32:28 +01:00
Michael Drake
aa1513ed92 Directory listings: Update to use nscolour. 2020-04-07 21:32:28 +01:00
Michael Drake
0e04059f53 about fetcher: Add about:nscolour.css generated colour stylesheet. 2020-04-07 21:32:27 +01:00
Daniel Silverstone
cbc28d2c98
html: Also close js thread on html_stop()
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-29 14:31:42 +01:00
Vincent Sanders
51dc59ecc9 remove unused constants 2020-03-26 23:38:50 +00:00
Daniel Silverstone
4cbdcc4aae
about: Add handling for unknown about: page
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 14:09:09 +00:00
Daniel Silverstone
6a2ce2b3c7
HTML: Use new js_closethread()
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 10:18:30 +00:00
Daniel Silverstone
8f7bfb7b56
Window: Add flag to ensure we don't set timeouts after close
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 10:14:31 +00:00
Daniel Silverstone
d1e2eef18b
JS: Add concept of js_closethread
In order to better model content close vs destroy, add the concept
of closing a thread to the JS interface.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 10:14:00 +00:00
Daniel Silverstone
efbfaa0cb1
JS: Move ownership of jsthread from browser to htmlc
Since it makes more sense for the htmlc to be responsible for
when the JS thread gets destroyed, move its lifetime from the
responsibility of the browser window to the html content.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 10:00:29 +00:00
Daniel Silverstone
98e461a3b3
Dukky: Make heaps refcounted too
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 09:59:52 +00:00
Daniel Silverstone
80e7ac7345
Dukky: Add refcounting to threads
In order to cope with threads which manage to navigate entirely
while executing (sadly possible) we need to handle the possibility
that a thread is destroyed by the browser but still needs to live
until it returns from whatever exec it was doing at the time.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 20:49:40 +00:00
Daniel Silverstone
3c4652c1c3
Dukky: Upgrade dukky binding to support new heap/thread split
Update the duktape bindings and dukky interface to support the
new JS heap/thread split.  Heaps may have multiple active threads
though in general there will only be 2 at a time.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 20:01:38 +00:00
Daniel Silverstone
337082f715
JS: Add concept of thread destroy
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 18:57:57 +00:00
Daniel Silverstone
17b28e85c1
JS: Split concept of JS context into heap and thread
In preparation for proper splitting of Javascript support into
heaps and threads, this renames the types and corrects the no-js
builds to still work.  At this time no substantive change in
semantics exists, and the duktape build won't work.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 18:30:41 +00:00
Daniel Silverstone
313dc9b099
JS: Remove unused slow script callback
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 18:07:50 +00:00
Michael Drake
c5aaf45d8e Fetch: Squash use of uninitialised value in fetch_send_callback()
The `last_msg` member of `struct fetch` was not initialised on
creation of the structure.
2020-03-12 17:22:28 +00:00
Michael Drake
0e6ba162b2 Internal content: Restyle certificate viewer page. 2020-02-24 21:54:54 +00:00
Daniel Silverstone
14286b381b
fs_backing_store: Remove cache on failure to init
If we fail to init the control file for reasons other than it
not being found, we blow away the cache in its entirety and then
try again.  We warn if the removal fails, but carry on regardless
since right now the worst that'll happen is that we'll end up
with more on disk than we know about in the cache.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 21:01:58 +00:00
Michael Drake
52bfae1782 Internal pages: Update directory listing style. 2020-02-24 18:22:03 +00:00
Daniel Silverstone
4c256408c5
fetch: Bump last_msg rather than always assigning it
If we are aborting a cURL fetch then it's possible entry to
cURL to clean up could cause a PROGRESS message to happen which
we need to not reset last_msg for, otherwise we spuriously attempt
to send an ERROR message during abort which is not a safe time for
our message callback to be used.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 17:43:21 +00:00
Daniel Silverstone
02c5bde5a9
fs_backing_store: Fix some comparison types
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 17:43:14 +00:00
Daniel Silverstone
fa75e8e4fd
fs_backing_store: Use correct format specifier for 64bit int
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 17:19:45 +00:00
Vincent Sanders
f172a21df9 about scheme certificate viewer initial implementation 2020-02-24 16:59:18 +00:00
Daniel Silverstone
5c205fbff0
fs_backing_store: Fix up comments to be in-line with values
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 15:56:55 +00:00
Michael Drake
f840833723 Low level cache: Squash use of uninitialised value.
Coverity issue:

CID 1419828:  Memory - corruptions  (UNINIT)
>>>     Using uninitialized value "output_length".
2020-02-24 15:37:20 +00:00
Daniel Silverstone
133e00edbe
fs_backing_store: 8K metadata blocks, 1K blocks, bump version
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 15:37:12 +00:00
Michael Drake
0140d1e5b1 Curl fetcher: Guard against read of uninitialised value.
Fixes Coverity issue:

CID 1419830:  Memory - illegal accesses  (UNINIT)
>>>     Using uninitialized value "buf[depth]".
2020-02-24 14:58:16 +00:00
Michael Drake
63dd59bd2e Cache backing store: Add missing calloc check.
Found by coverity:

CID 1419831:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "NULL" "url" when calling "read".
2020-02-24 14:34:37 +00:00
Michael Drake
b8dc537bf8 Curl fetcher: Squash coverity warning.
CID 1419832:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "goto out;".
2020-02-24 14:31:02 +00:00
Daniel Silverstone
bb5d72410b
fetchers: Rework the about, data, file, and resource fetcher poll loop
This simplifies the poll loops a little more and makes me less worried
that some other corner case will bite us in the future.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 14:25:37 +00:00
Michael Drake
a47270c93e About fetches resources: Drop maps resource.
It had bitrotted.
2020-02-24 14:21:27 +00:00
Daniel Silverstone
97870122dd
fetch: When aborting, ensure we note this to not multi-fail
When aborting a fetch, it may be cleaned up, in which case we
would otherwise send a spurious failure message too early. Instead
we record that the abort has occurred to suppress such an error.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 10:24:23 +00:00
Daniel Silverstone
5cfe0dfffc
fetchers: Apply cleaner ring handling mechanic to other fetchers
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 09:51:44 +00:00
Daniel Silverstone
083ba385d7
fetch: Automatically handle fetches which fail to finish
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 09:47:52 +00:00
Daniel Silverstone
89e468422d
about: Correct handling of ring in fetch_about_poll
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-24 09:46:59 +00:00
Daniel Silverstone
360997c265
fs_backing_store: Clear entry memory flags on read
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 23:04:49 +00:00
Daniel Silverstone
e6a5c090c9
curl: Implement SSL chain cache in cURL fetcher
Because cURL can do connection caching behind the scenes, we
need to have a cache for the SSL certificate chains which we
send onward on first header back from cURL.

This uses the new hashmap implementation to mean that we cache
chains on a hostname:port basis.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 22:31:58 +00:00
Daniel Silverstone
859972df71
llcache: Rework fs_backing_store to use hashmap
As a result, we no longer waste a bunch of RAM on the entries
tables.  This ought to be no slower, and more memory efficient.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 20:59:40 +00:00
Daniel Silverstone
ac75a9161e
llcache: Persist anything available during llcache_finalise
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 20:59:40 +00:00
Vincent Sanders
0c34d06494 Keep the complete certificate chain from a fetch
Instead of extracting information from the X509 certificate chain in
the fetcher the entire chain is propagated in Distinguished Encoding
Rules (DER) format.

This allows all the information contained in a certificate chain to be
retained which can subsequently be presented to the user
2020-02-23 16:23:50 +00:00
Vincent Sanders
214478fc15 Improve some content documentation comments 2020-02-23 16:17:51 +00:00
Michael Drake
f3b7a0c44c HTML Script: Check for success on intern of mimetype. 2020-02-23 14:28:27 +00:00
Daniel Silverstone
16163aab03
HTML: Ignore dom exceptions we don't care about
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 09:36:07 +00:00
Daniel Silverstone
b633bef7bf
Node: nodeValue setter should return value set into node
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 09:33:26 +00:00
Daniel Silverstone
bfd185ac49
dukky: Guard pointless work for deep debug
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 09:19:51 +00:00
Daniel Silverstone
bc1810ed61
JS: it's Infinity not infinity
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 19:37:54 +00:00
Daniel Silverstone
d0e775e901
JS: Add Element::attributes and NamedNodeMap to handle it
This is a *very* rudimentary implementation lacking most of the
functionality of NamedNodeMap but it's enough to get jQuery 1.12.4 up.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 18:40:35 +00:00
Daniel Silverstone
b23063bb52
JS Generics: Add a NodeMap proxy builder
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 18:40:16 +00:00
Daniel Silverstone
2325062ff1
Element: support innerHTML
To get us further along the JavaScript pathway, support the
getter and setter for innerHTML.  The getter always returns
an empty string for now, but the setter works.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 18:02:57 +00:00
Daniel Silverstone
61fdb8fda6
JS: Add DOMImplementation::createHTMLDocument
This was the last major thing blocking basic jQuery support

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 16:19:00 +00:00
Daniel Silverstone
fa520638fa
HTML: Ignore LOADING status in html_proceed_to_done()
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 14:26:33 +00:00
Daniel Silverstone
2f8868309a
HTML: Don't transition the content state machine if we do nothing
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 14:09:39 +00:00
Daniel Silverstone
db370bfdb7
HTML: Complete content state machine after async script
The async script completion process needs to complete the
content state machine so that browser throbbers eventually
stop once async scripts have fetched and run, even if that
happens *after* conversion finishes.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 10:48:00 +00:00
Vincent Sanders
55ba27c68f re-order config include so strcasecmp is correctly detected on RISC OS/win32 2019-12-22 11:11:04 +00:00
Daniel Silverstone
eba05b0d38
html_script: Count sync scripts to prevent unpausing early
If there is more than one incomplete sync script then it's
important that we don't unpause hubbub too early.  This commit
adds a counter so that if there're unfinished sync scripts in
the set, we don't unpause until the last one completes.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-19 20:50:33 +00:00
Michael Drake
faf667ada7 HTML: box_consturction: cleanup name dom_string in box_object. 2019-12-10 19:26:12 +00:00
Michael Drake
4c4b57d511 HTML redraw: Never draw box scrollbars for textareas.
The scrollbars for textareas are rendered by the widget.

This stops us from putting broken scrollbars over the top of the
textarea's own scrollbars.
2019-12-09 14:33:53 +00:00
Michael Drake
1c466369ef webp: NetSurf bitmap format is RGBA.
Issue a bitmap modified call after conversion, to allow front ends
with different pixel formats to convert.
2019-12-08 11:30:47 +00:00
Daniel Silverstone
3a8317fddb
fetch_curl_report_certs_upstream: Use new SSL_CERT_ERR_CERT_MISSING
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-03 09:42:14 +00:00
Daniel Silverstone
24dd16ddff
fetch_curl_verify_callback: Do depth update after check
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-03 09:35:51 +00:00
Michael Drake
eb88c92749 html: css fetcher: Fix passing LWC borrow to fetcher_add, which consumes.
Fixes abort on exit when corestring finalisation tried to unref
what should have been the final ref:

    $ ./nsgtk3
    corrupted double-linked list
    Aborted (core dumped)
2019-12-02 10:58:36 +00:00
Michael Drake
65e5512160 html: Fire DOM KeyboardEvents on keypresses. 2019-12-01 21:25:46 +00:00
Michael Drake
f620ea9d17 dukky_push_event: Enable KeyboardEvent specialisation. 2019-12-01 21:25:46 +00:00
Michael Drake
23d413c561 JavaScript: Add KeyboardEvent bindings. 2019-12-01 21:25:46 +00:00
Michael Drake
7e6723e27a html: Add function for issuing a keypress event. 2019-12-01 21:25:46 +00:00
Michael Drake
a2190f91c9 html: Split out helper for firing DOM events and swallowing errors. 2019-12-01 21:25:46 +00:00
Michael Drake
12fd5ddd69 HTML: Rename fire_dom_event to fire_generic_dom_event. 2019-12-01 21:25:46 +00:00
Daniel Silverstone
92caa16cfc
Add missing unrefs
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 17:25:49 +00:00
Daniel Silverstone
715586bb65
html_saw_insecure_objects: Don't infinite loop on objects
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 17:05:28 +00:00
Daniel Silverstone
33c81b6932
html_css_fetcher: Use corestring_lwc_x_ns_css
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-12-01 17:05:28 +00:00