Commit Graph

100 Commits

Author SHA1 Message Date
John Mark Bell 339bed7272 Virtualise content handler finalisation calls. Remove pointless implementations.
svn path=/trunk/netsurf/; revision=12797
2011-09-15 22:47:50 +00:00
Vincent Sanders 2d33a8f85a Make high level cache, low level cache and image cache all be initialised from passed parameters
Calculate all cache sizes from single memory cache size option and sanity check
have a single global struct to hold all parameters instead of several individual variables

svn path=/trunk/netsurf/; revision=12784
2011-09-10 00:55:39 +00:00
Vincent Sanders dec633ca8e make high level cache take a parameter structure
make hlcache have a single global container

svn path=/trunk/netsurf/; revision=12779
2011-09-08 12:04:57 +00:00
Vincent Sanders 69bee6fb71 move bitmap cache initialisation up a level
improve stats reporting

svn path=/trunk/netsurf/; revision=12770
2011-09-07 09:15:33 +00:00
John Mark Bell 6807fa854d Sniff content types where appropriate.
We never sniff for CSS, nor for non-page artefacts (e.g. treeview icons)

svn path=/trunk/netsurf/; revision=12707
2011-09-04 06:28:09 +00:00
John Mark Bell b92ca9cd30 Clean up after content factory
svn path=/trunk/netsurf/; revision=12415
2011-05-16 21:16:44 +00:00
John Mark Bell e71691bae8 Merge branches/jmb/content-factory to trunk
svn path=/trunk/netsurf/; revision=12283
2011-05-06 20:40:09 +00:00
Vincent Sanders 74ffc40e92 move logging initialisation
svn path=/trunk/netsurf/; revision=12152
2011-04-02 13:05:55 +00:00
Vincent Sanders fff2520409 commandline option setting
svn path=/trunk/netsurf/; revision=12106
2011-03-18 21:58:29 +00:00
Daniel Silverstone e083b503a0 Ensure we stop the hlcache schedule before we quit the gui
svn path=/trunk/netsurf/; revision=12036
2011-03-13 20:20:31 +00:00
Daniel Silverstone 93e9bfe323 Shunt the schedule function definitions to desktop/schedule.h. Shunt the hlcache/llcache to using schedule to get their cleanups run.
svn path=/trunk/netsurf/; revision=12029
2011-03-13 18:26:46 +00:00
John Mark Bell 56413fd61c Lose nasty code
svn path=/trunk/netsurf/; revision=11984
2011-03-12 19:14:23 +00:00
John Mark Bell ceadbafcbc Clean up blank_import on exit
svn path=/trunk/netsurf/; revision=11818
2011-02-26 01:19:11 +00:00
Vincent Sanders fbb1139214 add default system colour handlers to each frontend
svn path=/trunk/netsurf/; revision=11530
2011-01-30 13:40:47 +00:00
Daniel Silverstone 3e7bf7cfb5 Ensure we correctly release all icon resources associated with trees, SSL certs, search providers, etc.
svn path=/trunk/netsurf/; revision=11421
2011-01-20 13:51:41 +00:00
John Mark Bell 43ce8206b7 Whee. Another runtime that doesn't support stdout = stderr.
We really should stop doing this.

svn path=/trunk/netsurf/; revision=11148
2010-12-29 21:25:47 +00:00
John Mark Bell c96f682d9d Fix bug #3138151: shut down caches before killing off fetch layer
svn path=/trunk/netsurf/; revision=11069
2010-12-16 00:03:57 +00:00
Michael Drake 5eaeaed909 Remove Hubbub and Wapcaplet initialisation and finalisation.
svn path=/trunk/netsurf/; revision=10980
2010-12-04 20:14:33 +00:00
Vincent Sanders bda534e12a Clean up how GTK frontend finds resources
svn path=/trunk/netsurf/; revision=10668
2010-07-28 15:22:44 +00:00
John Mark Bell 000e6ad3de It turns out that realloc(ptr, 0) --> free(ptr) is not actually required by the C standard (whereas realloc(NULL, size) --> malloc(size) is).
Therefore, explicitly model the behaviour expected by our libraries (that realloc of 0 size is equivalent to free).

