Commit Graph

74 Commits

Author SHA1 Message Date
Michael Drake
0687687c37 Duktape: Revert alignment of struct duk_hobject. 2017-10-29 15:16:21 +00:00
Michael Drake
ea7da966de Duktape: Another attempt to squash aarch64 increases required alignment warnings. 2017-10-29 14:50:10 +00:00
Michael Drake
6619be2b72 Duktape: Attempt to squash aarch64 cast increases required alignment warnings.
content/handlers/javascript/duktape/duktape.c: In function 'duk_resolve_nonbound_function':
content/handlers/javascript/duktape/duktape.c:14585:25: error: cast increases required alignment of target type [-Werror=cast-align]
duk_push_tval(thr, &((duk_hboundfunc *) h)->target);
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_bi_function_prototype_bind':
content/handlers/javascript/duktape/duktape.c:32399:20: error: cast increases required alignment of target type [-Werror=cast-align]
h_boundtarget = (duk_hboundfunc *) h_target;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_free_hobject':
content/handlers/javascript/duktape/duktape.c:46048:23: error: cast increases required alignment of target type [-Werror=cast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk__mark_hobject':
content/handlers/javascript/duktape/duktape.c:47865:23: error: cast increases required alignment of target type [-Werror=cast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_hobject_refcount_finalize_norz':
content/handlers/javascript/duktape/duktape.c:49842:23: error: cast increases required alignment of target type [-Werror=cast-align]
duk_hboundfunc *f = (duk_hboundfunc *) h;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk__handle_bound_chain_for_call':
content/handlers/javascript/duktape/duktape.c:61509:14: error: cast increases required alignment of target type [-Werror=cast-align]
h_bound = (duk_hboundfunc *) func;
^
content/handlers/javascript/duktape/duktape.c: In function 'duk_js_instanceof':
content/handlers/javascript/duktape/duktape.c:78117:24: error: cast increases required alignment of target type [-Werror=cast-align]
duk_push_tval(thr, &((duk_hboundfunc *) func)->target);
^
2017-10-29 14:02:10 +00:00
Michael Drake
a47edd3733 Duktape: Make declarations match definitions for inline functions. 2017-10-21 16:33:03 +01:00
Michael Drake
8e7fc8e2ac Duktape: Make declarations match definitions for fastint-enabled functions.
Restore ff20edbfbe for 2.2.0 import.
2017-10-21 16:23:16 +01:00
Michael Drake
0759139c61 Duktape: Make declaration match definition for duk_refzero_check_fast()
Restore 9a8577fead for 2.2.0 import.
2017-10-21 16:21:48 +01:00
Michael Drake
0a7f62ceb0 Duktape: Make declarations match definitions for duk_raw_read_xxx_be
Restore 6d63f7959a for 2.2.0 import.
2017-10-21 16:20:33 +01:00
Michael Drake
6f33e48ca3 Duktape: Prevent clang static analysis.
Restore 336326af3a for 2.2.0 import.
2017-10-21 15:54:33 +01:00
Michael Drake
3356906904 Duktape: Update to 2.2.0 release. 2017-10-21 15:51:55 +01:00
Michael Drake
f7f18042bf CSS: Wrappers for computed style getters that return unsupported values.
We don't yet handle the Flexbox-related values for certain properties.
2017-10-20 17:46:37 +01:00
Michael Drake
f64a22c228 CSS hints: Ensure length and unit are initialised for vertical-align. 2017-10-13 10:28:42 +01:00
Vincent Sanders
b9bdc8d312 fix image cache format specifiers signedness 2017-09-11 17:29:57 +01:00
Vincent Sanders
63f5ba6f62 update bindings with logging changes 2017-09-06 18:45:35 +01:00
Vincent Sanders
75018632a9 Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done

@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 18:45:27 +01:00
Vincent Sanders
8d9b2efc11 use nslog library for logging if available. 2017-09-03 23:40:32 +01:00
Michael Drake
c2ac1a713f Errorcodes: Add SPRITE_ERROR and use it in sprite content handler. 2017-08-30 09:43:13 +01:00
Michael Drake
1670dc33af Sprite content handler: Ensure we broadcast error on librosprite error. 2017-08-29 11:57:34 +01:00
Michael Drake
a9d18a8efd Sprite content handler: Fix leaked rosprite_mem_context on rosprite_load error. 2017-08-29 11:55:46 +01:00
Michael Drake
ba0283f526 RSVG content handler: Remove unused assignement. 2017-08-28 12:16:24 +01:00
Michael Drake
e411c84e9b SVG content handler: Convert to using content_broadcast_errorcode(). 2017-08-28 10:24:04 +01:00
Michael Drake
9e64f37846 RSVG content handler: Convert to using content_broadcast_errorcode(). 2017-08-28 10:21:11 +01:00
Michael Drake
cae1c44f8f PNG content handler: Convert to using content_broadcast_errorcode(). 2017-08-28 10:14:22 +01:00
Michael Drake
36c01fc03b Sprite content handler: Convert to using content_broadcast_errorcode(). 2017-08-28 10:06:47 +01:00
Michael Drake
d1a493f569 ICO content handler: Convert to using content_broadcast_errorcode(). 2017-08-27 13:32:53 +01:00
Michael Drake
d83f6ea3c1 GIF content handler: Convert to using content_broadcast_errorcode(). 2017-08-27 13:28:21 +01:00
Michael Drake
337bd98f6c BMP content handler: Convert to using content_broadcast_errorcode(). 2017-08-27 13:28:21 +01:00
Michael Drake
d4cdcf3067 CSS content handler: Convert to using content_broadcast_errorcode(). 2017-08-27 13:09:44 +01:00
Michael Drake
d70beb28db Content API: Make content_broadcast take pointer to content_msg_data. 2017-08-26 15:50:03 +01:00
Michael Drake
ff20edbfbe Duktape: Make declarations match definitions for fastint-enabled functions. 2017-04-21 11:33:28 +01:00
Michael Drake
6da983ca27 Duktape: Enable fastints.
Suggested by svaarala.
2017-04-20 12:12:29 +01:00
Michael Drake
9a8577fead Duktape: Make declaration match definition for duk_refzero_check_fast() 2017-04-16 17:36:25 +01:00
Michael Drake
40e589531e Duktape: Make declarations match definitions for duk_raw_read_xxx_be
Restore 6d63f7959a for 2.1.0 import.
2017-04-16 16:58:57 +01:00
Michael Drake
8449b13a3a Duktape: Prevent clang static analysis.
Restore 336326af3a for 2.1.0 import.
2017-04-16 16:58:35 +01:00
Michael Drake
db9b0dfe00 Duktape: Update to 2.1.0 release. 2017-04-16 16:57:01 +01:00
Michael Drake
5d5081eb57 CSS: Handle presentational hint for HR's "width" attribute. 2017-04-10 09:33:09 +01:00
Michael Drake
abdab90859 Presentational hints: Ensure length is initialised for auto margins.
Although the length is unused when margin is auto, having
uninitialised values present in a computed style means that
the style hashing may give the same style different hashes
depending on the unintitialised info.

The effect of this would have been be to reduce the chance
of computed style sharing.  It would have had no effect on
page rendering.
2017-04-06 17:14:58 +01:00
Michael Drake
0a0e7b5bd7 Duktape: Suppress warnings about increasing alignment of pointer type. 2017-03-23 17:52:28 +00:00
Michael Drake
ae793a3ad9 Duktape: Atari Mint lacks trunc, log2 and cbrt.
build/Linux-atari/content_handlers_javascript_duktape_duktape.o:build/Linux-atari/content_handlers_javascript_duktape_duktape.o:(.text+0x978): undefined reference to `_trunc'

build/Linux-atari/content_handlers_javascript_duktape_duktape.o:build/Linux-atari/content_handlers_javascript_duktape_duktape.o:(.text+0x990): undefined reference to `_log2'

build/Linux-atari/content_handlers_javascript_duktape_duktape.o:build/Linux-atari/content_handlers_javascript_duktape_duktape.o:(.text+0x99c): undefined reference to `_cbrt'
2017-03-23 16:02:48 +00:00
Michael Drake
bc204a469a Duktape: Make declarations match definitions for duk_raw_read_xxx_be
Restore 6d63f7959a for 2.0.2 import.
2017-03-23 15:30:22 +00:00
Michael Drake
c98fc7999a Duktape: Prevent clang static analysis.
Restore 336326af3a for 2.0.2 import.
2017-03-23 14:56:32 +00:00
Michael Drake
5d39972b9f Duktape 2.X: duk_error now returns a duk_ret_t
https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_error-duk_error_va-duk_throw-duk_fatal-have-a-return-value

This also changes Console.bnd to return on error, rather than ignoring it.
2017-03-23 14:56:32 +00:00
Michael Drake
ff8e5c99a0 Duktape 2.x: duk_safe_call callbacks now have a void ptr user data param.
https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_safe_call-userdata
2017-03-23 14:56:32 +00:00
Michael Drake
736bbbed71 Duktape 2.X: Update to Duktape 2.0.2.
Note that DUK_OPT_XXX feature selection has been removed.

This means we can't use `DUK_OPT_HAVE_CUSTOM_H`, so we need another
way to tell duktape about our custom header.

This means assembling our own duktape distribution with a
duktape "tools/configure.py" invocation.

Instructions for updating duktape have been added to NetSurf's
`Docs/` directory.

See:
https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_opt_xxx-feature-option-support-removed
2017-03-23 14:56:32 +00:00
Vincent Sanders
3722ff8d86 Update all core use of plotters to new API 2017-02-11 13:55:41 +00:00
Daniel Silverstone
8e9751d3b6 Add EventTarget binding
This adds the binding for EventTarget along with implementations for
addEventListener() removeEventListener() and dispatchEvent()
2017-02-05 12:39:46 +00:00
Daniel Silverstone
2858aec1c2 Add EventListener support to duktape binding.
This paves the way for EventTarget and its associated event listener support.
In particular it ensures the generic event handling we do supports the
semantics of the addEventListener() and removeEventListener() managed lists of
callbacks.
2017-02-05 12:05:04 +00:00
Daniel Silverstone
108cc0cebd Support fixed nsgenbind bindings 2017-02-05 11:20:08 +00:00
Vincent Sanders
6075feb487 create netsurf inttypes header to have portable integer formatting macros 2017-01-21 14:20:55 +00:00
Vincent Sanders
7dab7cb43d move plot style header to netsurf include directory
move plotter style header and adjust all callers to use only what they
actually require.
2017-01-13 10:03:24 +00:00
Vincent Sanders
9be0f4ccaf fixup usage of directory creation macro in Makefiles 2017-01-07 13:21:25 +00:00