Commit Graph

1514 Commits

Author SHA1 Message Date
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