svn path=/trunk/netsurf/; revision=10524
2010-04-30 07:00:58 +00:00
John Mark Bell 2276afb9f6 Log any remaining interned strings (there should be none)
svn path=/trunk/netsurf/; revision=10502
2010-04-27 22:14:52 +00:00
John Mark Bell 0de2013f25 Clean up caches on exit
svn path=/trunk/netsurf/; revision=10494
2010-04-27 06:48:09 +00:00
John Mark Bell ad8d0b3350 Handle llcache queries (GTK only for now)
svn path=/trunk/netsurf/; revision=10403
2010-04-14 23:03:49 +00:00
John Mark Bell 9e8849c04c Take the easy way out wrt loading messages files: leave it to the RISC OS frontend to do this.
svn path=/trunk/netsurf/; revision=10374
2010-04-11 22:40:41 +00:00
John Mark Bell 71de3618f1 Implement hlcache_poll(), which drives the low-level cache event loop, and attempts to clean the high-level cache.
Call this, instead of llcache_poll().

svn path=/trunk/netsurf/; revision=10371
2010-04-11 20:21:13 +00:00
Chris Young 103998165a Revert previous change
svn path=/trunk/netsurf/; revision=10215
2010-03-30 18:20:48 +00:00
Chris Young 9b9c26b569 Avoid crash if pargc is NULL. This might happen, for example, when launching NetSurf
from Workbench under AmigaOS :)

svn path=/trunk/netsurf/; revision=10214
2010-03-30 18:14:40 +00:00
Vincent Sanders e00fb7bd2d second pass at startup refactor removing the gui_init callback
svn path=/trunk/netsurf/; revision=10205
2010-03-29 20:03:44 +00:00
Vincent Sanders 7e67527267 first part of initialisation refactor move gui_init2 into frontends
svn path=/trunk/netsurf/; revision=10202
2010-03-29 16:59:30 +00:00
Daniel Silverstone cb7412181f Replace fetch_poll with llcache_poll throughout. Allow CONTENT_OTHER to complete properly.
svn path=/trunk/netsurf/; revision=10187
2010-03-28 16:00:54 +00:00
Daniel Silverstone 05a4eceae2 Remove fetchcache.[ch]
svn path=/trunk/netsurf/; revision=10183
2010-03-28 15:34:07 +00:00
Daniel Silverstone 270ef59a98 Merge jmb/new-cache; r=dsilvers,rs=vince
svn path=/trunk/netsurf/; revision=10180
2010-03-28 12:56:39 +00:00
Vincent Sanders 55162445db Add Windows frontend
svn path=/trunk/netsurf/; revision=9940
2010-01-31 00:36:02 +00:00
Vincent Sanders e01d93f344 Refactor main into the frontends
remove unused embedded global

svn path=/trunk/netsurf/; revision=9851
2010-01-20 20:32:30 +00:00
Rob Kendrick c72b3cf71a OpenBSD 4.4 compilation fixes. Does not deal with lack of -Wextra or -Wstrict-aliasing for lpu or hubbub.
svn path=/trunk/netsurf/; revision=6673
2009-03-02 19:26:11 +00:00
François Revel e4407cd7e9 Had to split main() into parts to have netsurf_init() called from one thread, and the loop in another to avoid a deadlock in replicants... hope nobody minds.
svn path=/trunk/netsurf/; revision=5586
2008-10-16 20:49:12 +00:00
François Revel 6330f8e475 Have netsurf_main() do the real work and main() call it. This allows ports to call it from elsewhere to embed NetSurf in another application.
The netsurf_embedded bool remembers it for later (like, we shouldn't probably save the hotlist and preferences in that case).

svn path=/trunk/netsurf/; revision=5579
2008-10-16 11:10:43 +00:00
John Mark Bell 6c49f1fcd5 r4153 was mostly right. It does help, however, if you actually force the locale to "C" in the first place. The issues listed in the commit log for r4153 still apply. This should fix the core's parsing of floats in locales that use something other than '.' as the decimal separator.
svn path=/trunk/netsurf/; revision=5568
2008-10-13 23:32:21 +00:00
Rob Kendrick e7c5e16b9b Performance improvements: rather than calling content_clean() every poll, we now call it no more frequently than once every 5 seconds. Additionally, we cache the result of talloc_total_size() in content_clean() rather than calculating it twice. On large documents, this function took 25% of CPU time. This makes the fetching/rendering/scrolling/redrawing of large documents over twice as fast.
svn path=/trunk/netsurf/; revision=4527
2008-07-07 14:05:29 +00:00
John Mark Bell 23fb72ea6b The core code has always assumed a locale of "C".
Do not change the locale globally, else things will break in weird and 
wonderful ways.

Introduce utils/locale.[ch], which provide locale-specific wrappers for various 
functions (currently just the <ctype.h> ones).

Fix up the few places I can see that actually require that the underlying 
locale is paid attention to.

Some notes:

  1) The GTK frontend code has not been touched. It is possible that reading of 
     numeric values (e.g. from the preferences dialogue) may break with this 
     change, particularly in locales that use something other than '.' as their
     decimal separator.
  2) The search code is left unchanged (i.e. assuming a locale of "C"). 
     This may break case insensitive matching of non-ASCII characters. 
     I doubt that ever actually worked, anyway. In future, it should use
     Unicode case conversion to achieve the same effect.
  3) The text input handling in the core makes use of isspace() to detect
     word boundaries. This is fine for western languages (even in the C locale,
     which it's currently assuming). It will, however, break for CJK et. al. 
     (this has always been the case, rather than being a new issue)
  4) text-transform uses locale-specific variants of to{lower,upper}. In future
     this should probably be performing Unicode case conversion. This is the
     only part of the core code that makes use of locale information.

