Commit Graph

44 Commits

Author SHA1 Message Date
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
Michael Drake
770c277ccc Duktape: Prevent clang static analysis.
Restore 336326af3a for 1.6.0 import.
2016-12-28 15:06:08 +00:00
Michael Drake
539d5da5c4 Duktape: Make declarations match definitions for duk_raw_read_xxx_be
Restore 6d63f7959a for 1.6.0 import.
2016-12-28 15:04:08 +00:00
Michael Drake
7c03ae91fd Duktape: Update to version 1.6.0. 2016-12-28 15:01:03 +00:00
Vincent Sanders
af1f1f375d make nsgenbind call last in rule so faliures are noticed by make 2016-11-24 23:45:49 +00:00
Vincent Sanders
bcce8cc7b4 fix spelling of retrived 2016-11-21 00:07:13 +00:00
Vincent Sanders
f679a9b1d6 fix spelling and doxygen comments in image cache 2016-11-21 00:07:12 +00:00
Michael Drake
b3d98a4d7d Work in Progress: Update for style-sharing LibCSS API. 2016-11-19 14:46:44 +00:00
Michael Drake
b42d253f86 Table cell nowrap attribute is presentational hint, not UA style. 2016-10-13 12:44:27 +01:00
Michael Drake
91d6215215 Duktape: Prevent clang static analysis.
Restore 336326af3a for 1.5.1 import.
2016-08-31 18:58:13 +01:00
Michael Drake
a64f8eb8a0 Duktape: Make declarations match definitions for duk_raw_read_xxx_be
Restore 6d63f7959a for 1.5.1 import.
2016-08-31 18:58:13 +01:00
Michael Drake
9800c5f298 Duktape: Update to version 1.5.1.
Version 1.5.1 includes some of our own fixes, reducing our delta
to upstream.

These should not be needed now:

    - 2cbb337756
      Squash harmless Clang warning introduced in Duktape 1.5.0.
    - 8f8cda2b48
      Fix Duktape on AmigaOS3 (thanks to Tygre and Sami)
2016-08-31 18:54:35 +01:00
Chris Young
8f8cda2b48 Fix Duktape on AmigaOS3 (thanks to Tygre and Sami) 2016-08-27 18:51:17 +01:00
Sergei Rogachev
a815ad6250 Fix longjmp to invalid address on jpeg init error
Libjpeg used in NetSurf for decoding of JPEG images handles exceptions using a
pair of non-local jump functions: setjmp() and longjmp(). When a decompression
context is created via a call to the function jpeg_create_decompress() the
caller passes a structure jpeg_decompress_struct as a parameter. This structure
should has a validly initialized jump buffer, so the initialization or other
functions called in future can jump to the exception handling context.

The jpeg backend of NetSurf now initializes libjpeg mistakenly: jump buffer is
filled after the call to jpeg_create_decompress(). It results in jump to random
addresses in the case of exception caught during operation of the function
jpeg_create_decompress().

The patch moves the initialization of jump buffer before the call to
jpeg_create_decompress().

Signed-off-by: Sergei Rogachev <rogachevsergei@gmail.com>
2016-08-14 22:37:12 +01:00
Vincent Sanders
59b108498a fix bitmap modification callback calling for bmp image handler
bitmap file decoding is done at first call to redraw but was not
calling the modified callback at the correct time immediately after
decode so frontend image chnages were not being done. This caused
nsgtk to fail to apply its colour space fixups so red was swapped with
blue.
2016-08-14 22:26:37 +01:00
Vincent Sanders
976eca9958 msplit public url database API out for frontends 2016-06-13 23:34:45 +01:00
Vincent Sanders
042fcb82b8 Move javascript content handler as appropriate for updated source format 2016-06-07 16:01:04 +01:00
Vincent Sanders
8861923455 Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
Vincent Sanders
cf73e369ef fixup rsvg image handler for content API changes 2016-06-06 09:16:47 +01:00
Vincent Sanders
76a68d7dd0 Update content to split public and internal API 2016-06-06 09:01:38 +01:00
Vincent Sanders
667605869f move plotters header into public API 2016-05-30 21:05:57 +01:00
Vincent Sanders
fe7eb85614 move misc header into public API 2016-05-30 11:23:32 +01:00
Vincent Sanders
2dab078f21 move bitmap API header to core include directory 2016-05-26 23:01:03 +01:00
Vincent Sanders
6722943b81 move the CSS content handler 2016-05-26 11:18:41 +01:00
Vincent Sanders
3224d7121a move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00