Commit Graph

12422 Commits

Author SHA1 Message Date
Chris Young
cd0ed22494 Bring screen to front when new window/tab is opened be launching NetSurf a second time. 2016-09-04 17:10:59 +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
Vincent Sanders
c71b1ec91b add some sanity checking for HOST variable if already set in environment 2016-08-29 13:51:11 +01:00
Chris Young
8f8cda2b48 Fix Duktape on AmigaOS3 (thanks to Tygre and Sami) 2016-08-27 18:51:17 +01:00
Vincent Sanders
a8a6098f68 move core window API into netsurf header path 2016-08-18 21:07:04 +01:00
Chris Young
5aa2feaa06 Call CloseLibrary 2016-08-18 00:33:58 +01:00
Chris Young
7543833037 Ensure we don't use a half-opened library if it is optional. 2016-08-18 00:32:33 +01:00
Chris Young
404b522119 Fail if the library interface doesn't open.
This will happen when attempting to open old 68k libraries with no separate interface file, but may also occur when the interface name or version doesn't exist (although the library version number _should_ prevent that)
2016-08-18 00:20:08 +01:00
Michael Drake
2d5db505e7 Test: Add trailing whitespace and garbage datetime string parse tests. 2016-08-17 09:11:02 +01:00
Michael Drake
30646c3145 Time: Micro-optimisation: Put GMT first in timezone list. 2016-08-17 09:07:44 +01:00
Vincent Sanders
72277de6ea add bmp file format to file fetch types for gtk and framebuffer 2016-08-16 13:08:44 +01:00
Chris Young
e8e15b9133 Open a new window instead of a tab if we can't locate the window the tab is supposed to be added to. 2016-08-15 18:00:12 +01:00
Chris Young
923cc06f98 Allow a second-run NetSurf to open passed URL in a new tab rather than a new window. 2016-08-15 17:51:01 +01:00
Vincent Sanders
02360ec7be add some corestrings API tests and fix corestrings fini. 2016-08-14 23:49:53 +01:00
Vincent Sanders
0e5824c8e8 add bloom filter test for adding NULL string 2016-08-14 23:32:20 +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
c95cca4ca6 licence and credits buttons got swapped, fix it
Thanks to bavier for the bug report
2016-08-14 22:34:49 +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
Michael Drake
91f4f89d4c Merge branch 'tlsa/date' 2016-08-13 13:36:17 +01:00
Michael Drake
fe00eac8cb Buildsystem: Make curl/openssl usage build-time options. 2016-08-13 13:31:07 +01:00
Michael Drake
78d53fff1f Tests: Add some basic tests for date string parsing. 2016-08-13 13:11:48 +01:00
Michael Drake
f23405f667 Time: Add date string to time_t parser. 2016-08-13 13:11:48 +01:00
Michael Drake
a1668f6c1e url: Use ascii module, rather than ctype for locale safetly. 2016-08-13 12:05:55 +01:00
Michael Drake
efeeacca86 nsurl: Update to use ascii_* helper functions. 2016-08-13 12:05:55 +01:00
Michael Drake
16b66d3af5 Utils: Add a set of ASCII string parsing helpers.
These are not affected by the current locale.
2016-08-13 12:05:54 +01:00
Michael Drake
477b65eac0 Time: Expose arrays of weekday and month names. 2016-08-13 12:05:54 +01:00
Chris Young
6a3f7a386e Ensure we are treating LShift/RShift and LAlt/RAlt the same. 2016-08-12 20:32:09 +01:00
Chris Young
0b67394618 Don't attempt to close a public screen we're not the owner of.
I've never been entirely clear on what the correct approach here is, but OS4 has a feature where it will auto open/close a public screen for you.  In this case, in the microseconds between unlocking that screen and attempting to close it, OS4 has already disposed of the screen and NetSurf has crashed, so we assume the owner will handle the closing instead.
2016-08-11 22:34:46 +01:00
Chris Young
c80551b64b Fix OS3 build 2016-08-11 18:55:57 +01:00
Chris Young
5f65b1caa7 OS3-related comments 2016-08-11 18:55:43 +01:00
Chris Young
a0d51e5f68 Remove excessive scheduler debug 2016-08-11 18:20:51 +01:00
Chris Young
ab7e5c2936 Don't Abort/WaitIO when we've already removed it from the message queue (thx Georg) 2016-08-11 18:14:07 +01:00
Michael Drake
68b20a382d Tests: Fix option handling test data. 2016-08-11 08:42:51 +01:00
Michael Drake
1457a049bb Treeview: Add treeview_font_size to options.
Default is 11pt, and RISC OS overrides to 12pt.
2016-08-11 08:15:21 +01:00
Chris Young
ebb2a33b0b Missing TAG_DONE (thx capehill) 2016-08-10 23:55:28 +01:00
Michael Drake
9aecf47408 Treeview: Rationalise initialisation and finalisation.
Previously the expected behaviour for front ends using the correct
API for hotlist, global history, cookie manager, and ssl cert
viewer was that the front end would initialise the treeview module
on startup and finalise it on application exit.

