Commit Graph

13068 Commits

Author SHA1 Message Date
Vincent Sanders
b102950650 update atari frontend for invalidate window API change 2017-04-23 12:05:30 +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
Vincent Sanders
6833f526f6 update amiga frontend invalidate window API change 2017-04-19 16:32:21 +01:00
Vincent Sanders
febbdec345 update riscos frontend to invalidate window API 2017-04-19 16:27:14 +01:00
Vincent Sanders
14bff8d023 replace redraw and update methods with invalidate in window table API 2017-04-19 16:23:08 +01:00
Chris Young
7e0ed132f7 Adjust the requested class versions to be the minimum required.
Some features of later versions are used but are either restricted to OS4 only, or runtime version checks select the appropriate routines.
Where the lowest required version cannot be determined, the version provided in the ClassAct 3.3 archive is requested.
Bugs may mean these older classes do not work as expected.
In addition, restrict the opening of listbrowser.gadget and the custom Stringview class to OS4 only.
2017-04-16 17:49:27 +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
2c8a47b7d4 GTK: Slight optimisation to nsfont_split().
When we aren't modifying the line, pango_layout_get_line_readonly()
is a faster alternative to pango_layout_get_line().
2017-04-11 16:32:03 +01:00
Michael Drake
90100bbd45 GTK: Font rendering: Use same pango layout for painting as for measuring.
With this change we are consistent about how the pango layout
we use is created.

Now it always comes from a pango_layout_new() call on a pango context
that comes from gdk_pango_context_get().

Previously the pango layout used for painting came from a call
to pango_cairo_create_layout(), which required a global called
"current_cr" (a cairo drawing context), which is only valid
during redraw (painting).  Since it was only valid during
painting, this source could not be used for pango layout
creation for the measuring code.
2017-04-11 16:13:13 +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
Daniel Silverstone
e499f5c08f Support coverage flushing on assert()
When assert() is called, which is not uncommon in utility code within NetSurf,
we lose coverage data for anything done before the assert() in the test.  This
commit corrects that oversight but is at least slightly GCC specific and may
need tweaks for non-Linux platforms.

By default, 'make coverage' will enable assert coverage, and it can be disabled
with 'make coverage NOASSERTCOVERAGE=yes' if necessary.

Signed-off-by: Daniel Silverstone <dsilvers@netsurf-browser.org>
2017-03-31 18:53:52 +01:00
Vincent Sanders
4e750bdab6 fix doc comment spelling mistake 2017-03-28 11:45:24 +01:00
Michael Drake
7338f3ce88 nsurl: Remove redundant code path. 2017-03-27 18:09:29 +01:00
Michael Drake
f90559d2db Tests: Increase nsurl coverage. 2017-03-27 17:55:48 +01:00
Michael Drake
775687a79b Tests: Add nsurl insensitivity test for HTTPS scheme. 2017-03-27 16:01:47 +01:00
Michael Drake
b024c0bcb5 Tests: Add nsurl tests for unnecessary and bad escape values. 2017-03-27 15:41:24 +01:00
Michael Drake
8b4df800be nsurl: Use ascii header for hex to value conversion. 2017-03-27 15:40:08 +01:00
Michael Drake
0e7ebb4ee0 ASCII: Add function for converting two hex chars to value. 2017-03-27 15:37:25 +01:00
Michael Drake
b14aa97a2a ASCII: Add hex char to value conversion function. 2017-03-27 15:35:59 +01:00
Michael Drake
8caae83d35 ASCII: Split out a-f test. 2017-03-27 14:57:56 +01:00
Michael Drake
3ec522429a ASCII: Split out A-F test. 2017-03-27 14:50:36 +01:00
Michael Drake
04d74a79ae Tests: Add some more nsurl cases insensitivity tests. 2017-03-27 14:40:12 +01:00
Michael Drake
1cced51440 Tests: Add tests for file: URL credentials and host handling. 2017-03-27 12:24:37 +01:00
Michael Drake
8e96e9bc27 nsurl: Don't allow credentials or host for file: URLs. 2017-03-27 12:20:33 +01:00
Michael Drake
13a2ac7c08 Tests: Add more file scheme URL parsing tests. 2017-03-27 12:15:11 +01:00
Michael Drake
0e62d45006 Tests: Fix file URL component parsing test to match corrected behaviour. 2017-03-27 12:14:04 +01:00
Michael Drake
372df59f28 nsurl: Set path of "/" for file: URLs with empty path. 2017-03-27 12:11:16 +01:00
Michael Drake
465ad9f0ab nsurl: Add detection of "file:" URL schemes. 2017-03-27 12:09:45 +01:00
Michael Drake
b605270d42 nsurl: Add "file:" entry to enum of known URL schemes. 2017-03-27 12:05:11 +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
34dec2b5d4 Merge branch 'tlsa/duktape2' 2017-03-23 14:57:43 +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
Michael Drake
6bfc8ba547 HTML content handler: Don't let aborted contents get stuck in LOADING.
Previously, aborted HTML fetches left the content in LOADING state,
and the hlcache clean code does not clean contents in the LOADING
state.  They, and their child contents ended up stuck in the
cache forever.
2017-03-23 14:31:38 +00:00
Michael Drake
0747e0ed53 HTML object fetch handler: Remove bogus parent content state assertion. 2017-03-23 14:31:22 +00:00
Michael Drake
be77f764e2 Improve content logging with content IDs (pointer values).
This makes it easier to track a content by its ID through a log.
2017-03-23 14:23:57 +00:00
Vincent Sanders
c512b2f054 Add heap fault injection generator into tests
This builds a dynamic library which can cause heap allocation (malloc)
faliures after a specified number of calls. This is useful to allow
tesing of memory failure allocation paths within netsurf test suites.

An example test for core strings test has been added which
incrementaly fails alloctions allowing all error paths in
initialisation to be exercised.
2017-03-22 08:56:24 +00:00
Chris Young
3df40959e3 Allow for more varied notification backmsgs 2017-03-21 18:42:41 +00:00
Vincent Sanders
7706ba5beb fix mime sniff test with comment tag 2017-03-20 23:39:15 +00:00
Vincent Sanders
399d19ce25 extend mime sniff coverage with bad mp4 tests 2017-03-20 23:21:26 +00:00
Chris Young
cd39367ef4 Try to avoid extraneous progress notifications 2017-03-20 20:53:39 +00:00