The 3.9 Release
I am pleased to announce the latest release of NetSurf is now available. NetSurf 3.9 features support for CSS Media Queries (level 4) and improvements to JavaScript handling. Also included are many bug fixes and improvements. We recommend all users upgrade to NetSurf 3.9. -- Regards Vincent http://www.kyllikki.org/
Re: 3.9 Release
> I had intended to release before now but testing kept revealing > issues, however I now believe that we are ready for a 3.9 release > candidate on Sunday June 16th with the actual release on Saturday June > 22nd unless critical bugs are discovered. > Well it seems a lot of bugs decided to make themselves known right at the last moment and despite some hard work from John-Mark, Daniel, Michael and myself we have simply not managed to get the browser as stable as I wanted for a release. I will try again to release sometime this week but again I ask for some *feedback* . I have had literally two replies (one should have been a bug report but at least it was activity) and I hope there are more than two people other than the developers using the CI builds! -- Regards Vincent
Re: 3.9 Release
On Sat, Jun 22, 2019 at 05:36:39PM +0100, Richard Torrens (lists) wrote: > In article <20190615175934.gh14...@kyllikki.org>, >Vincent Sanders wrote: > > A lot of features and bug fixes have happened since the 3.8 release so > > I am considering producing a 3.9 soon. > > A (hopefully small) point: for some time now Netsurf seems to be picking > up only the first css link. Please could you create an issue on the tracker with some actual details? or this simply will never be looked at Futher if you are refering to http://www.torrens.org/ (btw please consider https, https://letsencrypt.org/ is a brilliant idea) you have two stylesheet links in the head element http://css.torrens.org/main; type="text/css"> http://css.torrens.org/navbar.css; type="text/css"> the first is garbage relative link and all browsers i tried it with treat it as such and ignore it. > > On all my www pages I have two css links - the second one defines the > header and is ignored. on other pages (i picked cats for an example) the link elements are: http://css.torrens.org/styles1.css; type="text/css"> http://css.torrens.org/navbar.css; type="text/css"> and the styles from both are used in NetSurf causing the header bar contact, home and search backgrounds to be coloured (for example) > > But great work what has been done. Thanks for that. > > -- > Richard Torrens. > http://www.Torrens.org for genealogy, natural history, wild food, walks, cats > and more! > > -- Regards Vincent http://www.kyllikki.org/
Re: 3.9 Release
Last call for fixes to go into 3.9 Please can anyone interested at least try the development build on their frontend. -- Regards Vincent
The 3.8 Release
Michael Drake and Chris Young appear to have fixed the blocking bugs around http authentication. The re-build of the Haiku CI worker has been successful and produced working packages (for 32bit haiku). If everyone can test CI builds #4425 or later that would be great. I plan to tag the 3.8 release in git during this evening and have release builds ready for tomorrow. Now is the time to yell if there is a glaring problem! -- Regards Vincent http://www.kyllikki.org/
Re: NetSurf 3.8 release
On Mon, Jul 30, 2018 at 11:32:03AM +0100, Vincent Sanders wrote: > I intend to make the 3.8 release on Friday the 3rd of August 2018 Unfortunately we have a couple of release critical bugs [1] which made this release unwise. I am looking at these bugs but currently cannot give a definite resolution time frame. Once resolved the release will proceed. [1] https://bugs.netsurf-browser.org/mantis/view.php?id=2607 > > If any developers have pending bugfix or features they intend to merge > for the 3.8 release and need additional time please let me know as > soon as possible. > > This release will primarily be to incorporate all the bug fixes from > the developer weekends and does not contain any major feature updates. > > -- > Regards Vincent > http://www.kyllikki.org/ > > -- Regards Vincent http://www.kyllikki.org/
NetSurf 3.8 release
I intend to make the 3.8 release on Friday the 3rd of August 2018 If any developers have pending bugfix or features they intend to merge for the 3.8 release and need additional time please let me know as soon as possible. This release will primarily be to incorporate all the bug fixes from the developer weekends and does not contain any major feature updates. -- Regards Vincent http://www.kyllikki.org/
NetSurf web sites
All the NetSurf web services [1] are now securely accessible. This has been made possible by the lets encrypt service [2] providing no cost certificates and pepperfish proving the infrastructure to manage them. We are making this change to ensure our users privacy is protected. The NetSurf project collects no personally identifying data about users of our web services except that required to provide the service [3] and we do not believe third parties should be able to intercept such information either. Daniel Silverstone and myself have now updated all the NetSurf infrastructure to make https available. It is intended that after a short stabilisation period that web server and wiki will have HSTS [4] enabled. Once this occurs only encrypted connections will be available to NetSurf services. Please ensure there are no issues with the secure sites (let us know if there are!) and update any links you may have in external documents. [1] https://www.netsurf-browser.org/ https://wiki.netsurf-browser.org/ https://bugs.netsurf-browser.org/ https://ci.netsurf-browser.org/ [2] https://letsencrypt.org/ [3] The bugs interface requires a user identifier and email address which are required to use the service and we do not use that data for any other purpose than tracking bugs. [4] https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security -- Regards Vincent http://www.kyllikki.org/
Re: OpenSSL
On Tue, Dec 12, 2017 at 12:29:08PM +0100, Thorsten Otto wrote: > On Dienstag, 12. Dezember 2017 10:45:10 CET Vincent Sanders wrote: > > I have failed to update the atari toolchains once again. They remain > > badly broken in that they: > > > > 1. cannot generate a working cross compiler on a modern Debian OS > > 2. compiled on an old OS they produce a broken SDK with OpenSSL 1.1 > > 3. Are very old compilers which generate poor code, especialy for m68k > > Both linux versions on my homepage (4.6.4 and 7.2) were compiled on a recent > SuSE distribution, so in general there should be not much problem doing the > same on recent Debian system. The scripts use a different directory layout > though than the one that your toolchains expect. > > If i understand it right, your CI system uses a pre-compiled toolchain, so > this has to be done only once? Our CI system builds the toolchains from source to ensure complete reproducability for our releases. > > Are the scripts that you use for automatic building are downloadable > somewhere? I could not find them. > The toolchain reposity http://source.netsurf-browser.org/toolchains.git/ contains the makefiles which construct a correctly patched set of sources to generate a cross compiler and then build it. In addition the libraries and tools necessary to cross compile the browser are contained in a common SDK in the toolchains repo. it should be as simple as: git clone git://git.netsurf-browser.org/toolchains.git cd toolchains mkdir -p /opt/netsurf make -C m68k-atari-mint > >any assistance would be gratefully recieved. > > Feel free to ask any questions. I can also try to compile the toolchain on a > debian jessie system running under VirtualBox. if it works on SuSE that should just work elsewhere. I have a branch vince/atari-gcc7 which is my current work in progress, this gets a compiler built but crashes and burns at the mintlib stage Once the cross environment is completely working the SDK build can be attempted with: GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/m68k-atari-mint/cross/bin GCCSDK_INSTALL_ENV=/opt/netsurf/m68k-atari-mint/env make -C sdk -- Regards Vincent http://www.kyllikki.org/
OpenSSL
I have recently completed updating all the toolchains/SDK [1] to use OpenSSL 1.1 instead of 1.0. This is prudent because OpenSSL 1.0 is reaching the end of its life [2] and it is advisable to use an actively supported version of a such a sensitive library in a web browser. There may be some issues with the new library build on some platforms. To date the only one which has been reported as problematic is the m68k Amiga os3 build which Chris Young is aware of and looking to resolve. To assist in this I have extended the CI system to build Amiga os3 packages and publish the results [3] I have no way to test these packages so their usefulnes may be limited but they do now exist, perhaps Chris can comment on their status. I have failed to update the atari toolchains once again. They remain badly broken in that they: 1. cannot generate a working cross compiler on a modern Debian OS 2. compiled on an old OS they produce a broken SDK with OpenSSL 1.1 3. Are very old compilers which generate poor code, especialy for m68k I have been trying to use the patches provided by Thorsten Otto [4] to fix these toolchains but any assistance would be gratefully recieved. [1] http://source.netsurf-browser.org/toolchains.git/ [2] https://www.openssl.org/policies/releasestrat.html [3] http://ci.netsurf-browser.org/builds/amigaos3/ [4] http://tho-otto.de/crossmint.php -- Regards Vincent http://www.kyllikki.org/
Bug tracker
The NetSurf bug tracker [1] is a Mantis [2] install hosted on a NetSurf administered system. Recently several critical issues have been found in Mantis that required an immediate upgrade. Unfortunately this required updating the version in use from 1.2.19 to 1.3.10 as support for the previous series has been discontinued. This further required upgrading the hosting operating system, database, web server and PHP edition. The upgrade appears to have been successful and no data loss has been detected. If you use the bug tracker it would be helpful if you can check your issues and ensure nothing has been lost. The New Mantis version should also improve the look and feel of the bug tracker without adversely affecting performance. [1] http://bugs.debian.org/mantis/ [2] https://www.mantisbt.org/ -- Regards Vincent http://www.kyllikki.org/
Test Coverage
I have been attempting to improve the level of test coverage [1] within NetsSurf recently. This work is mainly geared towards having sufficient tests to implement cookie handling with some confidence of correctness. The current [2] cookie standards are very different to what we have now and need this refactor to allow their use in the modern web with javascript etc. The test coverage is now minimally adequate at 88% of lines and 64% of conditionals for code that is tested. However the amount of the codebase tested outside of the utilities and url database is effectively zero. It would be a great area for a new contributor (or old ;-) to start with the codebase and add some tests while improving their familiarity with the NetsSurf codebase. Tests are implemented as a series of simple programs using the c check library. The existing tests should provide enough of a template but feel free to ask questions here. [1] http://ci.NetsSurf-browser.org/jenkins/view/Categorized/job/coverage-netssurf/ [2] https://tools.ietf.org/html/rfc6265 -- Regards Vincent
Frontend maintainership
At the recent NetSurf developer weekend[1] we discussed many topics one of which was our regular review of the frontends. Except for Amiga and GTK none of the frontends have a active maintainer. The cocoa and atari frontends are however causing a great deal of concern. cocoa - Unless a maintainer can be found (or at least someone willing to fix it) before 11th Febuarary 2017 the CI for this target will be disabled. The code will be removed during the next developer weekend on the 10th June. This decision has been made because the effort to keep this frontend building is large and we have many reports that the resulting binary simply crashes when started. atari - The atari frontend is built for m68k and coldfire variants using a variant of the netsurf cross compliation toolchain/sdk. No serious updates have been made to this toolchain in some time and it has become a burden. Unless this is addressed before the next developer weekend the frontend will be disabled in the CI and subsequently code removed. riscos - Still lacks a full time maintainer but due to its userbase the team keeps it working. Gets a reprieve again and will be reconsidered next time. windows - Lacks a full maintainer but has been fixed up to be at least useful. A maintainer for this frontend would be welcome. amiga - Chris Young continues to provide excellent maintainership no problems noted. monkey - test frontend is useful and we envisage expanding the scope of its usage. beos - The Beos port is generally only tested on Haiku at this point. The frontend is kept useful by mmu man and pulkomandy. Main issues revolve around the CI slave and its crashy java port. gtk - Vince looks after this and despite gtk+ changing API a lot it remains useful. framebuffer - generally good shape but the Linux framebuffer and input need attention. It has been agreed we will look into using libinput to improve this area. [1] http://wiki.netsurf-browser.org/developer-weekend/feb-2017/ -- Regards Vincent http://www.kyllikki.org/
NetSurf 3.6 Release
It is that time again and a new release would seem to be due. As usual the wiki page [1] is being used to co-ordinate the release. If anyone has any known outstanding issues they want to solve before the release *now* is the time to update the wiki or let me know on the mailing list. This release has several areas of improvement: - core code reorganisation enabling future work - greatly extended core component test coverage - stability improvements gained from fuzzing with AFL [2] - frontend updates (amiga and GTK) - much improved supercookie protection [3] - many lots of bug fixes The release will be made at the weekend unless any showstoppers are identified. [1] http://wiki.netsurf-browser.org/NetSurf_3.6 [2] http://vincentsanders.blogspot.co.uk/2016/08/down-rabbit-hole.html [3] http://vincentsanders.blogspot.co.uk/2016/09/if-i-see-ending-i-can-work-backward.html -- Regards Vincent http://www.kyllikki.org/
NetSurf 3.5 release
So the 3.4 release was a bit of a lemon and due to lack of testing appears to have been non functional on most supported platforms Because of this I will be aiming for a 3.5 release on 12th March 2016. Please can all front end maintainers ensure they are confident with the state of their implementations before this date. The toolchains have been updated for this release to include the recent openssl critical fixes, however this has resulted in the amiga frontendusing a new toolchain for this release Can the amiga maintainers please ensure this toolchain change was what they wanted and let us know if we need to back it out as soon as possible. One final plea. Making a release is a lot of work and generally devolves to me, there is a wiki page for the release [1] can other mainatiners add anything they are aware of and help get it fixed so this release is not another complete stuff up and I can actually announce this one! [1] http://wiki.netsurf-browser.org/NetSurf_3.5 -- Regards Vincent http://www.kyllikki.org/
Re: CI and bugs web services
We have been informed that the bugs and CI service will be restarted once again Sunday 22nd of November to address some hardware problems discovered after the previous data centre issues. Unfortunately there is little NetSurf can do to mitigate these issues at this time without spending a great deal more money each year on generally unused redundant services which would not be the wisest way to use the donations our users give. I hope this will be the last disruption for a while and once complete I will be seeking a full explanation to relay to you all. -- Regards Vincent http://www.kyllikki.org/
CI and bugs web services
These services are dependant on systems hosted for us (at great discount) by Mythic Beasts[1] for which we are grateful for their continuing support. However they have notified us that the ongoing issues with their datacentre supplier[2], outside of their control[3], are likely to result in these systems being restarted and possibly becoming unavailable during the weekend. Please can you bear with us while these issues are resolved. Note that services hosted by Pepperfish (source and mailing lists) and Collabora (CI and bugs backend services) remain unaffected. [1] https://www.mythic-beasts.com/ [2] http://status.mythic-beasts.com/ [3] http://www.theregister.co.uk/2015/11/18/telecity_outage_fix_failed/ -- Regards Vincent http://www.kyllikki.org/
Re: Patch to make Javascript writeln() work (attempt 3)
On Thu, Sep 24, 2015 at 09:36:41PM +0100, Dave Higton wrote: > This patch to Document/bnd makes the Javascript writeln() function > work as well as write(). This version inserts "\n", which seems > to be what the language requires. was wrong. applied -- Regards Vincent http://www.kyllikki.org/
Re: toolchains: branch master updated. a47ec59181b5d5f7588f75517cb5c2b95ff22e08
On Tue, Sep 01, 2015 at 12:34:31AM +0100, Chris Young wrote: > On Mon, 31 Aug 2015 23:16:49 +0100, Commit Mailer wibbled on for an age: > > > commitdiff > > http://git.netsurf-browser.org/toolchains.git/commit/?id=a71589395ea15a9652d0a8785af5f6d18d9b79a8 > > commit a71589395ea15a9652d0a8785af5f6d18d9b79a8 > > Author: Chris Young> > Commit: Chris Young > > > > Update to SDK 53.29 > > Please can somebody kick off a rebuild of the ppc-amigaos toolchain - > NetSurf will be needing the new SDK at some point soon. > I caused this to occour this morning followed by a rebuild, netsurf is now failing to build. > Thanks > Chris > > -- Regards Vincent http://www.kyllikki.org/
Revenge of the disc cache
The disc cache has proved problematic on some operating systems where disc operations are slow. After a great deal of testing and benchmarking it has been determined the principle slowdown on many of these platforms comes from the system overheads creating the forest of directories and small files that hold the cached data. This overhead when coupled with the very slow synchronous write out of some operating systems (like RISC OS) causes the slow writer message and cache disablement to occur. In an attempt to address this I have recently reworked the handling of small files within the cache. There are now a small number of relatively large files into which all small objects are placed. This has resulted in the majority of objects (70%) being held in these blocks rather than in separate files on disk. The resulting cache directories have a correspondingly smaller number of files and directories within them and should (I hope) exhibit greatly superior performance. Of course all this is theoretical and it may not help at all, my previous attempts at improving this situation have not been very successful! There is one drawback, the new scheme has changed the cache layout in an incompatible way. While this will not be an issue at run time and the cache will reinitialise itself at first start of CI builds after #2688 it will leave the entire contents of any old cache behind and never expire data from it. Therefore I advise the removal of the contents of the NetSurf cache before running any of these CI builds. -- Regards Vincent http://www.kyllikki.org/
Re: KEY_* to NETSURF_KEY_* change
On Tue, Mar 24, 2015 at 08:25:56PM +0100, Witold Filipczyk wrote: Here is with the NS_ prefix. Applied, thanks for that. -- Regards Vincent http://www.kyllikki.org/
Re: [RFC] Bug 2182--revised patch
On Sun, Mar 15, 2015 at 05:38:54PM +, David Gee wrote: Attached is a revised patch for bug 2182. This time with more detailed comments. Hope this is suitable and in the correct format. Pretty close. I just had to tweak your first line to be the summary text As i heard nothing from anyone else saying nooo I commited it, assigned you the bug and resolved it. -- David Gee Gateshead -- Regards Vincent http://www.kyllikki.org/
Re: Bug 2182 (revised patch--please ignore previous email)
On Sat, Mar 14, 2015 at 09:12:40PM +, David Gee wrote: Hi, The patch attached to my previous email contained an error. Somehow I'd inadvertently removed the 'x' from an xwimp call which I didn't intend to change. The general (hand wave) way to mark such please give feedback patches is to have [RFC] at the beginning of the subject, that way they are easy to identify and you attract review comments without any danger of the patch actually being applied. It is also generally good etiquette to add [PATCH] if it is a patch you actually want committed and [PULL] for git pull requests. For some good hints on patch submission the Linux kernel SubmittingPatches [1] document is a reasonable start. Though you can skip all the sign off stuff, I mention it purely as a reasonable guide (and in fact now I think about it I shall write one for NetSurf proper) Until the developers get used to you submitting patches (and eventually grant you commit access) we are going to be a bit wary of applying these changes without at least a couple of other people chiming in with yeah that looks OK and or that works for me given this is for RISC OS if Steve F says yes I will immediately apply it, otherwise I am looking for confidence it fixes an issue without introducing more. Do you have a bug tracker login? [2] if so please let me know what it is so i can elevate it to developer level. You will then be able to get bugs assigned to you which should stop conflicts and show other developers you are working on a bug. I've used git to revert the changes and then (once again) removed the xwimp_create_menu(WIMP_CLOSE_MENU,0,0) call from ro_gui_send_datasave--the change I originally intended to make. So the patch attached here should be sufficient on its own. Thanks to Jeremy Nicoll for pointing this out. -- David Gee Gateshead From 43889fdbc04b88b208ac676186d0773d3ffa4715 Mon Sep 17 00:00:00 2001 From: David Gee dr_d_...@blueyonder.co.uk Date: Sat, 14 Mar 2015 20:28:49 + Subject: [PATCH] Change to save.c so menu tree is not needlessly collapsed on send_datasave. your subject could do with a bit of work. I hope you do not mind the feedback it is supposed to be positive and make applying your changes easier for us. You do not need to mention the source files changed, that comes from the patch itself and we know it changes something ;-) This can take a while to get used to but perhaps something like: Subject: [PATCH] Stop RISC OS menu tree being closed on a datasave message. and then a newline and then a brief paragraph explaining the logic behind the change. See some of my commits like [3] Sometimes the short summary is enough for simple changes but it is good practice to get into the habit of doing it right when you are starting. --- riscos/save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riscos/save.c b/riscos/save.c index b5d96c4..c4fd839 100644 --- a/riscos/save.c +++ b/riscos/save.c @@ -723,7 +723,7 @@ void ro_gui_send_datasave(gui_save_type save_type, { /* Close the save window because otherwise we need two contexts */ - xwimp_create_menu(wimp_CLOSE_MENU, 0, 0); + ro_gui_dialog_close(dialog_saveas); if (ro_message_send_message(wimp_USER_MESSAGE_RECORDED, (wimp_message*)message, -- 1.9.1 [1] https://www.kernel.org/doc/Documentation/SubmittingPatches [2] http://bugs.netsurf-browser.org/mantis/ [2] http://git.netsurf-browser.org/netsurf.git/commit/?id=c4e551cd0cecf4ec9aba2d033cba3ca97e669463 -- Regards Vincent http://www.kyllikki.org/
Re: netsurf: branch release/3.3 created. release/3.2-758-g3c228f1
On Tue, Mar 10, 2015 at 02:22:11PM +, Chris Young wrote: Vince On 10 March 2015 13:54:12 GMT+00:00, NetSurf Browser Project no-re...@netsurf-browser.org wrote: +const char * const netsurf_version = 3.3 (10th MArch 2015); You have a typo here. Thanks chris, sigh Chris -- Regards Vincent http://www.kyllikki.org/
3.3 release, last call for fixes
Any developers with important fixes please commit them. If you have a reason to call a hold on the release please also yell RSN. Bug tracker has 2270 and 2228 tagged for this release, I intend to push these tags to 3.4 instead -- Regards Vincent http://www.kyllikki.org/ signature.asc Description: Digital signature
Re: Mantis signup not working
On Thu, Jan 22, 2015 at 11:43:27PM +, Chris Young wrote: It has been reported to me (and I've confirmed here) that signing up for an account on the bugtracker results in the following error: | APPLICATION ERROR #2701 | | Session variable captcha_key not found. I've tried NetSurf and Firefox with the same result. Chris Thanks Chris, this was due to https://www.mantisbt.org/bugs/view.php?id=17993 I applied the fix on our mantis and created an account. I think that is back to working now? -- Regards Vincent http://www.kyllikki.org/
Re: m68k amigaos toolchain
On Sat, Dec 20, 2014 at 09:47:14PM +, Chris Young wrote: On 20 Dec 2014 20:52:25 +, Chris Young wrote: Furthermore, there's something broken in the compiler as everything it builds causes a system freeze on exit. I suspect this is down to the version of gcc being used. Everybody seems to be stuck on 2.95 still, and the only other version I've seen in use for m68k-amigaos is 3.4 (along with notes saying it doesn't generate as good 68k code compared to 2.95) as we discovered with beos, gcc 2.95 support is a bit hit and miss. Though I beleive the main issue there was g++, even so I fear 2.95 is too primative and is almost 14 years old at this point. There are loads of patches here: https://github.com/cahirwpz/m68k-amigaos-toolchain There are an excessive number and I have no idea which are relevant. That is terrifying, I really do think that if they want continuing compiler support they need to look at a modern gcc version or a clang port. Alas wishing does not make it so, being pragmatic, if there is a cannonical cross toolchain for the target I might be persuaded to put it on the CI as long as we can package it under /opt/netsurf correctly so builds are repeatbale. I dislike this a lot but if it is the only way... I've pushed the patches to make libcurl build as a pure clib2 library, so the SDK at least completes. Excellent, thanks for that. I pushed the rebuild on the CI so we should be able to get a build through in an hour or so. I also enabled the target for most of the libraries, as expected the netsurf build itself does not yet work but when you are ready let me know whats needed and I will turn it on. Chris -- Regards Vincent http://www.kyllikki.org/
m68k amigaos toolchain
I have attempted to get the m68k-unknown-amigaos toolchain up so i can get the CI system building for the target[1]. I managed to get the main toolchain building once I fixed the already known issues with gmp and autoconf versioning (applied the same fixes we already had for the ppc-amigaos toolchain) I have unfortunately failed to make the SDK build. libcurl is failing because of a missing include. This can be seen in the CI systems build log [2] If someone knows the answer to this please can they apply it to the toolchains repo and let me know. Once this is working I will sort out adding this target to the libs and netsurf. [1] http://ci.netsurf-browser.org/jenkins/computer/cislave9/ [2] http://ci.netsurf-browser.org/jenkins/job/toolchain-m68k-unknown-amigaos/6/console -- Regards Vincent http://www.kyllikki.org/
Re: netsurf: branch master updated. release/3.2-500-gd08acbc
snip other discussion which i have not addressed The disk cache throughput should be measured against network throughput, not against some arbitrary ideal. I'd argue that it shouldn't be disabling itself based on one bad result either, which is what is happening here. Eventually I will add the network fetch bandwidth measurement, however as has been discovered it was hard enough to manage this in the backing store code so I have not done this yet. However I have changed the disabling test to be scheduled 100 time quanta in the future when a single write goes slow and then check against the overall write bandwidth so the low bandwidth writes must occur over a substantial time period before we disable the cache now instead of just a single event. Hope that addresses the lumpy nature of writeouts causing spurious backing store disables. -- Regards Vincent http://www.kyllikki.org/
Re: netsurf: branch master updated. release/3.2-500-gd08acbc
On Sun, Nov 30, 2014 at 01:40:47PM +, Chris Young wrote: On Sat, 29 Nov 2014 23:57:22 +, Commit Mailer wibbled on for an age: correctly calculate writeout bandwidth and properly impose limits Is this really right? (22.696681) content/llcache.c llcache_persist 2414: Wrote 884 bytes in 225ms bw:3928 http://aminet.net/pics/at.gif (22.696759) content/llcache.c llcache_persist 2420: Overran timeslot (22.696828) content/llcache.c llcache_persist 2426: Cannot write minimum bandwidth (22.697699) amiga/misc.c ami_misc_req 51: Disc cache write bandwidth is too slow to be useful, disabling cache well under 4000 bytes a second is so slow that it is not useful. The disc caching really needs to be several multiples of the network conenction speed to be useful. Although the minimum bandwidth setting is a passe din parameter and you can chnage the default value in desktop/netsurf.c to experiment. (22.497406) content/llcache.c llcache_persist 2414: Wrote 1480 bytes in 114ms bw:12982 http://news.bbcimg.co.uk/view/1_4_38/cream/hi/news/img/services.gif (22.497485) content/llcache.c llcache_persist 2420: Overran timeslot (22.497549) content/llcache.c llcache_persist 2426: Cannot write minimum bandwidth (22.497751) amiga/misc.c ami_misc_req 51: Disc cache write bandwidth is too slow to be useful, disabling cache (16.366240) content/llcache.c llcache_persist 2414: Wrote 3931 bytes in 263ms bw:14946 http://i2.cdnds.net/13/47/hearst.png (16.366319) content/llcache.c llcache_persist 2420: Overran timeslot (16.366384) content/llcache.c llcache_persist 2426: Cannot write minimum bandwidth (16.366585) amiga/misc.c ami_misc_req 51: Disc cache write bandwidth is too slow to be useful, disabling cache Even if I spawn it off to another process (so store returns immediately) I still get the not enough bandwidth message. Is it possible that your implementation of a milisecond monotonic counter in libnsutils is problematic? If it is returning microseconds instead of miliseconds that would cause this erroneus behaviour. Chris -- Regards Vincent http://www.kyllikki.org/
Library change
I have just split the utf8proc library out from the NetSurf utils directory into a core conveniance library (libutf8proc). The only impact this will have for most of us is that the env.sh script should be updated to the latest one and ns-clone; ns-pull-install run before trying to build netsurf itself. The new libutf8proc library [1] is a simple checkin of the 1.1.6 public software group library converted to use the core library build system. There is one additional change added which exposes the normalise capability of the library. In future this should allow us to update this library to new upstream releases with a clear separation from the main NetSurf codebase. [1] http://git.netsurf-browser.org/libutf8proc.git/ -- Regards Vincent http://www.kyllikki.org/ signature.asc Description: Digital signature
3.2 Release
We have made some significant cleanups and feature improvements to the master branch since the 3.1 release including a significant number of fixes for crash causing problems. As there are currently no large feature merges outstanding and Daniel and myself triaged and fixed numerous bugs recently this seems like a suitable time to create a 3.2 release. As this is principally a bug fix release and the only user visible change is the persistent object cache I see no reason for an extended test period. I will be making the release by the end of the month, probably Saturday 23rd. The 3.2 roadmap on the issue tracker [1] only shows two issues tagged for this release one of which I intend to address immediately, the other may get ignored if nobody addresses it. I would like to raise the issue that the RISC OS frontend has received minimal bug fixing this release cycle as Steve Fryatt has been unable to dedicate much time recently. There are over twenty RISC OS specific issues outstanding and I would be delighted if someone could provide fixes for any of these. [1] http://bugs.netsurf-browser.org/mantis/roadmap_page.php -- Regards Vincent http://www.kyllikki.org/
Bugs everywhere!
It has come to my attention that our bug tracker is working well, alas this also reveals we are, on average, gaining a new bug every day right now. Can I make a plea to other developers to try and address some bugs in the forthcoming weeks? I was looking to make a 3.2 release soon to include all the recent improvements but we are not in plausible release state. -- Regards Vincent http://www.kyllikki.org/
Re: netsurf: branch master updated. release/3.1-312-geccfdec
On Thu, Jul 03, 2014 at 11:49:22PM +0100, Chris Young wrote: On Thu, 03 Jul 2014 22:05:23 +0100, Michael Drake wrote: Wait for network activity instead of polling. I'd be interested to know if that made any noticeable difference to page load times. e.g. for BBC News homepage. None whatsoever. I would not have expected it to impact load times significantly unless you were pulling web pages from a very fast local web server. Polling every 10ms is probably capable of dealing with all the data a home internet link is capable of delivering The fdset function will mainly improve responsiveness as NetSurf does not need to poll the fetchers unecessarily. On slow connections instead of polling the fetchers 100 times a second for data that simply has not arrived yet it will instead only use processor when data is available to process. I even did a quick test with three pages: | CI#1995 | CI#1996 news.bbc.co.uk | 6.1s | 6.0s www.bbc.co.uk| 3.5s | 3.4s en.wikipedia.org | 4.8s | 5.1s Entirely non-scientific, but it doesn't seem any faster. They are both significantly quicker than the values in the screenshots on the NetSurf site though. :) we should update those then ;-) fyi GTK port on my laptop (at work with 200Mbit) connection completes news.bbc.co.uk in 0.8s using fdset, and 1.9s using polled (no cache) I'm hoping it is stopping NetSurf taking processor time away from other tasks. Thats exactly what it will be doing, if there is any to spare ;-) Chris -- Regards Vincent http://www.kyllikki.org/
Re: Object fetchers moved to scheduled operation
Seems to work on Haiku. good to hear Btw, straight from select(2) manpage: nfds is the highest-numbered file descriptor in any of the three sets, plus 1. So the @todo is solved :D I fear one of us is misunderstanding. The fetcher_fdset() api will return an fd set and the number of the highest used fd in that set for example if the returned set has 4,5,7,8,9 in it the max_fd variable will be 9. if your sEventPipe[0] is (as an example) fd 6 then the select in this case wants to see an fdset with 4,5,6,7,8,9 in it and nfds as 10 (i.e. 9 + 1) Surely that means the todo was asking if the max_fd needed 1 adding to it inside the MAX statement? a sit stands in my example nfds will be passed to select as 9 not 10? and actually it would better read as: max_fd = MAX(max_fd, sEventPipe[0]) + 1; though that would mean we are reusing max_fd instead of having a separate nfds which is a bit dirty but understandable. Perhaps I have misunderstood though. this is why it was left as a todo for the maintainer, though even if it is wrong at worst the browser waits a second for the polling to resume so its not a big deal. -- Regards Vincent http://www.kyllikki.org/
Re: Object fetchers moved to scheduled operation
On Wed, Jul 02, 2014 at 05:36:09PM +0100, Chris Young wrote: I'm missing a load of emails so I've had to manually copy this from the archive to reply to it, so apologies for thread breakage. no worries, just FYI i received a bounce from your email earlier when I posted the reply. Vincent Sanders wrote: As an *extension* fetcher_fdset() exists. This allows a frontend to obtain a set of file descriptors the fetchers are using. The frontend may then wait for activity on those file descriptors in addition to events from the windowing system. Thus only servicing the fetchers when there is activity. OK, that sounds useful. I should be able to use that. Cool, if you need any more help just let me know. The fetch servicing occurs specifically when fetcher_fdset() is called. In addition the polling is rescheduled to a long time in the future (currently a second) rather than cancelled altogether. Just as an aside, I notice this does a schedule for 1s every time it is called. Should the schedule code be ignoring/rescheduling/deleting events that are the same? As if this is scheduling a lot of events for 1s in the future, after a second all those events are going to fire, which is nearly as bad as polling? Or is there a deletion of the pending event happening somewhere that I've overlooked? I think I properly documented these API as part of the great operation table rework. Ah yes desktop/gui.h:453 has the API docs, the relevant bit is: * Additional calls with the same callback and user parameter will * reset the callback time to the newly specified value. I should be able to check the reformat one tonight, would have done so yesterday but my Internet was playing up and (possibly unrelated) this email account wasn't receiving messages - so I didn't see it until this morning. Thats fine, that one I am a bit suspect of, hence the not merging yet. Seems to be working fine, although I'm not entirely sure what triggers a reformat event (other than me manually resizing the window, which might not go the same route), so maybe something is broken and I just don't know it yet! scale changes are the main reason, although gtk uses it when the debug rendering is turned on too. If noone else has any objections I will merge this tonight then. -- Regards Vincent http://www.kyllikki.org/
Moving reformat to scheduled operation
The final remaining operation performed within the frontends dispatch loop is that of pending reformats. The reformat call differs from the redraw in that it is used when a browser windows scale or extents changes. The current operation is to set the browser_reformat_pending global to signal one or more browser_windows required updating and then each browser window has its own flag which must be checked. This was ineficient as the frontends had to check every browser window even if only one required reformatting and broke our data hiding model for browser_window meaning we had to expose browser_window internals all over the codebase. I have a branch vince/reformatpending which changes this to being a scheduled callback and reduces the frontend involvment to providing a single callback entry in the window operation table. This has revealed some dreadful code in many areas including several frontends that never do anything with the flag at all! Because of this this change is much more invasive and alters behaviour in frontends I could not test. I would appreciate frontend maintainers (I have tested/fixed gtk/framebuffer/monkey and riscos) trying this branch and giving feedback before I commit it. Especialy Chris Young on amiga where my changes are untested and I fear I may have broken the frontend altogether (sorry Chris) Hopefully this is the end of the road with these type of changes, my next is to remove the poll entry and let frontends run the main loop themselves. -- Regards Vincent http://www.kyllikki.org/
Re: Persistant disc cache
On Sun, Jun 08, 2014 at 05:45:17PM +0100, Steve Fryatt wrote: On 5 Jun, Vincent Sanders wrote in message 20140605150105.gl27...@kyllikki.org: The amount of disc used for this cache is selected using the disc_cache_size option in the choices file. The RISC OS frontend does not currently have a user interface to set this value. It does now (or it will soon; I've just spotted disc_cache_age, which probably needs a field as well). :-) Indeed, although disc_cache_age is not implemented right now, there is provision within the new system to allow for it. It will mean objects that have not been used older than this value will be discarded preventing the disc cache from filling with old files no longer used. This is in addition to them being discarded when the cache size limit is exceeded. The cache value is number of bytes to use on disc and a value of 0 will disable the cache completely. The default value is set to a gigabyte. Apologies if I'm missing something, but does disc_cache_size really want to be a signed int? It goes negative before you get to a 2GB cache (on RISC OS, at least), which seems a little close to the 1GB default. You were quite right, changed the option to an unsigned int so its now 4gigabytes I don't know if this upsets the underlying cache, but I've limited the RISC OS GUI to 2047MB for now. Underlying cache does calculations in size_t (unsigned 32bit on RISC OS) so should be fine. -- Steve Fryatt - Leeds, England http://www.stevefryatt.org.uk/ -- Regards Vincent http://www.kyllikki.org/
Re: reworked web search
On Tue, May 27, 2014 at 06:38:10PM +0100, Chris Young wrote: On Tue, 27 May 2014 11:06:20 +0100, Vincent Sanders wrote: May I ask if (aside from the dumb mistakes) the feature is working as expected now? It ought to have removed any delays if the network was unable to fetch the search providers icons and made the whole thing more robust. It seems fine, other than not picking up the icon on some occasions. Actually, I had a thought about that - is it fetching, and not notifying the frontend when the new icon is ready? OK done some debugging on gtk and it is always notifying. However I have discovered something very aggrivating: - At initialisation it is setting the provider name with null bitmap. - The cache then quickly supplies the provider icon and that fecth completes, the callback is called with the provider name and bitmap. - The default icon fetch then completes and it sets the provider bitmap back to the default. I am currently trying to figure how to stop the default icon fetch overriding the correct provider image. -- Regards Vincent http://www.kyllikki.org/
Re: reworked web search
On Sun, May 25, 2014 at 03:12:01PM +0100, Chris Young wrote: On Sun, 25 May 2014 11:32:42 +0100, Vincent Sanders wrote: The search is behaving oddly - I'm getting two (and always two) garbage characters on the end of my search string. So, if I search for netsurf on Google I get something like: http://www.google.com/search?q=netsurfO%FC hmm. that is strange (honest i did test this with the gtk frontend!) is this soemthing to do with how the search term is extracted on amiga? search_web_omni() is supposed to take the search term it is given and substitute it into the search url. I've fixed it, the URL wasn't getting NULL-terminated. I guess on your test platform the memory allocation was zeroed, but here it wasn't. Thankyou very much Chris!. Dumb error on my part, sorry about that. May I ask if (aside from the dumb mistakes) the feature is working as expected now? It ought to have removed any delays if the network was unable to fetch the search providers icons and made the whole thing more robust. I do not know if you are aware of the search_url_bar boolean option which is supposed to control search behaviour on input to the search_web_omni() operation. The heuristics for deciding if a search term is a url are still a little inadequate but I am working on them. This should eventually allow us to have a url bar which mostly does the right thing and perhaps a simple additional button for search for this term, do not try to interpret as a url -- Regards Vincent http://www.kyllikki.org/
Re: reworked web search
On Sun, May 25, 2014 at 10:34:59AM +0100, Steve Fryatt wrote: On 25 May, Vincent Sanders wrote in message 20140525001056.gy27...@kyllikki.org: I have completely reworked the web search functionality in the core of the browser. The new API is much simpler and robust. Currently only two frontends (GTK and Amiga) use the functionality but I hope now that it is so much simpler to use other maintainers might implement it for their frontends. Is this the search field in the toolbar? For some reason I'd got the idea from discussions on here or IRC that it had been deprecated, which is why I never bothered to implement it on RISC OS. The main reason for re-writing the toolbar code was to make it easier to add stuff like this (and tabs, of course). I'll have another look, time permitting. This was more a combination of utterly awful code and API previously coupled with the idea we could simply make the url bar input much smarter about search without having a separate search input consuming space in the toolbar. I just explained in the reply to Chris how that might work. If i can work out a clean way to do this I will be extending the GTK UI to make the search input box toggle appearance alongside the search_url_bar option. Thus you would be able to type urls and search terms into the single url bar and simply have it do the right thing (a bit like chrome or firefox) -- Regards Vincent http://www.kyllikki.org/
Re: reworked web search
On Sun, May 25, 2014 at 10:44:54AM +0100, Chris Young wrote: On Sun, 25 May 2014 10:11:39 +0100, Vincent Sanders wrote: On Sun, May 25, 2014 at 09:59:30AM +0100, Chris Young wrote: On Sun, 25 May 2014 01:10:56 +0100, Vincent Sanders wrote: I have fixed up both GTK and Amiga usage (apologies to chrisy if I made an error in amiga) I have no icon and attempting to search results in an InitFailed error message. Any ideas? This will stem from the search_web_init() not suceeding or being called at all. It should be called once in the initialisation process preferably after the fetchers have been initialised (after netsurf_init). However I thought i did this already for amiga. Fixed, thanks. The search is behaving oddly - I'm getting two (and always two) garbage characters on the end of my search string. So, if I search for netsurf on Google I get something like: http://www.google.com/search?q=netsurfO%FC hmm. that is strange (honest i did test this with the gtk frontend!) is this soemthing to do with how the search term is extracted on amiga? search_web_omni() is supposed to take the search term it is given and substitute it into the search url. It may be worth adding logging of the pass term and the search url in search_web_omni() to check where the problem lies. It is possible that the code that parses the loaded search providers file (in desktop/searchweb.c) is not parsing the search provider urls correctly, although it is doing simple strchr calls using | as a field separator which ought to be more robust than the previous code. There may be an issue with retrieving the default icon (now done through a standard resource:default.ico fetch) I thought the init should cope with not having access to the icon but I may be mistaken. Don't know, but I've mapped it across now. It seems to be using the default icon at startup some of the time, so there's some odd timing issue there. The way this is supposed to operate now is that on initialisation the resource:default.ico is fetched. Whenever a new provider is selected with a call to search_web_select_provider() the provider_update callback is called. If the providers icon has not already been fetched a fetch is started and the default bitmap is passed to the callback, once the provider icon fetch successfully completes the callback is again called to update with the new bitmap. Chris -- Regards Vincent http://www.kyllikki.org/
reworked web search
I have completely reworked the web search functionality in the core of the browser. The new API is much simpler and robust. Currently only two frontends (GTK and Amiga) use the functionality but I hope now that it is so much simpler to use other maintainers might implement it for their frontends. I have fixed up both GTK and Amiga usage (apologies to chrisy if I made an error in amiga) and the GTK frontend search from the url bar functionality now actually works (set in preferences) -- Regards Vincent http://www.kyllikki.org/
Re: netsurf: branch master updated. release/3.1-59-g1a3ee60
On Tue, May 13, 2014 at 06:28:20PM +0100, Chris Young wrote: Hi Vince add strptime compatability str(p|f)time %s appears to be a non-standard extension. Certainly it doesn't work here, and I can't see it in any documentation. It might be better to use %c, even though that needs a bit more storage space, or just use your compatibility functions for all platforms. Right, I added utils/time.h which declares and documents nserror nsc_snptimet(char *str, size_t size, time_t *timep); int nsc_sntimet(char *str, size_t size, time_t *timep); Hope thats acceptable to everyone. They use the troublesome str(p|f)time on unix where present and less correct methods elsewhere. Printing and reading time_t directly appears to be a bit of a missing bit of the specification, hence the non-standard extensions. Chris -- Regards Vincent http://www.kyllikki.org/
Re: netsurf: branch master updated. release/3.1-59-g1a3ee60
On Tue, May 13, 2014 at 06:28:20PM +0100, Chris Young wrote: Hi Vince add strptime compatability str(p|f)time %s appears to be a non-standard extension. Certainly it doesn't work here, and I can't see it in any documentation. It might be better to use %c, even though that needs a bit more storage space, or just use your compatibility functions for all platforms. right, ok, its an extension available on most unix systems (where i tested it) but as it appears not to be portable I will indeed create and use some helpers. The main problem is that there is no format specifier for printf() for time_t so it will get a bit ugly, cannot be helped I guess. Chris -- Regards Vincent http://www.kyllikki.org/
Core browser functionality
As you will all no doubt have noticed I have been splitting the browsers core functionality out from the front ends. The evantual aim of this work is to be in a position to have a browser library around which frontends can implement a browser suitable for their platform. The functionality falls broadly into these catagories: 1) library type functionality which each frontend can use to perform actions (like nsurl for handling urls and message code for handling internationalised strings) which is mainly provided in the utils directory. 2) Core browser functionality which provides everything from the fetchers to the renderer. 3) Operations the core code requires the frontend provide. These are accessed through an operations table which is currently initialised as part of gui_init() 4) Frontend code. My work so far has mainly been in the third area, but I am considering all but the frontend code in this discussion. I would like to start moving functionality out of the netsurf project and into a core library. I think I have progressed the refactoring work far enough that this is a useful thing to start. To be clear this is *purely* a reorganisation of code. The new library would remain licenced as now (GPL v2+openssl exception, unlike our other libraries which are MIT) and all functionality would remain unafected. The new library would use the core buildsystem however and be built as part of the CI system. The aim here is to have a clear identifiable boundary between what is frontend code (which will remian in the netsurf project as now) and what is core browser. This move would emphaticaly *not* be an instant change, more a gradual movement of functionality as it becomes clear where it belongs. My first addition would probably be to move the gui_factory operation table functionality and cause it to be used for the ns_register() very early in all the frontends main() which should remove some of teh issues ChrisY has experienced as fallout from my rcent refactors. I want to get input on this from everyone, especailly from Chris and Steve who have put up with my breaking their frontends with my refactors and with whom I do not get to communicate with a great deal on these things. If we decide this split is a good idea I want to decide the library name as well. If we follow the existing netsurf support library convention it would be called libns and all exported functions would be prefixed with ns_ This name fits reasonably well except it is a bit close to cocoa library naming where everything is prefixed with NS (for nextstep), This does not conflict (as nsurl etc. currently show) but might be confusing? Other options are libnscore and libnsbrowser. However please remember we prefix all exported functions with that name so nscore_ and nsbrowser_ are a bit long. e.g. nsurl_ctreate() becomes nscore_url_create() This is intended as a discussion start, if you are a current committer please do comment! -- Regards Vincent
Re: [PATCH] Encode non-ASCII hosts according to IDNA2008
On Mon, Mar 17, 2014 at 09:33:50PM +0100, John Tytgat wrote: In message 20140317170827.ga21...@kyllikki.org Vincent Sanders vi...@netsurf-browser.org wrote: Also there is no pkg-config file which makes runtime detection a pain, the author seems disinclined to add such a file either as autoconf obviously does not require them and being a GNU project he follows the one true GNU way. autoconf is pretty orthogonal to what pkg-config offers. You can easily use a pkg-config published library in an autoconf project. And it is easy to support pkg-config in an autoconf based project as well. One should not exclude the other, they are complementing each other. Indeed they can. I don't see why one couldn't consider upstreaming a pkg-config support patch to libidn2 project. Ah, you perhaps misunderstood me, libidn2 is developed by developers who follow the GNU project guidelines. When I gently introduced the idea of having a pkg-config to them It was explained robustly in return by them that one should use autoconf to achive build time config not use pkg-config. It was futher suggested that this is GNU projects default position and then there were some questioning of my personal sanity and other such comments. I decided not to persue the matter futher as this was just a minor part of my overall unease with relying on an additional external library. The objections are borne from multiple concerns rather than any single point. John. -- John Tytgat j...@netsurf-browser.org -- Regards Vincent http://www.kyllikki.org/
Re: [PATCH] Encode non-ASCII hosts according to IDNA2008
On Sat, Mar 15, 2014 at 03:42:34PM +0100, Chris Young wrote: This is my attempt at adding IDNA2008 support. It is in branch chris/idn-punycode (this is a condensed version but same as HEAD there). hi chris, thanks for taking a look at this, just fyi there is a holding bug for this: http://bugs.netsurf-browser.org/mantis/view.php?id=1905 overall I like the feature and there do not seem to be many problems with your approach of simply leaving it up to the frontends to decide if they should display the punycode raw or convert back to their own display format. I've used libidn2 because it fully conforms to the spec, although I can see there may be a benefit to not using an external library for this. libidn2 seems to build cleanly with no patches on OS4 so I don't envisage any major problems elsewhere, however I've made it optional for now. This is where it becomes a bit awkward. Using an external library gets us a working conformant implementation but at the cost of another build dependency. Having looked at the libidn2 code, there are only a handful of actual source files (not sure you even use all of the API either) and they are vastly outnumbered by the autoconf etc. and an embedded copy of gnulib, which is actually the problem. gnulib is duplication of a lot of what we have in netsurf already and seems a large burden for such a small implementation. Also there is no pkg-config file which makes runtime detection a pain, the author seems disinclined to add such a file either as autoconf obviously does not require them and being a GNU project he follows the one true GNU way. As I've put it in nsurl_create the non-ASCII hosts are automatically handled everywhere in NetSurf, and are passed back to the frontend as the punycode version so there should be no weird problems with frontend string gadgets not supporting UTF-8. seemed sensible I've tested the Amiga and GTK frontends and things like www.bücher.de are handled correctly when typed in or clicked. Other frontends may need to ensure any URLs typed in are passed as UTF-8. it does indeed work, all urls getting converted to the punycode format for display currently. Overall I like the feature, hell if it were not for libidn2 I would have already merged it. Perhaps someone else has an opinion better thought through than mine. -- Regards Vincent
Re: Curl threaded resolver
On Sun, Feb 09, 2014 at 11:00:17AM +, Chris Young wrote: Hi I've finally managed to get a working patch for libcurl's threaded DNS resolver, so I've updated the ppc-amigaos toolchain. If somebody can give Jenkins a prod so it rebuilds the ppc-amigaos toolchain that'd be great. :) And the monkey flipped the switch ;-) should be done in about 50minutes Thanks Chris -- Regards Vincent http://www.kyllikki.org/
Your bugs in the tracker
Can anyone who has an open bugs in our tracker [1] please go and review your reports. We have almost 200 outstanding bugs and it is very hard keeping on top of them. An number of older bugs are awaiting feedback from the reporter or no longer apply to current versions. If you have a bug like this please, please assist us by replying with requested feedback or adding a note that simply says if the issue is still reproducible. We are trying to get on top of the bugs for the next release bug your assistance is appreciated. As previously mentioned all old accounts and bugs have been imported from sourceforge but if you no longer remember your user name, have access to your sourceforge email or other issues logging in just contact us [2] (please no direct email as it will just add work for us forwarding it to the role address). [1] http://bugs.netsurf-browser.org/mantis/my_view_page.php (select Reported by Me link) [2] h...@netsurf-browser.org -- Regards Vincent http://www.kyllikki.org/
Refactoring gui interface
I have recently put a lot of effort into refactoring the interface between the core and the front ends (gui) This is the first step along the road to making the core of netsurf a library that the front end toolkits can use as a widget. All this is in an effort to make the required implementation for a front end toolkit much more obvious and to remove many years of accumulated cruft in the interfaces. It will also mean that in future adding or altering an interface will mean modifying every front end will be done in an obvious place. When the core requires operations to be performed by the frontend they are almost all now performed through a single table interface. This table is passed to the netsurf_init() call every frontend makes. The table comprises of a set of structures containing function pointers. The change has absolutely no performance implications, the same number of function calls are made and the same parameters are passed as before. Going forward some of these interfaces may be improved especially in the area of error reporting (many of the operations currently have no way of indicating an error) I would like to ask all front end maintainers to consider their use of the desktop/gui.h header. Previously it caused a great number of additional headers, both system and local, to be included. The header now has the absolute minimum number of inclusions to ensure the types for the tables are available and nothing more. I have cleaned up a great number of incorrect includes but I would like to reduce this headers usage to the absolute minimum to make ongoing cleanups have fewer unexpected side effects. It should *only* be used by front ends when using the gui tables, probably only from the modules actually implementing them. Currently there are a number of frontend headers which it appears include desktop/gui.h unnecessarily, these are: windows/download.h windows/gui.h windows/plot.h amiga/gui.h riscos/save.h beos/scaffolding.h beos/window.h If maintainers could remove any unnecessary includes from these headers (and indeed anywhere else) it would be very helpful. The documentation [1] on desktop/gui.h makes the current situation pretty clear. There are now only a handful of remaining operations not in the gui table. The known ones are: die() warn_user() Though there appears to be font render operations in an alternate interface which may warrant being merged. If anyone spots any more can they let me know [1] http://ci.netsurf-browser.org/jenkins/job/docs-netsurf/doxygen/desktop_2gui_8h.html -- Regards Vincent http://www.kyllikki.org/
Re: Long URLs on RISC OS
On Thu, Jan 30, 2014 at 11:51:34PM +, Steve Fryatt wrote: On 30 Jan, Daniel Silverstone wrote in message 20140130120127.GK26047@somnambulist.local: On Sun, Jan 26, 2014 at 15:44:17 +, Steve Fryatt wrote: PS: Should I be deleting my branches once they're merged? If so, what's the preferred way to do it? Yes, [...] Thanks -- I've tidied up after myself now. I merged your menus branch again, so assuming the merge was correct you can remove that too. -- Regards Vincent http://www.kyllikki.org/
Re: RISC OS Hotlist Fixes
On Tue, Dec 31, 2013 at 05:30:52PM -, Steve Fryatt wrote: I've updated the RISC OS front-end to properly support the new hotlist tool in the URL bar (ie. handle mouse clicks, confirm before deleting things and provide interactive help). Because I've added some items to FatMessages and therefore can't push them, the changes are in a branch here: http://git.netsurf-browser.org/netsurf.git/log/?h=stevef/hotlist It builds and tests OK for me, so should be OK to merge in to master. I reviewed and merged it, nice to see you commiting. If this closes any bugs in the bugtracker can you nip and close them not forgetting to set the fixed in version, thanks? The following tokens are new in FatMessages, and so could do with translations if anyone can help. all.RemoveHotlist all.Remove all.DontRemove ro.HelpToolbarFav ro.HelpToolbarHot The three confirmation texts are currently set to 'all' to match all the other similar entries in the file; they could be made 'ro' specific if that's considered better, although in theory they would apply to other front-ends implementing this functionality in the future. -- Steve Fryatt - Leeds, England http://www.stevefryatt.org.uk/ -- Regards Vincent http://www.kyllikki.org/
Re: Haiku fixes
On Sat, Dec 07, 2013 at 01:34:13AM +0100, François Revol wrote: Hi, I just fixed the Haiku build, well almost, however it seems the perl package now misses some modules, so splitting Messages fails. But at least the binary compiles fine now: http://git.netsurf-browser.org/netsurf.git/log/?h=mmu_man/haiku-fixes François. Merged mmu_man/haiku-fixes The two actual core changes you needed are both harmless enough using utility macros we already have. Did not review the changes under the beos directory as I do not have any way to test those. -- Regards Vincent
Re: Bugs, their care and stomping
On Wed, Dec 18, 2013 at 02:29:06AM +, Harriet Bazley wrote: On 17 Dec 2013 as I do recall, Vincent Sanders wrote: [snip] We have created users within the new system for everyone who has reported a bug. For most imported users the email address used was their sourceforge contact address [3] Oh -- oops, there's two of me now, then... Only one now, I moved all 59 of your old reports to your new user -- Harriet Bazley == Loyaulte me lie == It is better to wear out than to rust. -- Regards Vincent http://www.kyllikki.org/
NetSurf Developer Weekend
Most developers already knew about this but I have just been reminded we did not make a full public announcemnt so... We have a develoepr wekedn coming up in January, see the wiki for details: http://wiki.netsurf-browser.org/Developer_Weekend_(Jan_2014) -- Regards Vincent
Re: Bugs, their care and stomping
On Wed, Dec 18, 2013 at 03:15:08PM +, Harriet Bazley wrote: On 18 Dec 2013 as I do recall, Vincent Sanders wrote: On Wed, Dec 18, 2013 at 02:29:06AM +, Harriet Bazley wrote: On 17 Dec 2013 as I do recall, Vincent Sanders wrote: [snip] We have created users within the new system for everyone who has reported a bug. For most imported users the email address used was their sourceforge contact address [3] Oh -- oops, there's two of me now, then... Only one now, I moved all 59 of your old reports to your new user Thanks - could you possibly delete the old (users.sourceforge.net) user, as I'm receiving two copies of all the notifications via the two different addresses? I already did, the sourceforge adress is no longer in our database -- H. Bazley Wimbledon SW19 020 8543 0362 -- Regards Vincent http://www.kyllikki.org/
Bugs, their care and stomping
The NetSurf team are pleased to announce the availability of a new bug tracker [1] The new tracker uses mantis [2] software which is usable from NetSurf This move has been necessitated because of several issues, principally: - The SourceForge issue tracking system has been upgraded and is now unusable from NetSurf - The advertisements on the site have become aggressively invasive - The reliability of the site has come into question. We have imported the bugs from SourceForge although this has resulted in a renumbering of identifiers (bug numbers). We have been able to put a link back to the old sourceforge bug numbers in the Additional Information of every imported bug. Please do not use the SourceForge tracker for any new bugs or update any old ones there as they will be ignored. Accounts We have created users within the new system for everyone who has reported a bug. For most imported users the email address used was their sourceforge contact address [3] The new system does not allow for anonymous issue reporting, if this is a problem for you we thank you for your opinion but this decision is not negotiable. To login please use the lost password interface [4] to update your details if you wish. If a user needs the address associated with their account altering and cannot access it through sourceforge please contact us [5] giving as much information as possible (including the user id and some reasonable argument that the account is yours - we will set the address to where you send the mail from) Accounts have been created manually for the many users who usefully put their contact details within their reports, additionally their email details have been removed from the publicly visible reports which should reduce spam harvesting. We assure all users we will never use the email addresses given to the system other than to reply to their bug reports. New and existing bugs - Updates to bugs will (by default! this is configurable for each user [6]) result in the reporter receiving an email. If you wish to update a bug please use the web interface, replying to the emails means a developer has to manually copy the reply to the bug. We may reconsider changing the reply address to refuse mail if this becomes a burden. New reports should contain as much information as the reporter can provide we give some guidence [7] but ultimately the more information you provide the more likely we can reproduce the issue and the more likely it is to get resolved. Debugging is hard [8] please do not have unreasonably high expectations, we did *not* intend to have the bug that you found, please do not take it personally. I have currently triaged just over 10% of the open bugs and will make my way through those that remain over the forthcoming weeks. Please understand that there are very few active developers and many open bugs so this work goes slow. I have to be pretty harsh in my triage and will close incomplete bugs (especially anonymous ones) without a detailed examination. These may be reopened by the reporter but I request that as much information is provided as you can. What things mean I know some reporters are already misunderstanding what the various fields in a report are for, especially the severity and status fields. Severity refers to how severe the impact is on the project overall i.e. if the bug causes a crash in normal operation (crash severity) and is *not* a reflection on how important the bug is (we specifically do not have a priority field for that). To be clear the *default* of minor means, in this context, that the bug does not make the browser unusable for *everyone* Status is related to the bug work flow within the netsurf team. It starts at new when the bug is reported, gets set to feedback when we need more information from the user or a user reopens an unresolved issue. The acknowledged status means a developer has at least looked at the report but not reproduced the issue whereas confirmed shows they have reproduced it (not the reporter, we know they managed it!). The assigned status means that one of the developers has decided they are the best person to fix the issue and are actively examining the problem. We are also using the assignment to the import user as a flag that basic triage has not yet been performed on the bug. Finally the resolved status implies that the resolution field should be looked at to see how the issue was resolved and the closed status implies the developer has finished with the report and no additional activity will be made on the issue. [1] http://http://bugs.netsurf-browser.org [2] http://www.mantisbt.org/ [3] if the userid on sourceforge was kyllikki the email used was kylli...@users.sourceforge.net [4] http://bugs.netsurf-browser.org/mantis/lost_pwd_page.php [5] h...@netsurf-browser.org [6] http://bugs.netsurf-browser.org/mantis/account_prefs_page.php [7] http://bugs.netsurf-browser.org/
[gocmenmu...@gmail.com: i have a fix for libcss]
recived in private mail, attached the patch from the url - Forwarded message from Murat Gocmen gocmenmu...@gmail.com - Date: Tue, 10 Sep 2013 12:17:49 +0100 From: Murat Gocmen gocmenmu...@gmail.com To: j...@netsurf-browser.org, vi...@netsurf-browser.org Subject: i have a fix for libcss Hi All, I am not even sure if somebody going to have this email, but i will try, lately i have seen a different behaviour on border shorthand setting, when setting border: xxx it was setting the border color value, pathc is attached, fyi, I have passed the css test suite border shorhand properties test via this patch, Regards. border_color-0.2.0.patchhttps://docs.google.com/file/d/0B8t45OYNG_RsZlNxWXM4akhVcjA/edit?usp=drive_web - End forwarded message - -- Regards Vincent http://www.kyllikki.org/ diff -rupN libcss-0.2.0/src/parse/properties/utils.c libcss-0.2.0.new/src/parse/properties/utils.c --- libcss-0.2.0/src/parse/properties/utils.c 2013-04-19 19:40:31.0 +0100 +++ libcss-0.2.0.new/src/parse/properties/utils.c 2013-08-12 15:06:46.841815000 +0100 @@ -227,6 +227,14 @@ css_error css__parse_border_side(css_lan goto css__parse_border_side_cleanup; } + if (color) { + error = css__stylesheet_style_appendOPV(style_style, +CSS_PROP_BORDER_TOP_COLOR + side, 0, +BORDER_COLOR_CURRENT_COLOR); + if (error != CSS_OK) + goto css__parse_border_side_cleanup; + } + error = css__stylesheet_merge_style(result, color_style); if (error != CSS_OK) goto css__parse_border_side_cleanup; signature.asc Description: Digital signature
Re: Options/Choices refactor
On Fri, May 31, 2013 at 07:27:42PM +0100, Chris Young wrote: On Tue, 28 May 2013 19:52:13 +0100, Vincent Sanders wrote: This means that user options files will now only contain the options which differ from the defaults. This will alow us to alter the defaults in future and have everyones choices actually update instead of being overidden by old saved default values that might not be useful. Is there any way to modify the defaults outside of nsoption_init? I have to open a screen before I can set some of the values, but I can't open the screen until options are initialised (as the parameters are in there). So I'd like to set some defaults at a later time which then get applied, unless of course the user has already set their own preferences. this does sound ass backwards? like you want only some user options set and then to initialise some defaults then to apply the rest of the user options? Perhaps a clearer idea of what you are trying to achive might be useful? you may have to do a second initialisation after the first user option load and have ther second init use the info from the first? The new API is designed to be flexible. The original aim was to completely abstract access to the options. Due to practical constraints outlined in utils/nsoption.h this has not been possible. For now there are no accessor functions for the default values (yeah i know the current implementation for active options is with macros) but you can simply use nsoptions_default[NSOPTION_option_name].value.i directly from within your own code (or perhaps better still crate some accessor functions(macros) in nsoption.h) The gtk frontend has a verify_options() function in its main() that does something similar, just remember that strings must be handled carefully as defaults may be const and not require freeing (active options are always allocated from heap) and only options that differ between the default and active table will be saved. -- Regards Vincent http://www.kyllikki.org/
Internationalisation
I recently had opportunity to integrate a translation platform into the NetSurf workflow[1]. This integration has been performed on the transifex platform, is complete, and does work reasonably. However without real actual translations it is not useful. I would like to invite anyone with translation skills to improve the netsurf project by using this web interface to enter translations[2]. I am especially interested in any of our current developers providing translatiopns who wish to become translation reviewers to ensure we maintain a high quality. The current number of translated/reviewed strings by language is: English: 100%/100% French: 93%/93% Dutch: 92%/92% German: 92%/92% Italian: 92%/92% Spanish: 87%/0% Chinese: 0%/0% The review status is purely based on the existing corpus (i.e. if it is in the current set of translations it is considered reviwed) The spanish translation is currently a pure machine translation althouh we already have some volunteers from the translation community to whom I am grateful for their input. [1] http://vincentsanders.blogspot.co.uk/2013/05/true-art-selects-and-paraphrases-but.html [2] https://www.transifex.com/projects/p/netsurf/ -- Regards Vincent http://www.kyllikki.org/
Mac OS X
We continue to compile for the Mac OS X cocoa frontend on both PowerPC (OS 10.5 leopard) and x86 (OS 10.6 snow leopard). The Continuous Integration (CI) system uses two real mac mini computers[1] as build slaves as Mac OS X cannot currently be reliably cross compiled for. Recently the PPC CI system build slave (chimera) had a catastrophic hard drive failure and required a complete OS and development tools reinstall. This re-install took an extended period of time as the PPC system is somewhat slow compared to other targets. Generally we use SSD in our build slaves, however I was unwilling to bear the cost of a 2.5inch PATA SSD for this system so its been reinstalled with a reconditioned Seagate 5200 RPM drive. The cocoa frontend currently has no maintainer and I am interested in hearing from any actual users to give an indication as to whether it is worth investing any additional resources on this platform. So any actual users or developers, please speak up now! Note I am not asking for opinion about other considerations such as diversity and how nice it is to have a wide range of platforms supported, purely if there are any actual users. If there are none I shall simply remove these targets from the CI system on the next occasion this rather old and *very* slow hardware fails. [1] http://www.flickr.com/photos/29254252@N06/8519229958/in/set-72157626712232414 -- Regards Vincent http://www.kyllikki.org/
Re: Tests rely on alloca()
On Fri, Apr 26, 2013 at 09:24:59PM -0600, Anthony J. Bentley wrote: Anthony J. Bentley writes: Hi, Several tests use alloca() to allocate memory. But alloca() is not part of C99, and on OpenBSD this leads to linking errors since the NetSurf build system specifies -std=c99: LINK: build-OpenBSD-OpenBSD-release-lib-shared/test_parser cc -o build-OpenBSD-OpenBSD-release-lib-shared/test_parser build-OpenBSD-Open BSD-release-lib-shared/test_parser.o -Lbuild-OpenBSD-OpenBSD-release-lib-shar ed/ -lhubbub -g -L/usr/local/lib -liconv -L/usr/local/lib -ljson-c build-OpenBSD-OpenBSD-release-lib-shared/test_parser.o(.text+0x578): In funct ion `run_test': test/parser.c:28: undefined reference to `alloca' collect2: ld returned 1 exit status I've replaced these with calls to malloc(): https://github.com/bentley/libcss/ https://github.com/bentley/libhubbub/ https://github.com/bentley/libparserutils/ Reviewed and applied, thanks for your work on this If these could be pulled into the main repositories that would be great. -- Anthony J. Bentley -- Regards Vincent http://www.kyllikki.org/
Re: new Dutch translation
On Thu, Apr 25, 2013 at 07:19:04PM +0200, Simon Voortman wrote: Hi list, Where should I submit new Dutch translations? That would be great to have. The mailing list is the best place for translations currently. A diff against the FatMessages file is easiest to integrate but I can merge by hand if thats not possible. TIA, Simon Voortman. -- Regards Vincent http://www.kyllikki.org/
Re: Cross-Compiler Build Instructions
On Mon, Dec 17, 2012 at 10:24:59PM +, Steve Fryatt wrote: On 16 Dec, Steve Fryatt wrote in message mpro.mf5blp0je6log01jz.li...@stevefryatt.org.uk: I've just recreated my cross-compilation setup for NetSurf (currently on Ubuntu 10.04, although that's likely to be changing soon), and have been reading the BUILDING-ROcross documentation supplied in the Docs folder of the source. I'd like to update that [...] I've had a further think about this, and come up with the attached revision to the document (I've not done a patch, as it's basically a complete re-write of what was there before). It now refers to the new build system, and reflects the migration to Git. It's written with the assumption that readers won't be trying to use the same source to build for other targets at the same time (and that if they are, they will know what to do to make it work correctly). I'm open to suggestions as to how to make it seamlessly multi-target without adding lots of complexity, however. Comments, suggestions, criticisms, etc welcome. I can't commit it myself as I can't write to Docs/, but if anyone else thinks it's ready for that, feel free. looks pretty complete, will have to wait on the others for a review though as my english is notoriously bad -- Steve Fryatt - Leeds, England Wakefield Acorn RISC OS Show Saturday 20 April 2013 http://www.stevefryatt.org.uk/ http://www.wakefieldshow.org.uk/ sorry I did not reply earlier, day job got in the way. You are obviously unaware that we have put together a toolchain build system [1], its what the CI system uses for all its toolchains The readme covers it too but: $ apt-get install build-essential autoconf automake autogen flex bison libtool texinfo help2man subversion cvs $ git clone git://git.netsurf-browser.org/toolchains.git $ make -C arm-unknown-riscos $ GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/arm-unknown-riscos/cross/bin GCCSDK_INSTALL_ENV=/opt/netsurf/arm-unknown-riscos/env make -C sdk will get you a fully working toolchan and libs. Alternatively you can just download the precompiled toolchains from the ci system [1] http://git.netsurf-browser.org/toolchains.git/ -- Regards Vincent http://www.kyllikki.org/
Re: nsgenbind crash
On Thu, Nov 08, 2012 at 07:18:25PM +, Chris Young wrote: On Thu, 8 Nov 2012 01:07:24 +, Vincent Sanders wrote: On Wed, Nov 07, 2012 at 10:50:04PM +, Chris Young wrote: On Wed, 7 Nov 2012 22:43:43 +, Vincent Sanders wrote: the tool generates output using positional format specifiers like %1$d which your c library apariently cannot cope with...i will change this to normal ones for you commited, Hmm, still seems to be adding $s and $d. I don't think I'm getting as many errors though, so you've probably just missed one. do not *think* so..but i could be wrong. have you made netsurf clean and definitely regenerated with master branch nsgenbind? along with compatability macro magic that *might* mean 1.7 works in mainline javascript/jsapi.h now has a 1.7 section which should be updated with stuff i got wrong ;-) Getting there. I think jsapi.h is ok, but the generated window.c has some trace stuff in it which 1.7 doesn't like. I can get it to build by commenting it out, but I'm not sure how important it is or what it does: build-amiga-amiga/window.c:27: error: expected ) before * token build-amiga-amiga/window.c:33: error: JSCLASS_MARK_IS_TRACE undeclared here (not in a function) build-amiga-amiga/window.c:45: error: jsclass_mark undeclared here (not in a function) build-amiga-amiga/window.c: In function jsapi_property_window_get: build-amiga-amiga/window.c:511: warning: implicit declaration of function JS_SET_RVAL build-amiga-amiga/window.c: At top level: build-amiga-amiga/window.c:2479: error: expected ) before * token This i have fixed already (I think) I think JS_SET_RVAL should be JSAPI_SET_RVAL though. migt be, though some places are using the real spidermonkey macro as its just the native function call that has changed signature every bloody release since 1.7.0 :-( Thanks Chris -- Regards Vincent http://www.kyllikki.org/
Re: nsgenbind crash
snip fixed stuff This i have fixed already (I think) Still erroring - it doesn't like the JSTracer type and JSCLASS_MARK_IS_TRACE. Looks like there is a different type of callback for 1.7 so might need some compatibility magic there. gah missed compat macro usage, ole pointed it out seconds before you did, fixed now I think JS_SET_RVAL should be JSAPI_SET_RVAL though. migt be, though some places are using the real spidermonkey macro as its just the native function call that has changed signature every bloody release since 1.7.0 :-( Ah, 1.7 doesn't have it though. I've added it to the jsapi.h header. cheers, sometime i may rename JSAPI_SET_RVAL to JSAPI_FN_SET_RVAL to make this obvious -- Regards Vincent http://www.kyllikki.org/
Re: nsgenbind crash
On Wed, Nov 07, 2012 at 12:14:49AM -, Chris Young wrote: On Tue, November 6, 2012 10:57 pm, Vincent Sanders wrote: On Tue, Nov 06, 2012 at 08:22:02PM +, Chris Young wrote: I have to remove the trailing slash on the -I parameter to pacify AmigaOS (nsgenbind tries to open javascript/WebIDL//dom.idl otherwise, which will never work) ok, unix doesnt care but its no problem to have it like that Cool. nsgenbind -I javascript/WebIDL -d build-amiga-amiga/window.d -o build-amiga-amiga/window.c javascript/jsapi/window.bnd It then crashes with this stack trace: this smells of stack overflow. That was my first thought too, but it says it hasn't run out of stack, and checking with another tool it agreed that I'd assigned 500K, and shows that it had only ever used 1% of that by the time it crashed. right, it was a stack smash...caused by uninitialised variable in the parser from the webIDL Dictionary parse (should have returned NULL instead of whatevers on the stack the fact it crashes on windows is a bit worrying, obviously it is just fine on Linux but I will continue to investigate for you. Thanks. On Windows it crashes quite silently, I get the attached stackdump file continually updated/rewritten as it goes through the nsgenbind commands. No errors are ever reported on the Shell, until gcc tries to read the generated files and they aren't there. Chris Should be fixed now, let me know -- Regards Vincent http://www.kyllikki.org/
Re: nsgenbind crash
On Wed, Nov 07, 2012 at 08:11:24PM +, Chris Young wrote: On Wed, 7 Nov 2012 17:53:06 +, Vincent Sanders wrote: the fact it crashes on windows is a bit worrying, obviously it is just fine on Linux but I will continue to investigate for you. Thanks. On Windows it crashes quite silently, I get the attached stackdump file continually updated/rewritten as it goes through the nsgenbind commands. No errors are ever reported on the Shell, until gcc tries to read the generated files and they aren't there. Should be fixed now, let me know Yes, it is, thanks. phew Next problem: something isn't getting substituted in as it is supposed to. I'm getting errors like the below: COMPILE: build-amiga-amiga/console.c gcc: build-amiga-amiga/build-amiga-amiga_console.o: No such file or directory build-amiga-amiga/console.c: In function 'jsapi_native_debug': build-amiga-amiga/console.c:58: error: 'JSClass_Console' undeclared (first use in this function) build-amiga-amiga/console.c:58: error: (Each undeclared identifier is reported only once build-amiga-amiga/console.c:58: error: for each function it appears in.) build-amiga-amiga/console.c:63: error: '$d' undeclared (first use in this function) Looking through the source of console.c there is obvious wrongness: the tool generates output using positional format specifiers like %1$d which your c library apariently cannot cope with...i will change this to normal ones for you JSClass JSClass_$s = { $s, 0 | JSCLASS_HAS_PRIVATE, [...] JSString *$s_jsstr = NULL; int $s_len = 0; char *$s = NULL; [etc] I've attached that file so you can have a look at it. Chris -- Regards Vincent http://www.kyllikki.org/
Re: nsgenbind crash
On Wed, Nov 07, 2012 at 10:50:04PM +, Chris Young wrote: On Wed, 7 Nov 2012 22:43:43 +, Vincent Sanders wrote: the tool generates output using positional format specifiers like %1$d which your c library apariently cannot cope with...i will change this to normal ones for you commited, along with compatability macro magic that *might* mean 1.7 works in mainline javascript/jsapi.h now has a 1.7 section which should be updated with stuff i got wrong ;-) Excellent, thanks. Chris -- Regards Vincent http://www.kyllikki.org/
NetSurf Developer Workshop
We held our latest developer workshop this weekend, I have written about it on my blog[1] for those who might be interested in what we got up to. [1]http://vincentsanders.blogspot.co.uk/2012/11/another-netsurf-developer-workshop.html -- Regards Vincent http://www.kyllikki.org/
Re: Request for feedback
snip The other difference between the builds is that I always link against Cairo, but the cross-compilation rules aren't set up for that. I'll try adding them and see what happens. I have a feeling it will build OK but won't run, as our version of Cairo needs libpng 1.2 and CI is likely to (statically) link a different version. It would actually be quite useful for CI to build both versions, as the existing one works on OS 4.0 and the Cairo build doesn't. Hmm, OK, it looks like Cairo isn't present, which is odd as it's part of the SDK. (NB: it needs to be the SDK version as NetSurf uses the Amiga surfaces code which AFAIK is only present in that one) Hi chris I dunno why the autobuilder sdk build does not contain cairo, possibly because we were trying to generate builds that worked on the widest selection of targets? The toolchain repo contains the build scripts/makefiles anyhow, perhaps you can suggest a patch? I would personally prefer if you could change NETSURF_AMIGA_USE_CAIRO to be AUTO in Makefile.defaults and use pkgconfig selector to enable/disable the cairo functionality. This means the build setup will not fail if the library is not present which is whats currently happeneing of the CI system Let me know if you need more help with integrating this into the CI system. -- Regards Vincent http://www.kyllikki.org/
NetSurf developer weekend
The next NetSurf Developer weekend will be taking place between 2nd and 4th November in Cambridge, UK. The rough plan is to arrive in Cambridge on Friday afternoon/evening meet at the venue possibly have a social meetup. Return to the meeting rooms on Saturday and Sunday and work on NetSurf with food and snack breaks as required. Collabora are going to sponsor the event by providing access to their conference rooms. The address of the location is: Kett House Station Rd Cambridge CB1 2JH United Kingdom Google maps ref http://goo.gl/maps/F1CG and the location is very close to the railway station. For building security purposes all physical attendees *must* register (send me an email at least a week before the event) with Name, email and contact details. Already Registered are: John-Mark Bell Daniel Silverstone Rob Kendrick Vincent Sanders Assistance with accommodation is available and I have a vehicle for collecting and dropping people off from wherever they are staying. There are a limited number of parking spaces available at Kett house if necessary. If you would like to join us for what is usually a very productive and enjoyable weekend please let me know as soon as you can. -- Regards Vincent signature.asc Description: Digital signature
Re: Patch: avoid repeated initialization/allocation of global object in js_newcompartment
On Sat, Jun 30, 2012 at 01:20:01PM +0200, Ole wrote: Hello, this patch tries to avoid repeated initialization of JS context, altough there is already one setup. Maybe an assert(JS_GetGlobalObject(cx) == NULL) would be better here, because js_newcompartment is not intended to be called twice on the same context? (fixes an failed assert in spidermonkey when reloading the page) You have completely missed whats going on here, the code there is correct. let me explain: The whole browser has a single library instance known as the runtime created with JS_NewRuntime(). Each browsing context, as defined by the DOM (in our case a browser window - NOT to be confused with the javascript window object - they are related but not the same) has a separate javascript context created upon teh runtime with JS_NewContext() The lifetime of this context is directly coupled to the browser window, though I have arranged delaying the creation of the context untill the first time a fresh javascript global is created. Creating new contexts is a relatively expensive operation so it is worth delaying it as long as possible. The next component is the global object, this is the javascript window object within a browser to which all the other browser context is attached (document, console etc. etc.) it is created with JS_NewCompartmentAndGlobalObject(). The global is created within a context. The global javascript object (and its container if supported) is created afresh when a root content (the content which is caused to be loaded by navigating to a new page in the browser window) aquires the context from its containig browser window. The loading content only does this once when it initialy comes across a resource (script tag) which requires it to use the javascript engine (as a side effect, if a page never uses javascript it will never ask the browser window for a context and we avoid the overhead of creating a fresh global). The content *must* be given a fresh global object or the content will not be starting from the state the previously loaded page left it! complete with pointers to the previous DOM tree etc. The spidermonky authors indicated that from the 1.8 series onwards the global object is garbage collected when replaced and I did not need to perform any additional housekeeping. I suspect that previous editions may need the user to explicitly mark the global as ready for destruction before it is replaced. This should be put in as JS_VERSION conditional code within jsapi.h which implements JS_NewCompartmentAndGlobalObject() -- Regards Vincent http://www.kyllikki.org/ signature.asc Description: Digital signature
Re: JavaScript
On Fri, Jun 29, 2012 at 06:24:58PM +0100, Chris Young wrote: On Fri, 29 Jun 2012 17:28:39 +0100, Vincent Sanders wrote: A simple javascript abstraction has been added allowing for alternative javascript interpreters to be added in future. And an initial implementation added for the spidermonkey interpreter/jit (jsapi) this integration allows for javascript code to be correctly gathered and executed from script tags. That's good to hear. Spidermonkey is perhaps a bit heavy, partly due to being C++ (so the std C++ lib has to be loaded too), and the spidermonkey versions i have been targetting are the c API versions of the 1.8 series so are simply heavy rather than obease current versions are awkward to port due to the dependency on NSPR (although there is a Bugzilla open to remove this dependency which I'm keeping my eye on). Unfortunately it's probably our best option - I don't know of any decent lighter Javascript engines. I tried v8 and looked at a couple of others but none are vaugely usable in our situation and really few of the larger js libs are usuable outside their parent browser projects. What is now required is to add bindings to the javascript runtime for all the DOM operations including the so called DOM0 objects like the global window object and all the associated sub objects like navigator, console etc. Would that need to be done again if somebody decides to add support for a different Javascript library? alas, yes, which is why I tried to work from the web IDL, turns out the IDL samples are incomplete and kinda assume a type system that does not exist within javascript and fits very badly, at which point working from them is pointless as you end up with special casing to make the ideal spec fit the real world. Oh and add in the IDL is simply missing for most of DOM0 Although there is no explicit dependency on specific versions of spidermonkey I am primarily basing my efforts on the 1.8.5 releases as this are the most common version found in distributions. v1.50-2 (which is positively prehistoric, but the only working ported version I have) unfortunately does not work, I fudged it with some macros from newer Spidermonkey includes, and it is calling alert (warn_user()) but with no text. Not sure if it is easy to get it working, for such an old version it's probably not worth it. I have a quick port of Spidermonkey 1.85 but having issues with it crashing; I guess I have quite a while to fix this though. most probably because the JSAPI native calling function spec changed in an incompatible way! can you tell me what JS_VERSION is on your version of the library? I might be able to come up with something...but currently I am a bit stumped how to alter the native calling convention at compile time without some hedious macro magic I'd be interested to hear which versions of Spidermonkey are ported to other operating systems we target (and any porting tips!) Chris - Debian squeeze has 1.8.0 - Debian wheezy has 1.8.5 - I have dev builds using 1.8.9 but they are not really representative of anything - Ubuntu 11.04 has 1.8.5 in the alternate include layout (thats why there are two pkgconfig names/paths sigh) - Ubuntu 11.10 and later seems to be 1.8.5 in various include layouts So I guess that answers the question about which API major version to pick, I think 1.8 series is still the right target -- Regards Vincent http://www.kyllikki.org/
Netsurf 2.9
It is that time of year again and I am preparing to create the 2.9 release. The wiki page for the release is at http://wiki.netsurf-browser.org/NetSurf_2.9 Unless any new show stopping bugs appear I shall be creating the 2.9 branch on the evening of Saturday 25th February 2012 For the release itself we aim to be created four weeks subsequently on March 24th but this may change if more testing is required or it is decided we are happy before then. -- Regards Vincent signature.asc Description: Digital signature
NetSurf developer weekend
The NetSurf Developer weekend will be taking place on the 24th and 25th March in Cambridge, UK. The rough plan is to arrive in Cambridge on Friday afternoon/evening and have a social meetup, possibly involving food. Go to the meeting rooms on Saturday and Sunday and work on NetSurf with food and snack breaks as required. Collabora are going to sponsor the event by providing access to their conference rooms. The address of the location is: Kett House Station Rd Cambridge CB1 2JH United Kingdom Google maps ref http://goo.gl/maps/F1CG and the location is very close to the railway station. For building security purposes all physical attendees *must* register (send me an email at least a week before the event) with Name, email and contact details. Already Registered are: John-Mark Bell Daniel Silverstone Rob Kendrick Michael Lester Vincent Sanders Assistance with accommodation is available and I have a vehicle for collecting and dropping people off from wherever they are staying. There are a *very* limited number of parking spaces available at Kett house if necessary. If you would like to join us for what is usually a very productive and enjoyable weekend please let me know as soon as you can. -- Regards Vincent signature.asc Description: Digital signature
image handler refactor beginning
Add macro helper for adding image content handlers Make all image handlers use the macro Clean up forward references in image code Clean up libmng handler to stop it rummaging through mime type names to change its behaviour. Get ready for next refactor (removing bitmap pointer from content) content/content_factory.h | 45 ++ image/bmp.c | 72 --- image/gif.c | 46 -- image/ico.c | 56 -- image/image.c |7 image/image.h |1 image/jpeg.c | 52 -- image/mng.c | 872 +- image/mng.h |4 image/nssprite.c | 90 +--- image/png.c | 47 -- image/rsvg.c | 51 -- image/svg.c | 119 +- image/webp.c | 93 +--- 14 files changed, 586 insertions(+), 969 deletions(-) -- Regards Vincent http://www.kyllikki.org/ Index: image/svg.c === --- image/svg.c (revision 12670) +++ image/svg.c (working copy) @@ -43,81 +43,32 @@ bool done_parse; } svg_content; -static nserror svg_create(const content_handler *handler, - lwc_string *imime_type, const http_parameter *params, - llcache_handle *llcache, const char *fallback_charset, - bool quirks, struct content **c); -static nserror svg_create_svg_data(svg_content *c); -static bool svg_convert(struct content *c); -static void svg_destroy(struct content *c); -static void svg_reformat(struct content *c, int width, int height); -static bool svg_redraw(struct content *c, struct content_redraw_data *data, - const struct rect *clip, const struct redraw_context *ctx); -static nserror svg_clone(const struct content *old, struct content **newc); -static content_type svg_content_type(lwc_string *mime_type); -static const content_handler svg_content_handler = { - .create = svg_create, - .data_complete = svg_convert, - .reformat = svg_reformat, - .destroy = svg_destroy, - .redraw = svg_redraw, - .clone = svg_clone, - .type = svg_content_type, - .no_share = false, -}; -static const char *svg_types[] = { - image/svg, - image/svg+xml -}; - -static lwc_string *svg_mime_types[NOF_ELEMENTS(svg_types)]; - -nserror svg_init(void) +static nserror svg_create_svg_data(svg_content *c) { - uint32_t i; - lwc_error lerror; - nserror error; + union content_msg_data msg_data; - for (i = 0; i NOF_ELEMENTS(svg_mime_types); i++) { - lerror = lwc_intern_string(svg_types[i], -strlen(svg_types[i]), -svg_mime_types[i]); - if (lerror != lwc_error_ok) { - error = NSERROR_NOMEM; - goto error; - } + c-diagram = svgtiny_create(); + if (c-diagram == NULL) + goto no_memory; - error = content_factory_register_handler(svg_mime_types[i], -svg_content_handler); - if (error != NSERROR_OK) - goto error; - } + c-done_parse = false; return NSERROR_OK; -error: - svg_fini(); - - return error; +no_memory: + msg_data.error = messages_get(NoMemory); + content_broadcast(c-base, CONTENT_MSG_ERROR, msg_data); + return NSERROR_NOMEM; } -void svg_fini(void) -{ - uint32_t i; - for (i = 0; i NOF_ELEMENTS(svg_mime_types); i++) { - if (svg_mime_types[i] != NULL) - lwc_string_unref(svg_mime_types[i]); - } -} - /** * Create a CONTENT_SVG. */ -nserror svg_create(const content_handler *handler, +static nserror svg_create(const content_handler *handler, lwc_string *imime_type, const http_parameter *params, llcache_handle *llcache, const char *fallback_charset, bool quirks, struct content **c) @@ -147,30 +98,13 @@ return NSERROR_OK; } -nserror svg_create_svg_data(svg_content *c) -{ - union content_msg_data msg_data; - c-diagram = svgtiny_create(); - if (c-diagram == NULL) - goto no_memory; - c-done_parse = false; - - return NSERROR_OK; - -no_memory: - msg_data.error = messages_get(NoMemory); - content_broadcast(c-base, CONTENT_MSG_ERROR, msg_data); - return NSERROR_NOMEM; -} - - /** * Convert a CONTENT_SVG for display. */ -bool svg_convert(struct content *c) +static bool svg_convert(struct content *c) { /*c-title = malloc(100); if (c-title) @@ -189,7 +123,7 @@ * Reformat a CONTENT_SVG. */ -void svg_reformat(struct content *c, int width, int height) +static void svg_reformat(struct content *c, int width, int height) { svg_content *svg = (svg_content *) c; const char *source_data; @@ -284,7 +218,7 @@ * Redraw a CONTENT_SVG. */ -bool svg_redraw(struct content *c, struct content_redraw_data *data, +static bool svg_redraw(struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx) { int x = data-x; @@ -344,7 +278,7 @@ * Destroy a CONTENT_SVG and free all resources it owns. */ -void svg_destroy(struct content *c) +static void svg_destroy(struct content *c) { svg_content *svg = (svg_content *) c; @@ -353,7 +287,7 @@ } -nserror svg_clone(const struct content *old,
segfault bug in iframe code
Saw this reported, took a quick look but did not get anywhere, just a quick mail instead of dropping it on the floor url to trigger is http://www.canford.co.uk/Products/74-4843_VOICE-TECHNOLOGIES-VT700B-HEADWORN-MICROPHONE-Black-without-case basically layout_calculate_descendant_bboxes() in render/layout.c:5003 is asserting because box-height is 0 The full backtrace is: #0 0x734d5a75 in *__GI_raise (sig=value optimised out) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x734d95c0 in *__GI_abort () at abort.c:92 #2 0x734ce941 in *__GI___assert_fail (assertion=0x50cd20 (box-width != 2147483647) (box-height != (-2147483647 - 1)), file=value optimised out, line=5007, function=0x50d3c0 layout_calculate_descendant_bboxes) at assert.c:81 #3 0x0049c911 in layout_calculate_descendant_bboxes (box=0x10cdb10) at render/layout.c:5007 #4 0x0049c79b in layout_calculate_descendant_bboxes (box=0x10cd660) at render/layout.c:5058 #5 0x0049c79b in layout_calculate_descendant_bboxes (box=0x10cd930) at render/layout.c:5058 #6 0x0049c7ef in layout_calculate_descendant_bboxes (box=0x10cc220) at render/layout.c:5071 #7 0x0049c79b in layout_calculate_descendant_bboxes (box=0x10cc5e0) at render/layout.c:5058 #8 0x0049c7ef in layout_calculate_descendant_bboxes (box=0xfa2c40) at render/layout.c:5071 #9 0x0049c79b in layout_calculate_descendant_bboxes (box=0xfa2e20) at render/layout.c:5058 #10 0x0049c7ef in layout_calculate_descendant_bboxes (box=0xefac30) at render/layout.c:5071 #11 0x004a5855 in layout_document (content=0xac5850, width=value optimised out, height=572) at render/layout.c:185 #12 0x004902c6 in html_reformat (c=0xac5850, width=979, height=572) at render/html.c:1817 #13 0x00432880 in content__reformat (c=0xac5850, background=false, width=979, height=572) at content/content.c:361 #14 0x0044d08f in browser_window_callback (c=0xcaa1e0, event=0x7fffd770, pw=value optimised out) at desktop/browser.c:811 #15 0x0043a249 in hlcache_content_callback (c=value optimised out, msg=value optimised out, data=..., pw=0x2b54) at content/hlcache.c:701 #16 0x00432683 in content_broadcast (c=0xac5850, msg=CONTENT_MSG_READY, data=...) at content/content.c:643 #17 0x0043340c in content_set_ready (c=0xac5850) at content/content.c:307 #18 0x004914d6 in html_finish_conversion (c=0xac5850) at render/html.c:696 #19 0x00491672 in html_convert_css_callback (css=0xd44c20, event=0x7fffd970, pw=value optimised out) at render/html.c:1358 #20 0x0043a249 in hlcache_content_callback (c=value optimised out, msg=value optimised out, data=..., pw=0x2b54) at content/hlcache.c:701 #21 0x00432683 in content_broadcast (c=0xdce4b0, msg=CONTENT_MSG_DONE, data=...) at content/content.c:643 #22 0x0043339a in content_set_done (c=0xdce4b0) at content/content.c:321 #23 0x00443806 in nscss_content_done (css=0xdce890, pw=value optimised out) at css/css.c:529 #24 0x00442f25 in nscss_register_imports (c=0xdce890) at css/css.c:719 #25 0x00443105 in nscss_import_complete (ctx=0xe2fb30) at css/css.c:667 #26 0x00443190 in nscss_import (handle=value optimised out, event=0x2b54, pw=0x6) at css/css.c:642 #27 0x0043a249 in hlcache_content_callback (c=value optimised out, msg=value optimised out, data=..., pw=0x2b54) at content/hlcache.c:701 #28 0x00432683 in content_broadcast (c=0xe54bc0, msg=CONTENT_MSG_DONE, data=...) at content/content.c:643 #29 0x0043339a in content_set_done (c=0xe54bc0) at content/content.c:321 #30 0x00443806 in nscss_content_done (css=0xe54fa0, pw=value optimised out) at css/css.c:529 #31 0x00443022 in nscss_convert_css_data (c=0xe54fa0) at css/css.c:334 #32 0x00443564 in nscss_convert (c=0xe54bc0) at css/css.c:301 #33 0x004336e0 in content_convert (llcache=value optimised out, event=value optimised out, pw=value optimised out) at content/content.c:282 #34 content_llcache_callback (llcache=value optimised out, event=value optimised out, pw=value optimised out) at content/content.c:174 #35 0x0043b69c in llcache_object_notify_users (object=0xe30750) at content/llcache.c:1500 #36 0x0043ba30 in llcache_poll () at content/llcache.c:315 #37 0x0043a949 in hlcache_poll () at content/hlcache.c:181 #38 0x00453e81 in netsurf_main_loop () at desktop/netsurf.c:183 #39 0x0046b894 in main (argc=2, argv=0x7fffe078) at gtk/gui.c:495 and parameters to teh assert are: (gdb) up 3 #3 0x0049c911 in layout_calculate_descendant_bboxes (box=0x10cdb10) at render/layout.c:5007 5007assert((box-width != UNKNOWN_WIDTH) (box-height != AUTO)); (gdb) p box-width $1 = 2147483647 (gdb) p box-height $2 = 0 just fyi UNKNOWN_WIDTH is defined to INT_MAX and AUTO is INT_MIN -- Regards
More static analysis
jmb did soem corrections to yestardays run, so I repeated it this morning http://www.kyllikki.org/scan-build-2011-05-17-1.tar.gz Log was: scan-build: 'clang' executable not found in '/home/vince/clang/llvm/tools/clang/tools/scan-build/bin'. scan-build: Using 'clang' from path: /home/vince/clang/build/Debug+Asserts/bin//clang M.CONFIG: JPEG (libjpeg)enabled (NETSURF_USE_JPEG := YES) M.CONFIG: JNG/MNG/PNG (libmng) disabled (NETSURF_USE_MNG := NO) M.CONFIG: PDF export (haru) disabled (NETSURF_USE_HARU_PDF := NO) M.CONFIG: glibc internal iconv enabled (NETSURF_USE_LIBICONV_PLUG := YES) M.CONFIG: SVG (librsvg-2.0) auto-enabled (NETSURF_USE_RSVG := AUTO) M.CONFIG: SVG (libsvgtiny) disabled (NETSURF_USE_NSSVG := NO) M.CONFIG: Sprite (librosprite) auto-disabled (NETSURF_USE_ROSPRITE := AUTO) M.CONFIG: BMP (libnsbmp)enabled (NETSURF_USE_BMP := YES) M.CONFIG: GIF (libnsgif)enabled (NETSURF_USE_GIF := YES) M.CONFIG: PNG (libpng)enabled (NETSURF_USE_PNG := YES) M.CONFIG: WebP (libwebp)disabled (NETSURF_USE_WEBP := NO) MKDIR: build-Linux-gtk MKDIR: build-Linux-gtk/deps COMPILE: utils/utils.c COMPILE: utils/utf8.c COMPILE: utils/useragent.c COMPILE: utils/url.c COMPILE: utils/talloc.c COMPILE: utils/messages.c COMPILE: utils/log.c COMPILE: utils/locale.c COMPILE: utils/http.c COMPILE: utils/hashtable.c COMPILE: utils/filepath.c COMPILE: utils/filename.c COMPILE: utils/container.c COMPILE: utils/base64.c COMPILE: render/textplain.c COMPILE: render/table.c render/table.c:419:4: warning: Value stored to 'a_src' is never read a_src = b_src; ^ ~ render/table.c:365:4: warning: Value stored to 'a_src' is never read a_src = b_src; ^ ~ render/table.c:602:4: warning: Value stored to 'a_src' is never read a_src = b_src; ^ ~ render/table.c:646:23: warning: Access to field 'parent' results in a dereference of a null pointer (loaded from variable 'row') struct box *group = row-parent; ^~~ render/table.c:687:4: warning: Value stored to 'a_src' is never read a_src = b_src; ^ ~ 5 warnings generated. COMPILE: render/list.c COMPILE: render/layout.c render/layout.c:660:9: warning: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'box') box = box-next; ^~~ render/layout.c:3950:41: warning: Division by zero extra = 1 + (cell-min_width - min) / ^ 2 warnings generated. COMPILE: render/imagemap.c COMPILE: render/hubbub_binding.c render/hubbub_binding.c:471:15: warning: Assigned value is always the same as the existing value n-_private = (void *) (++count); ~~~ ^ ~~ render/hubbub_binding.c:476:15: warning: Assigned value is always the same as the existing value n-_private = (void *) (++count); ~~~ ^ ~~ render/hubbub_binding.c:492:15: warning: Assigned value is always the same as the existing value n-_private = (void *) (--count); ~~~ ^ ~~ render/hubbub_binding.c:499:15: warning: Assigned value is always the same as the existing value n-_private = (void *) (--count); ~~~ ^ ~~ 4 warnings generated. COMPILE: render/html_redraw.c COMPILE: render/html_interaction.c render/html_interaction.c:248:4: warning: Value stored to 'overflow' is never read overflow = css_computed_overflow(box-style); ^ ~ 1 warning generated. COMPILE: render/html.c COMPILE: render/form.c render/form.c:913:3: warning: Value stored to 'scroll' is never read scroll = 0; ^~ render/form.c:928:6: warning: Value stored to 'scroll' is never read scroll = (i + 1) * ^~ 2 warnings generated. COMPILE: render/font.c COMPILE: render/box_normalise.c COMPILE: render/box_construct.c COMPILE: render/box.c render/box.c:128:41: warning: The left operand to '|' is always 0 box-flags = style_owned ? (box-flags | STYLE_OWNED) : box-flags; ~~ ^ 1 warning generated. COMPILE: image/webp.c COMPILE: image/svg.c COMPILE: image/rsvg.c COMPILE: image/png.c COMPILE: image/nssprite.c COMPILE: image/mng.c COMPILE: image/jpeg.c COMPILE: image/image.c COMPILE: image/ico.c COMPILE: image/gif.c COMPILE:
Re: Review: Content factory
On Wed, May 04, 2011 at 10:33:08PM +0100, John-Mark Bell wrote: Precis: This changeset introduces a content factory with which content handlers may be dynamically registered. Additionally, it inverts the inheritance model of contents such that each content handler becomes self-contained. schweeet! as usual my review will be inline and I shall elide any bits I have no comment on Index: render/html_internal.h === --- /dev/null 2009-04-16 19:17:07.0 +0100 +++ render/html_internal.h2011-05-04 22:29:08.0 +0100 @@ -0,0 +1,103 @@ +/* + * Copyright 2004 James Bursa bu...@users.sourceforge.net really? I think its 2011 and you added this file ;-) maybe its a move tho? + +/** Data specific to CONTENT_HTML. */ +typedef struct html_content { + struct content base; + + void *parser_binding; + xmlDoc *document; + binding_quirks_mode quirks; /** Quirkyness of document */ + + char *encoding; /** Encoding of source, 0 if unknown. */ + binding_encoding_source encoding_source; + /** Source of encoding information. */ + + char *base_url; /** Base URL (may be a copy of content-url). */ + char *base_target; /** Base target */ + + struct box *layout; /** Box tree, or 0. */ + colour background_colour; /** Document background colour. */ + const struct font_functions *font_func; + + /** Number of entries in stylesheet_content. */ + unsigned int stylesheet_count; + /** Stylesheets. Each may be 0. */ + struct html_stylesheet *stylesheets; + /** Style selection context */ + css_select_ctx *select_ctx; + + /** Number of entries in object_list. */ + unsigned int num_objects; + /** List of objects. */ + struct content_html_object *object_list; + /** Forms, in reverse order to document. */ + struct form *forms; + /** Hash table of imagemaps. */ + struct imagemap **imagemaps; + + /** Browser window containing this document, or 0 if not open. */ + struct browser_window *bw; + + /** Frameset information */ + struct content_html_frames *frameset; + + /** Inline frame information */ + struct content_html_iframe *iframe; + + /** Content of type CONTENT_HTML containing this, or 0 if not an object + * within a page. */ + struct html_content *page; + /** Box containing this, or 0 if not an object. */ + struct box *box; +} html_content; gah make a decision on before or after doccomments within one struct ;-) and are we saying 0 or NULL for empty ponters? + + +bool html_fetch_object(html_content *c, const char *url, struct box *box, + content_type permitted_types, + int available_width, int available_height, + bool background); + +void html_set_status(html_content *c, const char *extra); + +/* in render/html_redraw.c */ +bool html_redraw(struct content *c, int x, int y, + int width, int height, const struct rect *clip, + float scale, colour background_colour); + +/* in render/html_interaction.c */ +void html_mouse_track(struct content *c, struct browser_window *bw, + browser_mouse_state mouse, int x, int y); +void html_mouse_action(struct content *c, struct browser_window *bw, + browser_mouse_state mouse, int x, int y); +void html_overflow_scroll_callback(void *client_data, + struct scroll_msg_data *scroll_data); + +#endif no doccomments? Index: image/image.c === --- /dev/null 2009-04-16 19:17:07.0 +0100 +++ image/image.c 2011-05-04 22:29:39.0 +0100 + +nserror image_init(void) +{ comment? or at least a ref to the header? + +void image_fini(void) ditto Index: content/content_factory.c === --- /dev/null 2009-04-16 19:17:07.0 +0100 +++ content/content_factory.c 2011-05-04 22:30:17.0 +0100 file comment? + +typedef struct content_handler_entry { + struct content_handler_entry *next; + + lwc_string *mime_type; + const content_handler *handler; +} content_handler_entry; whassat for then? comment teh struct a bit? tbh i shall shut up about comments now, its boring + +static content_handler_entry *content_handlers; + +nserror content_factory_register_handler(lwc_string *mime_type, + const content_handler *handler) +{ + content_handler_entry *e; e? really? perhaps entry might have been a little less brief? + +content_type content_factory_type_from_mime_type(const char *mime_type) +{ + const content_handler *handler; + lwc_string *imime_type; + lwc_error lerror; + content_type type; + + lerror = lwc_intern_string(mime_type,
Netsurf committee
I would like to second the nomination of Michael to remain as Chair and John-Mark to remain as Treasurer. I would also like to nominate Daniel to remain as Secretary. -- Regards Vincent http://www.kyllikki.org/
Re: Windows port polling
On Mon, Feb 07, 2011 at 03:28:05PM -, Richard Wilson wrote: Hi All, The Windows' port currently never idles in gui_poll, causing it to use all available processing power. One solution is to update windows/schedule.c to Thank you for reporting this issue. I have created a win32 TODO list http://wiki.netsurf-browser.org/Todo/Win32 on the NetSurf wiki to keep track, please feel free to extend this. One thing to mention from our IRC discussions is that your native build is currently unique and exhibiting some issues which are not present in the cross compiled versions. I currently test most often under wine (win 2k and xp profiles) and a real Vista box but would welcome reports for other windows versions, please do include this information explicitly as issues do appear to be very different between windows editions. match it's framebuffer counterpart (to return the time until next scheduled event), and then simply extend gui_poll to: I have implemented a version of your proposed change which is more in line with what is done in the framebuffer port (commited to SVN). In future it might help if you could you present your code as unified diffs (diff -u) in mailing list posts as that helps to see whats changed and means I can apply the proposed changes exactly. A couple of points about your solution: Timers appear to be repeating objects and a new instance is created if the NULL hwnd is used. As we only require them to be one shot we need to kill them if we create one. I verified by noting windows runs out of timers for this application and cpu load goes to 100% with repeating timer calls. Because the scheduler can dispatch events which invalidate the active flag passed to gui_poll() we must account for this by not blocking on input when the schedule_run() call returns a non negative timeout. One thing to note here is that while the current scheduling code (see framebuffer/schedule.c) states that the time until next event is in centiseconds, it's actually milliseconds. Any comments? yes the comments were wrong and incomplete, I have updated them to be more comprehensive. -- Regards Vincent http://www.kyllikki.org/ signature.asc Description: Digital signature
Re: netsurf-revision-11608
Firstly, please do try to use a better subject, I thought this was spam to begin with ;-) On Thu, Feb 03, 2011 at 02:42:54PM +0100, szukw...@arcor.de wrote: Loading a small, simple HTML page failed I use {hubbub,libcss,libdom,libnsbmp,libnsgif, libparserutils,libwapcaplet, netsurf}-revision-11608 ok thats all fine winfried --- Reading symbols from /sources/CSS/NETSURF/netsurf-revision-11608/nsgtk...done. (gdb) run test.html Starting program: /sources/CSS/NETSURF/netsurf-revision-11608/nsgtk test.html [Thread debugging using libthread_db enabled] as an observation, this will never actually load that file. file uri must be of the form file:///path/to/your/file/test.html we currently do not fix up broken URI Program received signal SIGSEGV, Segmentation fault. 0xb726f293 in strncmp () from /lib/tls/libc.so.6 (gdb) frame 14 The gdb command bt and where are your friends, a forwards backtrace is a little amusing :-) but thanks for actualy taking the time to run gdb. #14 0x080b4567 in main (argc=2, argv=0xbfffee24) at gtk/gui.c:595 (gdb) frame 13 #13 0x080b3dd7 in gui_init (argc=2, argv=0xbfffee24, respath=0x81edc80) at gtk/gui.c:451 (gdb) frame 12 #12 0x080b35e1 in nsgtk_init_glade (respath=0x81edc80) at gtk/gui.c:323 (gdb) frame 11 #11 0x080b3501 in nsgtk_new_glade (respath=0x81edc80, name=0x8162389 netsurf, pglade=0x0) at gtk/gui.c:295 (gdb) frame 10 #10 0xb78e9a75 in glade_xml_new (fname=0x825c480 /usr/local/share/netsurf/netsurf.glade, root=0x0, domain=0x0) at glade-xml.c:117 ok so we have descended into GTK proper at this point. My only idea is that the installed file in /usr/local/share/netsurf/netsurf.glade is corrupt or contains an otherwise invalid glade file, possibly from an old installation. You are running the head version and probably ought to ensure any old versions are uninstalled and use the NETSURFRES environment variable to control which resources are being used (for development purposes) (gdb) frame 9 #9 0xb78e9b29 in glade_xml_construct (self=0x820e840, fname=0x825c480 /usr/local/share/netsurf/netsurf.glade, root=0x0, domain=0x0) at glade-xml.c:145 (gdb) frame 8 #8 0xb78f0cee in glade_parser_parse_file (file=0x825c480 /usr/local/share/netsurf/netsurf.glade, domain=0x0) at glade-parser.c:1226 (gdb) frame 7 #7 0xb7e0019a in xmlSAXUserParseFile () from /usr/lib/libxml2.so.2 (gdb) frame 6 #6 0xb7de9379 in xmlCreateFileParserCtxt () from /usr/lib/libxml2.so.2 (gdb) frame 5 #5 0xb7de92d1 in xmlCreateURLParserCtxt () from /usr/lib/libxml2.so.2 (gdb) frame 4 #4 0xb7e11ad3 in xmlLoadExternalEntity () from /usr/lib/libxml2.so.2 (gdb) frame 3 #3 0xb7de4eb1 in xmlNewInputFromFile () from /usr/lib/libxml2.so.2 (gdb) frame 2 #2 0xb7e1167a in xmlParserInputBufferCreateFilename () from /usr/lib/libxml2.so.2 (gdb) frame 1 #1 0xb7e115fb in __xmlParserInputBufferCreateFilename () from /usr/lib/libxml2.so.2 (gdb) frame 0 #0 0xb726f293 in strncmp () from /lib/tls/libc.so.6 (gdb) -- -- Regards Vincent http://www.kyllikki.org/
hsl() color still broken
with the changes from jmb/tlsa and split out...still doesnt work, if anything its worse than before :-( -- Regards Vincent http://www.kyllikki.org/ Index: test/data/parse/colours.dat === --- test/data/parse/colours.dat (revision 11426) +++ test/data/parse/colours.dat (working copy) @@ -40,6 +40,37 @@ | 0x0218 0x #reset +## test HSL + + +## red +#data +* { color: hsl(0, 100%, 50%) } +#errors +#expected +| 1 * +| 0x0218 0x +#reset + +## green +#data +* { color: hsl(120, 100%, 50%) } +#errors +#expected +| 1 * +| 0x0218 0xff00ff00 +#reset + +## blue +#data +* { color: hsl(240, 100%, 50%) } +#errors +#expected +| 1 * +| 0x0218 0xffff +#reset + + ## Out-of-range rgb() parameters #data Index: src/parse/propstrings.h === --- src/parse/propstrings.h (revision 11426) +++ src/parse/propstrings.h (working copy) @@ -84,7 +84,7 @@ NE_RESIZE, NW_RESIZE, N_RESIZE, SE_RESIZE, SW_RESIZE, S_RESIZE, W_RESIZE, LIBCSS_TEXT, WAIT, HELP, PROGRESS, SERIF, SANS_SERIF, CURSIVE, FANTASY, MONOSPACE, MALE, FEMALE, CHILD, MIX, UNDERLINE, OVERLINE, - LINE_THROUGH, BLINK, RGB, RGBA, LIBCSS_LEFT, LIBCSS_CENTER, + LINE_THROUGH, BLINK, RGB, RGBA, HSL, HSLA, LIBCSS_LEFT, LIBCSS_CENTER, LIBCSS_RIGHT, /* Named colours */ Index: src/parse/propstrings.c === --- src/parse/propstrings.c (revision 11426) +++ src/parse/propstrings.c (working copy) @@ -331,6 +331,8 @@ { blink, SLEN(blink) }, { rgb, SLEN(rgb) }, { rgba, SLEN(rgba) }, + { hsl, SLEN(hsl) }, + { hsla, SLEN(hsla) }, { -libcss-left, SLEN(-libcss-left) }, { -libcss-center, SLEN(-libcss-center) }, { -libcss-right, SLEN(-libcss-right) }, Index: src/parse/properties/utils.c === --- src/parse/properties/utils.c(revision 11426) +++ src/parse/properties/utils.c(working copy) @@ -248,7 +248,126 @@ return error; } +#define INTEGER_HSL + +#if defined(INTEGER_HSL) /** + * Convert Hue Sauration Lightness value to RGB integer version + * + * \param hue Hue in degrees 0..360 + * \param sat Saturation value in percent 0..100 + * \param lit Lightness value in percent 0..100 + * \param r red component + * \param g green component + * \param b blue component + */ +static void HSL_to_RGB(int32_t hue, int32_t sat, int32_t lit, uint8_t *r, uint8_t *g, uint8_t *b) +{ + int v; + int m; + int sextant; + int fract, vsf, mid1, mid2; + int red,green,blue; + + hue = (hue * 1023) / 360; + sat = (sat * 1023) / 100; + lit = (lit * 1023) / 100; + + if (lit 511) + v = (lit * (512 + sat)) 10; + else + v = (((lit + sat) 10) - lit * sat) 10; + + if (v = 0) { + *r = *g = *b = 0; + return; + } + + m = lit + lit - v; + hue *= 6; + sextant = hue 10; + fract = hue - (sextant 10); + vsf = v * fract * (v - m) / v 10; + mid1 = m + vsf; + mid2 = v - vsf; + +#define ORGB(R,G,B) red = (R)2; green = (G)2; blue = (B)2 + switch (sextant) { + case 0: ORGB(v, mid1, m); break; + case 1: ORGB(mid2, v, m); break; + case 2: ORGB(m, v, mid1); break; + case 3: ORGB(m, mid2, v); break; + case 4: ORGB(mid1, m, v); break; + case 5: ORGB(v, m, mid2); break; + } +#undef ORGB + *r = red; + *g = green; + *b = blue; +} + +#else + +/* CSS standard definition + + HOW TO RETURN hsl.to.rgb(h, s, l): + SELECT: + l=0.5: PUT l*(s+1) IN m2 + ELSE: PUT l+s-l*s IN m2 + PUT l*2-m2 IN m1 + PUT hue.to.rgb(m1, m2, h+1/3) IN r + PUT hue.to.rgb(m1, m2, h) IN g + PUT hue.to.rgb(m1, m2, h-1/3) IN b + RETURN (r, g, b) + + HOW TO RETURN hue.to.rgb(m1, m2, h): + IF h0: PUT h+1 IN h + IF h1: PUT h-1 IN h + IF h*61: RETURN m1+(m2-m1)*h*6 + IF h*21: RETURN m2 + IF h*32: RETURN m1+(m2-m1)*(2/3-h)*6 + RETURN m1 +*/ +static inline int hue_to_RGB(float m1, float m2, float h) +{ + h = (h 0) ? h + 1 : h; + h = (h 1) ? h - 1 : h; + + if (h * 6 1) return m1 + (m2 - m1) * h * 6; + if (h * 2 1) return m2; + if (h * 3 2) return m1 + (m2 - m1) * (2/3 - h) * 6; + return m1; +} + +/** + * Convert Hue Sauration Lightness value to RGB float version from CSS standard + * + * \param hue Hue in degrees 0..360 + * \param sat Saturation value in percent 0..100 + * \param lit Lightness value in percent 0..100 + * \param r red component + * \param g green component + * \param b blue component + */ +static void HSL_to_RGB(int32_t hue, int32_t sat, int32_t lit, uint8_t *r, uint8_t *g, uint8_t *b) +{ +
Re: url.c patch
On Thu, Nov 11, 2010 at 11:48:32AM +, Richard Kenyon wrote: Hi, I've written the following patch for NetSurf. This should replace 'bool url_host_is_ip_address(const char *host)' in 'utils/url.c' see commit 10951 for my version (attached too) as the caller to this is exclusively in content/urldb.c which needs *extensive* fiddling to be made ipv6 capable right now I am punting the v6 decision untill later. -- Regards Vincent http://www.kyllikki.org/ Index: utils/url.c === --- utils/url.c (revision 10950) +++ utils/url.c (working copy) @@ -77,39 +77,29 @@ /** - * Check whether a host is an IP address + * Check whether a host string is an IPv4 dotted quad address of the + * format XXX.XXX.XXX.XXX * - * \param hosta hostname terminated by '\0' or '/' + * @todo This *should* be implemented with inet_pton but that requires + * implementing compatability glue for several operating systems. + * + * \param host a hostname terminated by '\0' or '/' * \return true if the hostname is an IP address, false otherwise */ bool url_host_is_ip_address(const char *host) { - int b; - bool n; + unsigned int b1, b2, b3, b4; + unsigned char c; - assert(host); + if (strspn(host, 0123456789.) strlen(host)) + return false; - /* an IP address is of the format XXX.XXX.XXX.XXX, ie totally -* numeric with 3 full stops between the numbers */ - b = 0; // number of breaks - n = false; // number present - do { - if (*host == '.') { - if (!n) - return false; - b++; - n = false; - } else if ((*host == '\0') || (*host == '/')) { - if (!n) - return false; - /* todo: check the values are in 0-255 range */ - return (b == 3); - } else if (*host '0' || *host '9') { - return false; -} else { - n = true; -} -host++; -} while (1); + if (sscanf(host, %3u.%3u.%3u.%3u%c, b1, b2, b3, b4, c) != 4) + return false; + + if ((b1 255) || (b2 255) || (b3 255) || (b4 255)) + return false; + + return true; } /**
Re: RFC: WebP support in NetSurf (patch)
On Sat, Oct 02, 2010 at 08:29:44PM +, Chris Young wrote: Hi all As I'm sure you're aware, Google announced a new image format a couple of days ago, intended to replace JPEG for images on the web. I've been playing around with it, and although we don't know yet whether it will take off, I thought it would be fun to make NetSurf one of the first (if not _the_ first) web browser to support the new format. The attached patch adds this support, using Google's libwebp (which is actually the source code file webpimg.c I've dropped in - with minor tweaks - it doesn't build itself as a real library). Caveats: 1. The conversion is an endian-aware conversion to RGBA. This is fine for big-endian platforms, but on little-endian the byte order will be wrong for NetSurf. 2. It requires libvpx. Much porting fun. For those reasons I've enabled support for WebP only on the Amiga platform build - that's all I'm in a position to test at the moment. I suggest testing and enabling/adding the makefile/makefile.defaults lines on a platform-by-platform basis. If everybody is happy I'll commit it. firstly, cool! it works (for the three images i could find ;-) I would prefer to see a libnswebp and have netsurf use the library, that way its decoupled from googles code and them changing their mind ;-) Also allows us to separate the licencing just in case of issues. -- Regards Vincent http://www.kyllikki.org/
Re: Review: treeview-redux [1/7] -- core changes
review reply part three, this concludes the core review Index: desktop/tree.h +/* Tree flags */ +#define TREE_NO_FLAGS 0 +#define TREE_NO_DRAGS 1 +#define TREE_NO_FURNITURE 2 +#define TREE_SINGLE_SELECT 4 +#define TREE_NO_SELECT 8 +#define TREE_MOVABLE 16 +/* if the last child of a directory is deleted the directory will be deleted + too */ +#define TREE_DELETE_EMPTY_DIRS 16 It'd be nice if these flags were an enum too. /* Tree flags */ enum tree_flags { TREE_NO_FLAGS = 0, TREE_NO_DRAGS = 1, TREE_NO_FURNITURE = 2, TREE_SINGLE_SELECT = 4, TREE_NO_SELECT = 8, TREE_MOVABLE = 16, TREE_DELETE_EMPTY_DIRS = 32, /** if the last child of a * directory is deleted the * directory will be deleted * too. */ }; +/* the flag for the first node_element in every node, all other flags should + be different than this one */ +#define TREE_ELEMENT_TITLE 0x00 How can zero be a flag?! /** A flag value to indicate the element data contains title * text. This value should be the first node_element in every * node. All other values should be different than this one. The term * flag is misused as it is actually a value used by the API consumer * to indicate teh type of data a node element contains. */ #define TREE_ELEMENT_TITLE 0x00 +/* these should be defined in front end code */ +extern const char tree_directory_icon_name[]; +extern const char tree_content_icon_name[]; Let's have a function for the frontend: sorry I dont get what you mean? typedef enum { + NODE_ELEMENT_TEXT, /* Text only */ + NODE_ELEMENT_TEXT_PLUS_ICON,/* Text and icon */ + NODE_ELEMENT_BITMAP /* Bitmap only */ } node_element_type; Not doccommented? changed +typedef enum { + NODE_DELETE_ELEMENT_TXT,/* The text of an element of the node + is being deleted */ + NODE_DELETE_ELEMENT_IMG,/* The bitmap or icon of a node is being + deleted */ + NODE_LAUNCH,/* The node has been launched */ + NODE_ELEMENT_EDIT_FINISHING,/* New text has to be accepted or + rejected */ + NODE_ELEMENT_EDIT_FINISHED /* Editing of a node_element has been + finished */ +} node_msg; Ditto done +typedef enum { + NODE_CALLBACK_HANDLED, + NODE_CALLBACK_NOT_HANDLED, + NODE_CALLBACK_REJECT, /* reject new text for node element and + leave editing mode */ + NODE_CALLBACK_CONTINUE /* don't leave editig mode */ +} node_callback_resp; Ditto ditto +struct node_msg_data { + node_msg msg; + unsigned int flag; + struct node *node; + union { + char *text; + void *bitmap; + } data; }; Ditto. done +struct treeview_table { + void (*redraw_request)(int x, int y, int width, int height, + void *data); + void (*resized)(struct tree *tree, int width, int height, + void *data); + void (*scroll_visible)(int y, int height, void *data); + void (*get_window_dimensions)(int *width, int *height, void *data); }; Ditto done Index: desktop/options.c + { tree_icons_dir, OPTION_STRING, option_tree_icons_dir }, Why is this an option?! Surely it's the job of the frontend to decide where these resources are? dont know, require futher discussion/decision as to how to change it Index: content/urldb.c +void urldb_iterate_cookies(bool (*callback)(const struct cookie_data *data)) Typedef for that callback type *please* + bool (*cookie_callback)(const struct cookie_data *data)) Although I see it's not the style in this file :-( it is not, urldb needs a serious refactor all on its own so i shall refrain untill that happens. // LOG((%p: %s=%s, c, c-name, c-value)); No C++ style comments please. This is core code. all removed -- Regards Vincent http://www.kyllikki.org/ signature.asc Description: Digital signature
Re: Review: treeview-redux [1/7] -- core changes
ok thats the response for the first few bits...on to the next bit now but I have not addressed some stuff which probably could do with an answer. On Fri, Sep 24, 2010 at 04:27:14PM +0100, Daniel Silverstone wrote: On Thu, Sep 23, 2010 at 10:09:24PM +0100, John-Mark Bell wrote: Precis: This is part of the treeview-redux patchset. It incorporates the changes on that branch today. I will be reviewing this mostly for glaring hideousness. Any minor niggles that I raise can be merged and fixed-up on trunk as we clean up any implementation hiccoughs. Index: Docs/09-treeview As jmb said, this should eventually be transferred to the wiki and removed from here. http://wiki.netsurf-browser.org/Documentation/Treeview file removed Index: desktop/sslcert.c +#define TREE_ELEMENT_SSL_VERSION 0x01 +#define TREE_ELEMENT_SSL_VALID_FROM0x02 +#define TREE_ELEMENT_SSL_VALID_TO 0x03 +#define TREE_ELEMENT_SSL_CERT_TYPE 0x04 +#define TREE_ELEMENT_SSL_SERIAL0x05 +#define TREE_ELEMENT_SSL_ISSUER0x06 It feels like this should be an enum. enum tree_element_ssl{ TREE_ELEMENT_SSL_VERSION = 0x01, TREE_ELEMENT_SSL_VALID_FROM = 0x02, TREE_ELEMENT_SSL_VALID_TO = 0x03, TREE_ELEMENT_SSL_CERT_TYPE = 0x04, TREE_ELEMENT_SSL_SERIAL = 0x05, TREE_ELEMENT_SSL_ISSUER = 0x06, }; *however* it is passed as an opaque unsigned int flag to tree.c:tree_create_node_element() and I cannot see a simple way to structure safe data type all the way through from the enum +struct sslcert_session_data { + unsigned long num; + char *url; + struct tree *tree; + nserror (*cb)(bool proceed, void *pw); I'd like to see this typedef'd but it's not critical. done in sslcert.h as its part of the exported interface Also, this entire struct could do with documenting as 'num' and 'tree' aren't terribly obvious names for things. I have not changed teh names, but I have docuemnted them. /** ssl certificate verification context. */ struct sslcert_session_data { unsigned long num; /** The number of ssl certificates in the chain */ char *url; /** The url of the certificate */ struct tree *tree; /** The root of the treeview */ sslcert_session_callback cb; /** callback when cert is accepted or rejected */ void *cbpw; /** context passed to callback */ }; +static hlcache_handle *sslcert_icon; This fills me with the heebie jeebies. Yes, a higher level decision needs to be made. Can we return to this later. I have added a doccomment +bool sslcert_load_tree(struct tree *tree, const struct ssl_cert_info *certs, + struct sslcert_session_data *data) ... + long i; ... + for (i = 0; i (long)data-num; i++) { Why not 'unsigned long i' ? changed, also neatened the loop variable name unsigned long cert_loop; +struct node *sslcert_create_node(const struct ssl_cert_info *cert) +{ + struct node *node; + struct node_element *element; + char buffer[356]; + char *text; + + + snprintf(buffer, 356, messages_get(Subject), cert-subject); This 356 is amazingly magical and scary. What is it all about? If it's some kind of maximum that the certificate COULD hold, then we should be assert()ing the strlen() before we do anything else. Also, since messages_get(Subject) might easily exceed that we need something better here I think. I know it's safe but that doesn't make it *good*. ok I changed all these to use a messages_get_buff() and completely removed teh buffer and its scary sizeing. Also, the name 'Subject' is really nasty. Can it be changed to SSL_Certificate_Subject or similar? by your command imperious leader + text = strdup(buffer); This idiom is found throughout NetSurf with regard to messages. Perhaps we should look at a messages_strdup_printf(token, ...) function? I called it messages_get_buff() though + snprintf(buffer, 356, messages_get(Issuer), cert-issuer); + text = strdup(buffer); All the above apply for this. done + snprintf(buffer, 356, messages_get(Version), cert-version); + text = strdup(buffer); And this done + snprintf(buffer, 356, messages_get(ValidFrom), + cert-not_before); + text = strdup(buffer); And this. done + snprintf(buffer, 356, messages_get(ValidTo), cert-not_after); + text = strdup(buffer); And this + snprintf(buffer, 356, messages_get(Type), cert-cert_type); + text = strdup(buffer); And this. done + snprintf(buffer, 356, messages_get(Serial), cert-serial); + text = strdup(buffer); And this. done +void sslcert_clanup_session(struct sslcert_session_data *session) This function needs a spellchecker applying :-) renamed Index:
Re: Review: treeview-redux [1/7] -- core changes
Here we go with the next bit. Only tree.h to go, gonna try and sleep though, gnight +bool tree_url_load(const char *filename, struct tree *tree, + tree_node_user_callback callback, void *callback_data) +{ + xmlDoc *doc; + xmlNode *html, *body, *ul; + struct node *root; + + doc = htmlParseFile(filename, iso-8859-1); Erm, eww!?!?! iso-8859-1 ? Why the hell are we not storing all of our data in utf-8 ? I have no idea Also url_load and filename? Seems confusing to me. as mentioned before i changed these to tree_urlfile_load +void tree_url_load_directory(xmlNode *ul, struct tree *tree, + struct node *directory, tree_node_user_callback callback, + void *callback_data) +{ + char *title; + struct node *dir; + xmlNode *n; + + assert(ul); Assert ul is what? assert(ul != NULL); + assert(directory); Assert directory is what? assert(directory != NULL); + if (!n || strcmp((const char *) n-name, ul) != 0) { !n? I chnaged it to xmlnode and that specifically to if ((xmlnode == NULL) || strcmp((const char *)xmlnode-name, ul) != 0) { +void tree_url_load_entry(xmlNode *li, struct tree *tree, + struct node *directory, tree_node_user_callback callback, + void *callback_data) + for (n = li-children; n; n = n-next) { n? xmlnode + if (!url1 || !title) { !url1? !title? I read that as not hurl I am only just complying if ((url1 == NULL) || (title == NULL)) { +xmlNode *tree_url_find_xml_element(xmlNode *node, const char *name) +{ + xmlNode *n; changed n to xmlnode + if (!node) + return 0; Erm, either assert(node != NULL) or compare to NULL and return NULL if not available. This combination of treating node as a boolean and returning an integer instead of a pointer truly upsets me. xmlNode *xmlnode; if (node == NULL) return NULL; + for (n = node-children; + n !(n-type == XML_ELEMENT_NODE n? xmlnode +bool tree_url_save(struct tree *tree, const char *filename, + const char *page_title) +{ + /* Unfortunately the Browse Hotlist format is invalid HTML, +* so this is a lie. */ Aah so perhaps we're iso-8859-1 to be browse compatible. Is it time to drop that crap and store something more efficient, correctly structured and utf-8 ? possibly but thats a bit outside teh scope of this code review :-/ + doc-charset = XML_CHAR_ENCODING_UTF8; + res = htmlSaveFileEnc(filename, doc, iso-8859-1); Urgh, ick, OMG, pain in my eyes as blood once again spewws forth. yah...not fixed +bool tree_url_save_directory(struct node *directory, xmlNode *node) +{ + if (!ul) ul is not what? if (ul == NULL) return false; + for (child = tree_node_get_child(directory); child; child? swhat it says...gimmie a clue and i can fix it + if (!h4) h4 is not what? if (h4 == NULL) return false; +bool tree_url_save_entry(struct node *entry, xmlNode *node) +{ + if (!li) li is not what? if (li == NULL) return false; + if (!a) a is not what? if (a == NULL) return false; + if (!href) href is not what? if (href == NULL) return false; Index: !NetSurf/Resources/de/Messages I'm going to skip all the messages files because I can't usefully review them at this time. Index: Makefile.sources Do we need an S_TREEVIEW ? possibly, dunno what should go in it though Index: desktop/tree.c +struct node_element_box { All these structs have comments, but aren't doccommented. changed +struct node *tree_create_folder_node(struct tree *tree, struct node *parent, + const char *title, bool editable, bool retain_in_memory, + bool deleted) +{ struct node *node; + assert(title); assert that title is what? you know you can go off people? changed +struct node *tree_create_leaf_node(struct tree *tree, struct node *parent, + const char *title, bool editable, bool retain_in_memory, + bool deleted) +{ + struct node *node; + assert(title); Assert title is what? o/~ you can leave it all behind and sail and sail to Lahaina, o/~ Just like the missionaries did, so many years ago assert(title != NULL); +void tree_link_node(struct tree *tree, struct node *link, struct node *node, + bool before) +{ + struct node *parent; + bool sort = false; + + assert(link); assert(node); Assert that these are what? A rubber duckky! assert(link != NULL); assert(node != NULL); + if ((!link-folder) || (before)) { link-folder is not what? A spatula! if ((link-folder ==
2.6 Release
Well its that time again, time for a new release. The 2.6 release is primarily going to be for bugs discovered after the 2.5 release. The http://wiki.netsurf-browser.org/NetSurf_2.6 page covers the known issues which need fixing before the release. If there are any known problems missing from there now is the time to let us know! Nothing huge has been altered, For details Michael has prepared a pelimanary changelog. Please can people test the current trunk release. I intend to branch 2.6 sometime during the weekend unless a showstopper bug comes up. -- Regards Vincent signature.asc Description: Digital signature
Re: Review: Review: branches/vince/netsurf-file-fetcher
Sigh, ok, ok I give in, commited a less sophisticated version, does not assume it can use open() on anything except plain files. Only uses opendir() on directories and specifically avoids using any expected clib behaviour introduced in the last couple of decades. I updated the url_to_path of some frontends in the vauge hope using the url lib is a bit more correct than their previously implementations. Should fix all your points from below. On Sat, Sep 11, 2010 at 06:44:27PM +0100, Chris Young wrote: Firstly, this has the same problem as the old libcurl file fetcher, in that it insists on opening every file prepended with a slash. The fix for that particular issue is this: --8-- Index: content/fetchers/fetch_file.c === --- content/fetchers/fetch_file.c (revision 10754) +++ content/fetchers/fetch_file.c (working copy) @@ -135,8 +135,8 @@ if (ctx == NULL) return NULL; - res = url_path(url, path); - if (res != URL_FUNC_OK) { + path = url_to_path(url); + if (path == NULL) { free(ctx); return NULL; } --8-- I've not committed that change myself as I'm not in a position to test on other platforms, but it should work as it asks the platform code what the path is instead of assuming. Secondly, the following doesn't work as expected on AmigaOS and probably doesn't work on anything that isn't UNIX-derived: +/* process a file fetch */ +static void fetch_file_process(struct fetch_file_context *ctx) +{ + ctx-fd = open(ctx-path, O_RDONLY); + if (ctx-fd 0) { + /* process errors as appropriate */ [...] + if (S_ISDIR(ctx-fstat.st_mode)) { + /* directory listing */ + fetch_file_process_dir(ctx); + return; + } The issue is that if you open() a directory, it branches off to report an error (you can't open() directories) before getting to S_ISDIR() - so that code never executes. S_ISDIR would fail anyway as there would be no file descriptor to pass to it. I would guess that anything which doesn't have fdopendir() would also not be able to open() a directory. If open() fails, opendir() should be called. Only if that reports an error should the error branch be taken. This should also resolve this comment: /* this poses the possibility of a race where the directory * has been removed from the namespace or resources for more * fd are now unavailable between the previous open() and this * call. */ close(fd); scandir = opendir(ctx-path); opendir() has already been called if fdopendir() is not available, just needs the pointer stored somewhere where the directory parser can get to it (being passed into the function would probably suffice) Chris -- Regards Vincent http://www.kyllikki.org/
Re: Review: branches/vince/netsurf-file-fetcher
+ +/* file: URL handling. Based on the data fetcher by Rob Kendrik */ Kendrick. Bugger, fixed, sorry Rob + + ctx-locked = true; + fetch_send_callback(FETCH_HEADER, ctx-fetchh, header, strlen(header), FETCH_ERROR_NO_ERROR); + ctx-locked = false; Call fetch_file_send_callback, instead? hmm, ok, another function call but yeah its cleaner, changed + + LOG((%s, header)); Presumably redundant now? removed + ctx-locked = true; + fetch_send_callback(FETCH_HEADER, ctx-fetchh, header, strlen(header), FETCH_ERROR_NO_ERROR); + ctx-locked = false; fetch_file_send_callback? changed + return ctx-aborted; +} + +/** callback to initialise the file fetcher. */ +static bool fetch_file_initialise(const char *scheme) +{ + LOG((fetch_file_initialise called for %s, scheme)); + return true; +} + +/** callback to initialise the file fetcher. */ +static void fetch_file_finalise(const char *scheme) +{ + LOG((fetch_file_finalise called for %s, scheme)); +} This logging is probably unnecessary now. removed +/** callback to set up a file fetch context. */ +static void * +fetch_file_setup(struct fetch *fetchh, +const char *url, +bool only_2xx, +const char *post_urlenc, +const struct fetch_multipart_data *post_multipart, +const char **headers) +{ + struct fetch_file_context *ctx = calloc(1, sizeof(*ctx)); + char *path; + + if (ctx == NULL) + return NULL; + + ctx-fetchh = fetchh; + + ctx-url = strdup(url); + + url_path(url, path); + if (path == NULL) { Ensure URL_FUNC_OK here res = url_path(url, path); if (res != URL_FUNC_OK) { free(ctx); return NULL; } free(ctx-url); I moved the allocation after these checks + free(ctx); + return NULL; + } + + url_unescape(path, ctx-path); + if (ctx-path == NULL) { Ensure URL_FUNC_OK here res = url_unescape(path, ctx-path); free(path); if (res != URL_FUNC_OK) { free(ctx); return NULL; } free(ctx-url); moved allocation after + free(ctx); + return NULL; + } + + free(path); + + RING_INSERT(ring, ctx); + + LOG((new context %p for fetch handle %p, url %s, path %s, +ctx, fetchh, ctx-url, ctx-path)); + LOG((only_2xx %d, post_urlenc %s, post_multipart %p, headers %p, +only_2xx, post_urlenc, post_multipart, headers)); Lose this logging? gone ;-) + return ctx; +} + +/** callback to free a file fetch */ +static void fetch_file_free(void *ctx) +{ + struct fetch_file_context *c = ctx; + LOG((context %p,ctx)); Ditto gonned fd? I took your suggestion and removed fd and fstat from the structure, its now passed + free(c-url); + free(c-path); + RING_REMOVE(ring, c); + free(ctx); +} + +/** callback to start a file fetch */ +static bool fetch_file_start(void *ctx) +{ + LOG((context %p,ctx)); Lose logging removed + return true; +} + +/** callback to abort a file fetch */ +static void fetch_file_abort(void *ctx) +{ + struct fetch_file_context *c = ctx; + LOG((context %p,ctx)); Ditto goned + +/** Process object as a regular file */ +static void fetch_file_process_plain(struct fetch_file_context *ctx) +{ + char *buf; + size_t buf_size; + + size_t tot_read = 0; + ssize_t res; + + size_t size; + + size = ctx-fstat.st_size; + + /* set buffer size */ + buf_size = size; + if (buf_size FETCH_FILE_MAX_BUF_SIZE) + buf_size = FETCH_FILE_MAX_BUF_SIZE; + + /* allocate the buffer storage */ + buf = malloc(buf_size); + if (buf == NULL) { + fetch_file_send_callback(FETCH_ERROR, ctx, + Unable to allocate memory for file data buffer, + 0, FETCH_ERROR_MEMORY); + return; + } + + /* fetch is going to be successful */ + fetch_set_http_code(ctx-fetchh, 200); + + /* Any callback can result in the fetch being aborted. +* Therefore, we _must_ check for this after _every_ call to +* fetch_file_send_callback(). +*/ + + /* content type */ + if (fetch_file_send_header(ctx, Content-Type: %s, fetch_filetype(ctx-path))) + goto fetch_file_process_aborted; + + /* content length */ + if (fetch_file_send_header(ctx, Content-Length: %zd, size)) + goto fetch_file_process_aborted; + + /* Set Last modified header */ + if (fetch_file_send_time(ctx, Last-Modified: %a, %d %b %Y %H:%M:%S GMT, ctx-fstat.st_mtime)) + goto fetch_file_process_aborted; + + /* create etag */ + if
Re: gui_poll function
On Tue, Aug 24, 2010 at 10:15:57AM +0200, m0n0 wrote: Hello to the list, I'm having an question about gui_poll function - should it block if the active parameter is false? If networking is done (active == false), the page isn't rendered complete, so at this point I can't allow gui_poll to block. How to get the information if rendering is still running? Active becomes false before rendering has finished, so there is no way to use the active flag. When everything is done (how to get that information?), gui_poll could/should be blocking... like an select on a network socket. This could reduce system load, because gui_poll isn't running 100 times a second uselessly. gui_poll should block on input untill the next timer event when there are no outstanding redraw requests to be performed and the active flag is false. An obvious example of this is the gui_poll() in framebuffer/gui.c Greets, Ole -- Regards Vincent http://www.kyllikki.org/
static analysis
As you know I have been playing with clang on Linux, as a side effect I have generated some static analysis output for netsurf and libcss. The NetSurf build is just the GTK version clean HEAD from svn (r10600). The libcss build is likewise clean HEAD (r10600) with BUILD=debug. results at http://www.kyllikki.org/software/netsurf/ more may follow later. -- Regards Vincent http://www.kyllikki.org/
Re: fbtk-rework branch
On Tue, Jul 06, 2010 at 06:10:33PM +0100, Daniel Silverstone wrote: On Tue, Jul 06, 2010 at 10:14:46AM +0100, Vincent Sanders wrote: here is the branch diff, its not perfect but it is better than what we have now and I want it to be merged. I will take this comment into account as I review then. There's lots of indentation snafus in this diff, perhaps you need to re-indent some files? all files re-intented and whitespace cleaned Also, some places you have mixed rettype funcname(args) { } with rettype funcname(args) { } for exported functions. Please make it consistent. it is now consistant Index: framebuffer/options.h #define EXTRA_OPTION_TABLE \ -{ fb_depth, OPTION_INTEGER, option_fb_depth }, \ + { fb_depth, OPTION_INTEGER, option_fb_depth }, \ Gratuitious changing of indentation? well i just applied the indentation all the rest of the files have. Index: framebuffer/fbtk/scroll.c + * Copyright 2008 Vincent Sanders vi...@simtec.co.uk Shiny new file, and it's 2010 now. If you're just CPing code to split it out then 2008,2010. fixed them all, I wont respond to them all +/** Vertical scroll widget */ +static int +vscroll_redraw(fbtk_widget_t *widget, fbtk_callback_info *cbi) This documentation comment seems pretty poor. Either drop the ** or do it properly. dropped +static int +vscrollarea_click(fbtk_widget_t *widget, fbtk_callback_info *cbi) + fbtk_tgrab_pointer(widget); tgrab? toggle grab, documented. +/* Horizontal scroll widget */ Aah, this isn't doc, so drop the ** from the above. cleaned it up a bit Such a large proportion of the code appears remarkably similar between the horiz and vert scrollbars, couldn't there be some code sharing going on? yes...I just cannot figure out how to do it and it look clean Index: framebuffer/fbtk/event.c + * Copyright 2008 Vincent Sanders vi...@simtec.co.uk Copyright 2010? all changed as i said +fbtk_click(fbtk_widget_t *widget, nsfb_event_t *event) +{ Indentation snafud a lot in this function. +/* toggle pointer grab */ +bool fbtk_tgrab_pointer(fbtk_widget_t *widget) +{ More indentation snafus here. +void +fbtk_warp_pointer(fbtk_widget_t *widget, int x, int y, bool relative) + } else { + /* pointer movement has been grabebd by a widget */ grabbed thanks +/* post the movement */ Indentation snafu? +bool fbtk_event(fbtk_widget_t *root, nsfb_event_t *event, int timeout) +{ +//LOG((Reading event with timeout %d,timeout)); No C++ comments please. all gone +/* + * Local Variables: + * c-basic-offset:8 + * End: Given this, it's amazing that there's loads of stuff in the above diff which is 4-char indent. not any more Index: framebuffer/fbtk/text.c + * Copyright 2008 Vincent Sanders vi...@simtec.co.uk 2010? Also, this file is also full of indentation snafu, so I'm not going to mention them, just go tidy it up please. did +#define TEXT_WIDGET_BORDER 3 Can this please be given some kind of comment? #define TEXT_WIDGET_BORDER 3 /** The pixel border round a text widget. */ +/* Lighten a colour by taking seven eights of each channel's intensity + * and adding a full eighth + */ +#define brighten_colour(c1) \ + (7 * ((c1 16) 0xff)) 3) + 32) 16) | \ +7 * ((c1 8) 0xff)) 3) + 32) 8) |\ +7 * (c1 0xff)) 3) + 32) 0)) Why is this in text.c and not some generic colour manipulation header? some of them are in desktop/plot_style.h some elsewhere, guidence please? Index: framebuffer/fbtk/fbtk.c + * Copyright 2008 Vincent Sanders vi...@simtec.co.uk 2010? Also, indentation snafus in this file too fixified +static void dump_tk_tree(fbtk_widget_t *widget) + LOG((%*s%p,indent,, widget)); spaces? fixed + if (widget-first_child != NULL) { + widget = widget-first_child; + indent+=6; spaces? fixed + } else if (widget-next != NULL) { + widget = widget-next; + } else { + while ((widget-parent != NULL) + (widget-parent-next == NULL)) { + widget = widget-parent; + indent-=6; spaces? fixed + } + if (widget-parent != NULL) { + indent-=6; spaces? fixed + widget = widget-parent-next; + } else { + widget = NULL; + } + } + } +} + +/* @todo fbtk_set_pos_and_size, fbtk_set_mapping and + * fbtk_request_redraw
Re: Implementing SHIFT modifier for URL input
On Fri, Jul 02, 2010 at 12:28:08AM +0200, m0n0 wrote: Hello to the list, I was trying to utilise Shift-key for the framebuffer URL input widget. Then I figured out that an static translation table is used by fbtk_keycode_to_ucs4() ... Is there any wish on how to change that? There is a bug in the current implementation of the framebuffer toolkit with respect to input widgets in that they do not actually use the keycode-ucs translation table. If you spot any more issues with the framebuffer toolkit please let me know as I am currently in the middle of a major refactor of this code. My first idea was an mapping file which could be placed into the .netsurf directory. What do you think about it? There are no current plans to implement keymap support, however I may consider it in future. I think making this dynamic is important, because with german keyboards you aren't able to enter : - which is really needed for entering urls which begin with https:// ... - I believe there are more languages which aren't able to input : with that static table... Please feel free to check out my fbtk-rework branch to see if the refactor has solved your issue. -- Regards Vincent http://www.kyllikki.org/
2.5 Release, last call
OK, think we have (well jmb mostly) have cracked all the crashing problems and I am pretty much ready to cut the release. This is the last call for test before I branch the release. This will be at 22:00 BST tonight Sunday 18th 2010. There will be release branches for for netsurf and apropriate libraries for the RISC OS, GTK and Amiga frontends. We will also be producing a tech preview for the windows frontend. -- Regards Vincent http://www.kyllikki.org/ signature.asc Description: Digital signature
The 2.5 Release
Greetings all I will be your release manager for NetSurf 2.5 ;-) This release is scheduled to be released on Sunday 18th April (9 days time) I had hoped to be branching trunk this Sunday (11th) and having a week to stabalise. This aspriration looks increasingly unlikely as the outsanding issue list on http://wiki.netsurf-browser.org/NetSurf_2.5 shows, there is still much to do. I will *not* be branching 2.5 untill jmb has landed his fix the damm recursion branch and the RISC OS front end is fixed. I am, however, prepared to push the release back untill wednesday 21st, any later and I am uncomfortable with having something useful for the wakefiled show on the 24th. I have been keeping a close eye on frontends and have decided that for the 2.5 release it is only going to be possible to release the GTK and RISC OS frontend as fully supported editions. This decision is of course subject to review (especialy for the Amiga front end which I know Chris has put a *lot* of work into but I cannot test. Any release decision is therefore down to Chris) The front ends which are not released as supported editions (beos, framebuffer and windows) I suggest, if we publish builds at all, they are provided strictly as technology demonstrations ensuring we make it absolutely clear that no support is provided and these fronends do not represent the full future capability of NetSurf on those platforms. Please If you have any constructive feedback, now is the time to give it! -- Regards Vincent
Re: r9965 vince - in /trunk/netsurf/desktop: browser.c browser.h
On Thu, Feb 11, 2010 at 10:38:54AM +, Daniel Silverstone wrote: On Wed, Feb 10, 2010 at 11:37:07PM -, nets...@semichrome.net wrote: + bw-status_text = NULL; + bw-status_text_len = 0; I see no initialisation of status_match or status_miss void browser_window_set_status(struct browser_window *bw, const char *text) + if ((bw-status_text == NULL) || (bw-status_text_len text_len)) { + /* no current string allocation or it is not long enough */ + free(bw-status_text); While free(NULL) is defined to be safe -- are we certain it is on all platforms we port to? A good question...I kinda assumed the C default behaviour...ummm if anyone has an issue with this in a build can they let me know? if it is an issue I will of course fix it. Modified: trunk/netsurf/desktop/browser.h + +/** cache of the currently displayed status text. */ + char *status_text; + int status_text_len; + int status_match; + int status_miss; The incorrect indentation indicates that the comment was space-indented rather than tabbed, and the three ints lack documentation strings. How about: char *status_text; /** Current status bar text. */ int status_text_len; /** Length of the ::status_text buffer. */ int status_match; /** Number of times an idempotent status-set operation was performed. */ int status_miss; /** Number of times status was really updated. */ ? all applied and the indentation/whitespace damage of the whole file fixed, cheers Daniel -- Regards Vincent http://www.kyllikki.org/