However, this meant that the front ends had to include the core
treeview header, which they didn't otherwise need.

Since the tree module provided access to the new treeview utilities
through the old tree API, and was used by front ends with no changes
for the new treeview API, the tree layer refcounted initialisations
of treeview-based widgets, and only called the underlying treeview
init/fini functions when needed.

This change moves that refcounting into the treeview module.  Now
the hotlist, global history, cookie manager, and ssl cert viewer
widgets call call treeview init/fini as part of their own
initialisation and finalisation.  This means that front ends
using the correct APIs for treeview-based widgets don't need to
know anything about the underlying treeview, and the tree module
compatibility layer has had its treeview refcounting removed.

Finally, the treeview_init function took a font size parameter.
Now it does not and lit gets font size from config.  We probably
want to add a new `treeview_font_size` option to nsoptions, and
have differnent defaults on different platforms. 12pt on RISC OS,
and 11pt elsewhere, most likely.
2016-08-10 18:57:36 +01:00
Chris Young
b63443b243 Use the API for duplicating IORequests
Add some more debug:
  It appears that some timer events are not being picked up, I can see in the log that something which should have been signalled is not being run.
Enabling the log appears to make the situation worse.
2016-08-10 17:54:26 +01:00
Chris Young
4b14f9ff37 Always wait for at least some time, as it's ambiguous as to whether a 0.0s timerequest is valid. 2016-08-10 00:21:52 +01:00
Chris Young
cd48860207 more debug 2016-08-09 20:00:52 +01:00
Chris Young
1ca5b7332c Decouple the scheduler from system time
This is a hang-over from the old polling scheduler.  I've modified it to use relative times and pass the callback along with the TimeRequest so events get executed in the order they arrive.
The list of events is still in a heap sorted by expected execution time, but this may need to change to something more efficient for random lookups.
2016-08-09 18:36:09 +01:00
Vincent Sanders
94de23dce9 add more tests for partial iterator in url database 2016-08-09 13:15:36 +01:00
Vincent Sanders
9176d3233f ensure url database destructor cleans up correctly 2016-08-09 13:15:02 +01:00
Vincent Sanders
6a26755576 add more API coverage to url database unit tests 2016-08-09 12:41:16 +01:00
Vincent Sanders
115985f069 extend url database unit testing to cover more API 2016-08-09 12:26:37 +01:00
Vincent Sanders
d35ad1b8e7 add cookies tests to url database unit testing 2016-08-09 10:47:47 +01:00
Chris Young
24c1959105 We don't need ReplyMsg here.
TimerRequests are removed from the message queue by WaitIO() which is ultimately called when the event is taken off the heap.
The event on the top of the heap is _not necessarily_ the one which signalled us, though, and we should probably be handling this better.
2016-08-09 00:53:46 +01:00
Chris Young
747958c14c Scheduler debug logging 2016-08-09 00:20:26 +01:00
Vincent Sanders
54860ee6b8 add cookie database load and restore unit test 2016-08-09 00:09:33 +01:00