Daniel Silverstone
dd02849df0
Add global handlers to Window
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-03 13:45:24 +01:00
Daniel Silverstone
b2e4c2ec58
UnimplementedJavascript.txt: Remove spurious newlines
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-03 13:39:07 +01:00
Daniel Silverstone
4f9a373960
Support Document::createEvent()
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-03 13:32:23 +01:00
Daniel Silverstone
2739a47d83
Event: Implement initEvent() and getter isTrusted
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-03 12:20:10 +01:00
Daniel Silverstone
177a047752
Update UnimplementedJavascript with the window functions now implemented
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-03 11:54:38 +01:00
Daniel Silverstone
c17e588b66
Javascript: Support setTimeout and friends
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-03 11:33:07 +01:00
Daniel Silverstone
519f029420
dukky: Clean up the logging levels a little
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-02 21:18:30 +01:00
Chris Young
178d4bc25c
Fix some bsdsocket.library usage
...
NetSurf now builds against libcurl-AmiSSL
2019-04-08 12:49:13 +01:00
Michael Forney
6455a2ea83
SVG content handler: Fix plot style stroke_width
...
In 8332bf6b2a
, when the stroke width was moved from a parameter to
the plot style field, it accidentally used the `stroke` field of
the svgtiny shape (the color) instead of `stroke_width`.
Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
2019-03-05 11:17:07 +00:00
Vincent Sanders
826474a1a3
use memcpy instead of strcpy to make the dom string copy intention explicit
2019-03-04 17:32:41 +00:00
Vincent Sanders
61891ada50
validate the form button element type attribute as per spec
...
https://html.spec.whatwg.org/multipage/form-elements.html#attr-button-type
says if the type attribute is anything but "reset" or "button" it
is of "submit" type. The previous logic was incorrect and only used
the button if its type was explicitly submit and noting else.
2019-02-22 21:11:34 +00:00
Vincent Sanders
070c74b648
add webp image handler
2019-02-17 12:09:17 +00:00
Vincent Sanders
6185b254ca
improve some comments
2019-02-17 12:08:23 +00:00
Vincent Sanders
09bbb4571b
tidy up bmp and ico makefile entries to be one per line
2019-02-17 12:07:06 +00:00
Daniel Silverstone
d4d57bc0ed
DUKKY: Remove LOG/JS_LOG macros, update to dukky category
...
Update the logging levels, change to NSLOG across the board,
and ensure that we use the `dukky` category now added for us.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-02-17 11:33:37 +00:00
Daniel Silverstone
41eed8eeaf
Use NSLOG rather than LOG/JS_LOG
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-02-17 11:33:28 +00:00
Michael Drake
e1a3e0427f
HTML handler: Reformat passing viewport height when triggered by object.
...
Previously we correctly used the viewport width, but we were using the
document height instead of viewport height when an HTML child content
triggered a reformat of the parent HTML document.
2019-02-17 09:06:58 +00:00
Michael Drake
07242c7415
Content: Make the content structure aware of viewport height.
...
It was always aware of viewport width, but since adding support for
vh CSS units, the HTML content handler also needs viewport height.
Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
2019-02-17 09:06:58 +00:00
Michael Drake
776b0242a6
Layout: Add debug logging to show viewport dimensions passed into layout.
...
Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
2019-02-17 09:06:58 +00:00
Michael Drake
0a3a40c23e
Box construction: Don't handle IMAGE specially.
2018-12-13 12:31:38 +00:00
Vincent Sanders
7264ff6f4d
ensure url buffer is sufficient to not truncate output
2018-11-06 21:58:53 +00:00
Vincent Sanders
5b235b5195
fix logging level in duktape binding
2018-11-06 21:54:03 +00:00
Daniel Silverstone
44082f9988
Slightly nicer handling of js_exec() and errors
2018-11-04 09:56:41 +00:00
Vincent Sanders
e275b3175b
check dom call return and improve handling of missing form type
2018-10-09 17:00:22 +01:00
Vincent Sanders
7a61c95724
rewrite form_successful_controls_dom as form_dom_to_data
...
Trying to reason about error propagation and resource leakage within
the form submission code was impossible because of the
form_successful_controls_dom function.
This function was over six hundred lines long, had twenty six top
level local variables and six levels of indent in places.
This commit splits it out into thirteen shorter and more obvious
functions. The resulting operation is identical except errors are
properly propagated (all failures were reported as out of memory)
and resource management can be reasoned about.
The compiler appears to inline the entirety of the code from
form_submit() down excepting a handful of leaf functions. This
results in similar code output size as previous implementation.
The new implementation has a greater number of variables passed to sub
functions than desirable because multiple character sets are required
to encode names and values in the multipart data list. However as
noted the compiler effectively inlines all these functions so this
does not actually become a major problem.
2018-09-29 16:59:34 +01:00
Vincent Sanders
a268252629
gcc on openbsd is unable to reason about res variable usage and generates bogus warning
2018-09-26 21:32:35 +01:00
Vincent Sanders
5c96acd6f1
fix url encoding to be compatible with nsurl API changes.
...
As part of this fix the form submission error handling and
reporting has been improved.
2018-09-26 17:21:48 +01:00
Vincent Sanders
e4537cb37e
allow comments to supress implicit fallthrough warnings
2018-09-07 12:53:51 +01:00
Michael Drake
9d8f37ca10
HTML: Don't try to finish an HTML document's conversion twice.
2018-08-27 20:47:37 +01:00
Vincent Sanders
eee67a65e8
remove warning by replacing sprintf snprintf
2018-08-24 11:49:56 +01:00
Vincent Sanders
5dd5d5da4b
remove warning by replacing strcpy with safer strncpy
2018-08-24 10:26:26 +01:00
Vincent Sanders
5f1defd4a7
fix size_t format specifiers
2018-08-18 23:44:15 +01:00
Michael Drake
5e97a3cb26
API: Don't expose urldb_{g|s}et_auth_details to frontends.
2018-08-15 07:29:58 +01:00
Michael Drake
9fa6c1e0fb
Text handling: Display application/json, rather than offering download.
2018-08-14 16:15:12 +01:00
Vincent Sanders
92424b6946
refactor llcache header processing
...
refactor the header processing in the low level object cache to make
cache control header processing more explicit.
2018-08-12 12:50:57 +01:00
Michael Drake
0601b7dbec
Duktape: Make declaration match definition for memcmp and double_div.
2018-08-10 12:30:48 +01:00
Michael Drake
80e8c74a69
Duktape: Make declaration match definition for duk_refzero_check_fast()
2018-08-10 11:30:17 +01:00
Michael Drake
ad0a75af8f
Duktape: Make declarations match definitions for fastint-enabled functions.
2018-08-10 11:29:39 +01:00
Michael Drake
e5f2ea9d7a
Duktape: Make declarations match definitions for duk_raw_read_xxx_be
2018-08-10 11:28:27 +01:00
Michael Drake
c986c212bf
Duktape: Make declarations match definitions for inline functions.
2018-08-10 11:27:56 +01:00
Michael Drake
f5f2ebb37a
Duktape: Prevent clang static analysis.
2018-08-10 11:12:20 +01:00
Michael Drake
ae126cfdd5
Duktape: Update to version 2.3.0 release.
2018-08-10 11:11:08 +01:00
Michael Drake
97f9e2d9f5
Curl fetcher: Jiggle logging levels.
2018-08-09 16:43:37 +01:00
Michael Drake
9fecbc6554
Content: Log URLs with nsurl_access_log().
...
This reduces the log file size for startup and a single visit
to https://www.bbc.co.uk/news from 266133 to 178777 bytes,
by not dumping big data URLs over and over into the log.
2018-08-09 16:31:16 +01:00
Michael Drake
ca0514ea92
Curl fetcher: Move poll logging from INFO to DEEPDEBUG.
2018-08-09 14:58:49 +01:00
Michael Drake
09b015bf11
Browser: Rename function to access bw URL.
2018-07-23 10:47:26 +01:00
Michael Drake
62e3ee6c7e
Layout: Use box helper for first child checks.
2018-06-29 15:03:47 +01:00
Michael Drake
049695fa07
Box: Add helper to check if box is first child.
2018-06-29 15:03:10 +01:00
Michael Drake
948207472a
Layout: Tidy condition so it can be read.
2018-06-29 14:58:32 +01:00
Michael Drake
8a931f01b9
Plotters: Expose array of font family strings to front ends.
2018-05-23 14:02:53 +01:00