Codethink sponsored work on NetSurf
michael.drake at codethink.co.uk
Tue May 2 09:16:25 BST 2017
Over the past few weeks I've been able to spend time
contributing to open-source projects at work.
Codethink  values open-source software, and so I
was approved to work on NetSurf and related components
while I was between projects. I'd like to thank
Codethink for this opportunity, which I very much
value and appreciate.
What follows is a summary of the development I've been
able to accomplish during this time.
LibCSS (CSS parsing and selection library)
* Added parsing and selection support for the CSS3
Core: HTML layout engine
* Added support for the CSS3 box-sizing property. This
helps us assign element widths and heights as the web
page author intended.
* Extended :after pseudo element handling to cover the
table display type. This improves layout of pages that
use a variant of the clearfix CSS trick for clearing
* Fixed the handling of the CSS min-width and max-width
properties to correctly affect the auto-width left and
* Added support for width attribute on HR element.
* Fixed use of uninitialised value in CSS presentational
hint handling, that had potential to reduce the
likelihood of computed style sharing.
* Improved layout tree dump, to make debugging layout
Core: Content handling
* Improved logging, making it easier to track HTML contents
through a session, for debug purposes.
* Removed bogus assertion in the HTML object fetch handler,
which would sometimes crash the browser.
* Fixed bug in content state machine, which made aborted
fetches cause their contents to get stuck in the cache.
Core: URL handling
* Improved file: URL handling.
* Removed redundant code.
* Improved hexadecimal handling.
* Improved test suite.
Core: Hotlist (bookmarks/favourites)
* Added support for saving the hotlist automatically after
entries are added or removed. This helps prevent loss
of hotlist changes if NetSurf is unable to save the file
* Added support for read-only hotlist mode, which can be
selected by frontend code. In this mode, the hotlist
file may be read, and the hotlist updated, but changes
are never saved to disc.
* Fixed bug where different pango layout contexts were used
for measuring and painting text, which in some situations
caused either lines with overlapping text, or large spaces
between bits of text on a line.
* Slight optimisation to the text line break handling code.
* Rewrote bitmap rendering plotter. The new implementation
is many times faster for tiled rendering, such as for
repeating background images, and simplifies the handling
of scaled plots.
RISC OS frontend
* Improved handling of external hotlist managers, by setting
the core hotlist to read-only mode, when configured to use
an external manager.
generator) from Duktape 1.6 to Duktape 2.0. We had
been stuck on the 1.X series due to API changes
in Duktape 2, and lack of time to make the transition.
Duktape 2.0 provides greater performance, amongst many
* Added support for HTML style comments (ES6 spec) to
Duktape and upstreamed it to the Duktape author, Sami
Vaarala. This feature had been requested by our users.
* Updated NetSurf from Duktape 2.0 to the recently
released Duktape 2.1, which gives further performance
gains, adds the HTML stlye comment handling, and other
* On the advice of the Duktape author, enabled Duktape's
fastint build option, for faster integer arithmetic.
LibNSGIF (GIF decoding library)
* Complete rewrite of LZW decompression. The new
implementation is both 30% faster and cleaner code.
It also now handles LZW codes that span three sub-blocks.
(Although these are unlikely to actually appear in the
LibSVGTiny (SVG decoding library)
* Build system improvements to fix warnings about use of
More information about the netsurf-users