We were handling the STYLE tag getting added in the
dom_default_action_DOMSubtreeModified_cb callback, however,
the media attribute dadn't been added by that point.
We now check it in the dom_default_action_DOMNodeInserted_cb
callback, at which time the media attribute is available for
checking.
Note, we should probably store the media type in the
html_stylesheet structure, but for now we just have an
`unused` boolean.
Also, it may be possible to optimise to avoid parsing non-
screen media STYLE element data if we could detect the media
earlier.
The no_delete flag is mislabelled as persistent. In fact it is simply
never altered from its default value. It is serialised and its state
kept on disc but otherwise is completely vestigial.
This is a quick fix to stop NetSurf crashing when the URL is provided on the commandline without the URL keyword.
Passing options on the commandline will not work until this is fixed properly.
Version 1.5.1 includes some of our own fixes, reducing our delta
to upstream.
These should not be needed now:
- 2cbb337756
Squash harmless Clang warning introduced in Duktape 1.5.0.
- 8f8cda2b48
Fix Duktape on AmigaOS3 (thanks to Tygre and Sami)
This will happen when attempting to open old 68k libraries with no separate interface file, but may also occur when the interface name or version doesn't exist (although the library version number _should_ prevent that)
Libjpeg used in NetSurf for decoding of JPEG images handles exceptions using a
pair of non-local jump functions: setjmp() and longjmp(). When a decompression
context is created via a call to the function jpeg_create_decompress() the
caller passes a structure jpeg_decompress_struct as a parameter. This structure
should has a validly initialized jump buffer, so the initialization or other
functions called in future can jump to the exception handling context.
The jpeg backend of NetSurf now initializes libjpeg mistakenly: jump buffer is
filled after the call to jpeg_create_decompress(). It results in jump to random
addresses in the case of exception caught during operation of the function
jpeg_create_decompress().
The patch moves the initialization of jump buffer before the call to
jpeg_create_decompress().
Signed-off-by: Sergei Rogachev <rogachevsergei@gmail.com>
bitmap file decoding is done at first call to redraw but was not
calling the modified callback at the correct time immediately after
decode so frontend image chnages were not being done. This caused
nsgtk to fail to apply its colour space fixups so red was swapped with
blue.