In future, if you require locale-specific behaviour, do the following:

  setlocale(LC_<whatever>, "");
  <your operation(s) here>
  setlocale(LC_<whatever>, "C");

  The first setlocale will change the current locale to the native environment.
  The second setlocale will reset the current locale to "C".
  Any value other than "" or "C" is probably a bug, unless there's a really
  good reason for it.

In the long term, it is expected that all locale-dependent code will reside in 
platform frontends -- the core being wholly locale agnostic (though assuming 
"C" for things like decimal separators).


svn path=/trunk/netsurf/; revision=4153
2008-05-13 14:37:44 +00:00
John Mark Bell 74a1095cd6 Remove unnecessary includes
svn path=/trunk/netsurf/; revision=4144
2008-05-11 10:09:44 +00:00
John Mark Bell ae3555ccdd Fixes for targetting NetBSD (Thanks to Adam Hoka)
svn path=/trunk/netsurf/; revision=3775
2008-01-26 16:44:17 +00:00
John Mark Bell 6eeeee1778 Ignore SIGPIPE on all platforms, not just RISC OS.
svn path=/trunk/netsurf/; revision=3638
2007-10-31 15:39:55 +00:00
Vincent Sanders 2f864eeecc Update all source code file headers to reflect GPL version 2 only and contain appropriate licence text
svn path=/trunk/netsurf/; revision=3486
2007-08-08 16:16:03 +00:00
Rob Kendrick 43257a160b Changes to allow building on Solaris.
* Tested on Solaris Express: Developer Edition,
          which is between Solaris 10 and 11.
        * Used gcc, libmng etc packages using pkg-get and blastwave's resources.
        * Had to build lemon and re2c manually.

svn path=/trunk/netsurf/; revision=3350
2007-06-15 22:07:11 +00:00
Daniel Silverstone 6807b4208a Remove the netsurf/ from the include paths and rationalise use of <> vs "" in includes
NetSurf includes are now done with ""s and other system includes with <>s as C intended.
The scandeps tool has been updated to only look for ""ed includes, and to verify that the
files exist in the tree before adding them to the dependency lines. The depend rule has
therefore been augmented to make sure the autogenerated files are built before it is run.

This is untested under self-hosted RISC OS builds. All else tested and works.


svn path=/trunk/netsurf/; revision=3307
2007-05-30 22:39:54 +00:00
Daniel Silverstone 25e22eb1f5 Add a -v option to enable debug logging. Pass -v by default to the RO runimage.
svn path=/trunk/netsurf/; revision=3306
2007-05-30 22:27:58 +00:00
James Bursa 73281a7add Log libxml2 version in lib_init().
svn path=/trunk/netsurf/; revision=3268
2007-05-06 06:11:00 +00:00
John Mark Bell 9e96993474 Revert r3156 (content cleaner frequency reduction) as it introduces
potential stability issues.

svn path=/trunk/netsurf/; revision=3160
2007-01-31 00:02:38 +00:00
John Mark Bell f3e6ad3e90 Attempt to perform content cleaning far less frequently.
svn path=/trunk/netsurf/; revision=3156
2007-01-30 00:44:53 +00:00