Commit Graph

13781 Commits

Author SHA1 Message Date
John-Mark Bell
c1dc4e61bd LLCache: validate max-age before use 2019-06-10 21:36:52 +00:00
John-Mark Bell
23698aecf8 HTTP: expose validity of max-age in Cache-Control
As max-age is an optional directive, provide a means to determine
if it is present and correct.
2019-06-10 21:35:36 +00:00
John-Mark Bell
047c82cfce LLCache: use Cache-Control parser 2019-06-10 21:02:26 +00:00
John-Mark Bell
04b790643b HTTP: add minimal parser for Cache-Control 2019-06-10 21:02:19 +00:00
Vincent Sanders
9893b05b08 use jmb suggested fix to cache-control header parse error 2019-06-10 21:58:46 +01:00
Vincent Sanders
e598dcd139 fix parsing of invalid syntax max-age value Cache-control header 2019-06-10 20:53:12 +01:00
Chris Young
24590a1145 Check callback memory is allocated before trying to use it. 2019-06-09 20:30:46 +01:00
Chris Young
93494790f3 Fix memory leak in Amiga frontend 2019-06-09 20:17:47 +01:00
Chris Young
7314651b95 NULL drawhandle after free 2019-06-09 19:29:56 +01:00
Daniel Silverstone
e82107a296 Window.bnd: Suppress some unnecessary stack frame dumps
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-09 15:59:05 +01:00
Daniel Silverstone
03624bcf7a browser.c: Don't require > 0 chars in logging
Sometimes JavaScript chooses to log an empty string.  We should
honour that by requiring msg be a valid empty string.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-09 15:20:17 +01:00
Daniel Silverstone
c5c8a49276 Window.bnd: Expose isNan
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-09 15:20:01 +01:00
Daniel Silverstone
04cf2fe588 Window.bnd: Do not remove in-train callbacks
Sometimes callbacks may be cancelled from within themselves.  In
that case we need to simply ensure that should the callback be
wanted to repeat, we instead stop that so that once the callback
is completed we do not attempt to reschedule something which had
already been deleted.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-09 11:04:15 +01:00
Vincent Sanders
dddc5eac94 Update schedulers return codes
The GTK and monkey frontends schedulers now return NSERROR_NOT_FOUND
 when a caller is using a negative schedule time to remove a callback.
2019-06-08 13:33:16 +01:00
Vincent Sanders
c74c8332ac allow monkey tests to stop navigation 2019-06-06 17:17:27 +01:00
Vincent Sanders
eeeca4b712 add ability to stop a navigation in monkey frontend 2019-06-06 17:17:27 +01:00
Vincent Sanders
4be18fcf47 detect monkey exit rather than waiting forever for a defunct process 2019-06-06 17:17:27 +01:00
Vincent Sanders
f2000ae60e improve stdout print formatting 2019-06-06 17:17:27 +01:00
Daniel Silverstone
64ee8e1b00 html.c: Correct ordering for reformat time
Fix a minor bug where we'd likely never end up reformatting.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-05 22:59:49 +01:00
Vincent Sanders
27ee92c872 extend the monkey test tooling to cope with ssl certificate windows 2019-06-05 20:58:40 +01:00
Daniel Silverstone
3d80e825e1 content/fetchers/curl.c: Defer fetch start if inside cURL
In order to cope better with modern cURL which prevents making
cURL calls when inside a callback from within cURL, defer fetch
start when we are processing in `fetch_curl_data()`.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-05 19:51:47 +01:00
Daniel Silverstone
41608a73c0 monkey-see-monkey-do: Also restore stdout/stderr when success
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-04 21:50:43 +01:00
Daniel Silverstone
c07b2edd77 Document.bnd: createDocumentFragment() unref fragment
The pushed fragment node holds the reference, so unref it in
the end of createDocumentFragment()

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-01 13:59:36 +01:00
Daniel Silverstone
9c32564085 html_script.c: html_script_exec() reqacquire script ptr
Since executing a script can cause more scripts to be appended
to the script array, and that can cause a reallocation which might
move the script array, reacquire the script pointer after running
the script so that we don't wander off into the reeds.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-01 13:25:14 +01:00
Vincent Sanders
a6de56583c Improve javascript unimplemented bnding documentation generation 2019-05-31 19:40:10 +01:00
Vincent Sanders
19de453ad5 Fix dump choices test data to align with altered logging levels 2019-05-31 18:56:14 +01:00
Vincent Sanders
295617b451 Fix test target use of logging config defines 2019-05-31 18:44:04 +01:00
Daniel Silverstone
c47cc08883 Ensure we set the defaults for the log options to those compiled in
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-28 20:49:12 +01:00
Vincent Sanders
13a5b8f74a make curl fetcher log debug using NSLOG
stop curl fetcher logging being special case to standard error and
 use the fetch catagory at DEBUG level instead.

The special suppress_curl_debug option is currently still obeyed
2019-05-28 11:16:49 +01:00
Daniel Silverstone
57094c84ed Expose NaN on Window
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 20:11:52 +01:00
Daniel Silverstone
196c2fc845 Add dodgy window method to clear callbacks
Until we can determine *how* the compartment isn't cleaning
up properly in the duktape context, this will at least mean
we don't get unpleasant callback related issues when compartments
are reset during browsing.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 16:23:37 +01:00
Daniel Silverstone
87be4e7a17 Log when we finalise window objects
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 16:13:57 +01:00
Daniel Silverstone
c42039c546 Use generics for makeListProxy properly
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 16:13:57 +01:00
Daniel Silverstone
9ee92823e2 Use generics for makeListProxy properly
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 16:13:57 +01:00
Daniel Silverstone
78385629c3 Remove unnecessary generics magic
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 16:13:57 +01:00
Vincent Sanders
12bba5a1cc fix block conditional checks to be orred instead of anded 2019-05-20 10:07:53 +01:00
Vincent Sanders
ea9bc4e2be allow block to use elapsed timer as a condition 2019-05-18 23:45:52 +01:00
Vincent Sanders
cb178b43be update ca bundle 2019-05-18 22:39:39 +01:00
Vincent Sanders
5bd54f4c0c allow render checks to be empty 2019-05-18 22:39:15 +01:00
Vincent Sanders
2db39b1f7d quieten down windows debug 2019-05-17 18:15:58 +01:00
Chris Young
a5e4bf8220 Make SimpleRefresh the default.
This reduces memory use.
2019-05-12 16:43:01 +01:00
Chris Young
f139c4fa4d Add a render hook to ensure the browser window is redrawn when needed
This fixes the occasional damaged areas in SimpleRefresh mode
2019-05-12 16:38:48 +01:00
Chris Young
336a7dc170 Mark functions as static 2019-05-10 22:11:21 +01:00
Chris Young
6ac65a3674 Hide the message port which is shared amongst all Amiga NetSurf windows 2019-05-10 21:59:03 +01:00
Chris Young
24b910f4ff Make the window list more private
TODO: fix arexx.c to not need it
2019-05-10 21:49:00 +01:00
Chris Young
a5051c7128 Use new beep function 2019-05-10 21:34:22 +01:00
Chris Young
97010ecef5 Make screen pointer accesible through an accessor function only 2019-05-10 20:59:30 +01:00
Chris Young
c5a07fac76 Replace global current gui_window with an accessor function 2019-05-10 20:32:40 +01:00
Vincent Sanders
8f9d434b12 make win32 keyboard handling in browsing window functional
makes the drawable area widget for the browser display use windows
unicode input and copes with surrogate pairs for full unicode input
coverage.

fixes the keydown handling to only the necessary navigation operations
like left, right up and down etc.
2019-05-09 23:27:59 +01:00
Vincent Sanders
95b8d12950 implement windows clipboard functionality
This allows clipboard to operate (cut, copy, paste and delete) in the
 win32 front end. The clipboard is set and read in windows unicode
 mode and then converted to/from utf-8 for the browser core.
2019-05-09 23:11:05 +01:00