Thursday, 30 November 2023

allocator_claim_pages:449

Since downloading v6511 of Netsurf I keep seeing "Unknown dynamic area"
errors pop up in my Reporter window. These are 'silent' errors that
don't generate a WIMP error box, so presumably the user is not supposed
to be aware of them, but it gives the impression that the app is running
out of memory....

Reporter 2.72 (15 Aug 2020) List Fri 1st Dec 2023 01:11

01:06:46.54 ** Clear ** from Menu
allocator_claim_pages:449 - Unknown dynamic area
allocator_claim_pages:449 - Unknown dynamic area
allocator_claim_pages:449 - Unknown dynamic area
allocator_claim_pages:449 - Unknown dynamic area
allocator_claim_pages:449 - Unknown dynamic area
allocator_claim_pages:449 - Unknown dynamic area
allocator_claim_pages:449 - Unknown dynamic area
allocator_claim_pages:449 - Unknown dynamic area
allocator_claim_pages:449 - Unknown dynamic area

Reporter 2.72 (15 Aug 2020) Listed 10 lines


--
Harriet Bazley == Loyaulte me lie ==

You cannot propel yourself forward by patting yourself on the back.
_______________________________________________
netsurf-users mailing list -- netsurf-users@netsurf-browser.org
To unsubscribe send an email to netsurf-users-leave@netsurf-browser.org

Monday, 20 November 2023

Pull request: CSS support for libsvgtiny

As promised, and only a month late. My branch is available at,

https://gitweb.michael.orlitzky.com/libsvgtiny.git libcss

For best results, you should also apply the libcss patch I recently
posted that makes fill- and stroke-opacity inherited properties.

No major issues remain. There's a test suite in test/css consisting
of a bunch of SVG files that you can open side-by-side in the
libsvgtiny example program and your favorite image viewer. With the
libcss patch, they all pass (compared to firefox). Without it, two
fail.

If you recall, there was some concern about the licensing of the
select handlers. I think I spent enough time learning and rewriting
the handlers to alleviate those concerns; I ultimately did not copy
anything from NetSurf, although naturally many of the handlers look
similar (and of course I reimplemented them *after* looking at the
NetSurf handlers, so you be the judge).

A summary of the changes follows.

----------------------------------------------------------------
Michael Orlitzky (88):
src/svgtiny_internal.h: removed commented libcss stub
src/svgtiny.c: remove old misleading libcss comments
Makefile: build against libcss
README: mention that libcss is required
src/svgtiny_internal.h: add CSS context to parser state
src/svgtiny_strings.h: add "media" to the list of strings
include/svgtiny.h: add new error constant svgtiny_LIBCSS_ERROR
README: document the new svgtiny_LIBCSS_ERROR code
src/svgtiny.c: initialize the libcss context in svgtiny_parse()
src/svgtiny.c: add impotent svgtiny_preparse_styles() function
src/svgtiny_css.c: new file with new svgtiny_resolve_url() function
src/svgtiny_internal.h: add svgtiny_resolve_url() prototype
src/Makefile: add the new svgtiny_css.c to the list of sources
src/svgtiny.c: add svgtiny_parse_style_element() function and use it
src/svgtiny_css.c: new function svgtiny_create_stylesheet()
src/svgtiny_internal.h: add svgtiny_create_stylesheet() prototype
src/svgtiny.c: use svgtiny_create_stylesheet() to parse <style>
src/svgtiny_internal.h: drop svgtiny_resolve_url() prototype
src/svgtiny.c: add svgtiny_parse_style_inline() function
src/svgtiny.c: parse inline stylesheet in svgtiny_parse_paint_attributes()
src/svgtiny{.c,_internal.h}: intern SVG's XML namespace URI
src/svgtiny_css.c: implement node_name() select handler
src/svgtiny_css.c: implement node_classes() select handler
src/svgtiny_strings.h: intern "id" for libcss
src/svgtiny_css.c: implement node_id() select handler
src/svgtiny_css.c: implement named_parent_node() select handler
src/svgtiny_css.c: implement named_sibling_node() select handler
src/svgtiny_css.c: implement named_generic_sibling_node() select handler
src/svgtiny_css.c: implement parent_node() select handler
src/svgtiny_css.c: implement sibling_node() select handler
src/svgtiny_strings.h: intern the universal selector string "*"
src/svgtiny_css.c: implement node_has_name() select handler
src/svgtiny_css.c: implement node_has_class() select handler
src/svgtiny_css.c: implement node_has_id() select handler
src/svgtiny_css.c: implement node_has_attribute() select handler
src/svgtiny_css.c: implement node_has_attribute_equal() select handler
src/svgtiny_css.c: implement node_has_attribute_dashmatch() select handler
src/svgtiny_css.c: implement node_has_attribute_includes() select handler
src/svgtiny_css.c: implement node_has_attribute_prefix() select handler
src/svgtiny_css.c: implement node_has_attribute_suffix() select handler
src/svgtiny_css.c: implement node_has_attribute_substring() select handler
src/svgtiny_css.c: implement node_is_root() select handler
src/svgtiny_css.c: implement node_count_siblings() select handler
src/svgtiny_css.c: implement node_is_empty() select handler
src/svgtiny_css.c: implement node_is_link() select handler
src/svgtiny_css.c: implement node_is_hover() select handler
src/svgtiny_css.c: implement node_is_active() select handler
src/svgtiny_css.c: implement node_is_focus() select handler
src/svgtiny_css.c: implement node_is_enabled() select handler
src/svgtiny_css.c: implement node_is_disabled() select handler
src/svgtiny_css.c: implement node_is_checked() select handler
src/svgtiny_css.c: implement node_is_target() select handler
src/svgtiny_css.c: case-insensitivity for node_has_attribute_substring()
src/svgtiny_css.c: implement node_is_lang() select handler
src/svgtiny_css.c: implement ua_default_for_property() select handler
src/svgtiny_css.c: implement node_is_visited() select handler
src/svgtiny_strings.h: intern a "userdata" key string
src/svgtiny_css.c: implement set_libcss_node_data() select handler
src/svgtiny_css.c: implement get_libcss_node_data() select handler
src/svgtiny_css.c: implement node_presentational_hint() select handler
src/svgtiny_css.c: implement named_ancestor_node() select handler
src/svgtiny_css.c: define a css_select_handler
src/svgtiny_css.c: add user handler function
src/svgtiny_css.c: use our userdata handler in set_libcss_node_data()
src/svgtiny_css.c: add svgtiny_select_style() wrapper
src/svgtiny_internal.h: add svgtiny_select_style() to the header
src/svgtiny_internal.h: add fill/stroke_opacity to the parse state struct
src/svgtiny.c: eliminate pointless NULL check
examples/svgtiny_display_x11.c: handle svgtiny_LIBCSS_ERROR
test/decode_svg.c: handle svgtiny_LIBCSS_ERROR
src/svgtiny.c: parse styles in svgtiny_parse_paint_attributes()
include/svgtiny.h: add fill_opacity and stroke_opacity to svgtiny_shape
src/svgtiny.c: set shape opacities from the parser state
examples/svgtiny_display_x11.c: use opacity information
src/svgtiny.c: update the docstring for svgtiny_parse_svg()
src/svgtiny.c: use separate function for style application
src/svgtiny_internal.h: add parent style to the parser state
src/svgtiny*.{c,h}: move the libcss unit context into the parser state
src/svgtiny.c: implement composition of parent styles
src/svgtiny_css.c: add some default user-agent properties after all
src/svgtiny.c: remove parent == NULL hack
examples/GNUmakefile: add a GNUmakefile for the example program
examples/svgtiny_display_x11.c: update build instructions
examples/.gitignore: ignore the compiled example program
src/svgtiny.c: use case-sensitive comparisons for SVG element names
test/css: add some visually-verified test cases for our new features
src/svgtiny_css.c: clean trailing newlines
src/svgtiny.c: whitespace cleanup (spaces to tabs)

Makefile | 8 +-
README | 13 +-
examples/.gitignore | 2 +
examples/GNUmakefile | 20 +
examples/svgtiny_display_x11.c | 55 +-
include/svgtiny.h | 5 +-
src/Makefile | 2 +-
src/svgtiny.c | 494 ++++++++++--
src/svgtiny_css.c | 2069 ++++++++++++++++++++++++++++++++++++++++++++++++++
src/svgtiny_internal.h | 37 +-
src/svgtiny_strings.h | 4 +
test/css/README | 11 +
test/css/attributes.svg | 94 +++
test/css/case-sensitive-elements.svg | 19 +
test/css/empty-pseudo-class.svg | 33 +
test/css/id-and-class.svg | 49 ++
test/css/inherit.svg | 43 ++
test/css/inline.svg | 31 +
test/css/lang.svg | 32 +
test/css/link-pseudo-class.svg | 36 +
test/css/node-name.svg | 40 +
test/css/nth-child.svg | 52 ++
test/css/root.svg | 25 +
test/css/siblings-and-descendants.svg | 64 ++
test/css/styles-at-end.svg | 29 +
test/decode_svg.c | 3 +
26 files changed, 3169 insertions(+), 101 deletions(-)
create mode 100644 examples/.gitignore
create mode 100644 examples/GNUmakefile
create mode 100644 src/svgtiny_css.c
create mode 100644 test/css/README
create mode 100644 test/css/attributes.svg
create mode 100644 test/css/case-sensitive-elements.svg
create mode 100644 test/css/empty-pseudo-class.svg
create mode 100644 test/css/id-and-class.svg
create mode 100644 test/css/inherit.svg
create mode 100644 test/css/inline.svg
create mode 100644 test/css/lang.svg
create mode 100644 test/css/link-pseudo-class.svg
create mode 100644 test/css/node-name.svg
create mode 100644 test/css/nth-child.svg
create mode 100644 test/css/root.svg
create mode 100644 test/css/siblings-and-descendants.svg
create mode 100644 test/css/styles-at-end.svg
_______________________________________________
netsurf-dev mailing list -- netsurf-dev@netsurf-browser.org
To unsubscribe send an email to netsurf-dev-leave@netsurf-browser.org

Sunday, 19 November 2023

[PATCH 1/1] src/select/dispatch.c: fill-opacity and stroke-opacity are inherited

These two SVG properties were copied from the CSS4 "opacity" property
that is not inherited:

https://www.w3.org/TR/css-color-4/#transparency

However, both fill-opacity and stroke-opacity _are_ inherited:

https://www.w3.org/TR/SVG2/painting.html#FillOpacity
https://www.w3.org/TR/SVG2/painting.html#StrokeOpacity

To fix the copy-paste error, this commit toggles the "inherited" bit
in the dispatch table for those two properties.
---
src/select/dispatch.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/select/dispatch.c b/src/select/dispatch.c
index 74bc6ed..cee9335 100644
--- a/src/select/dispatch.c
+++ b/src/select/dispatch.c
@@ -517,10 +517,10 @@ struct prop_table prop_dispatch[CSS_N_PROPERTIES] = {
},
{
PROPERTY_FUNCS(fill_opacity),
- 0,
+ 1,
},
{
PROPERTY_FUNCS(stroke_opacity),
- 0,
+ 1,
}
};
--
2.41.0
_______________________________________________
netsurf-dev mailing list -- netsurf-dev@netsurf-browser.org
To unsubscribe send an email to netsurf-dev-leave@netsurf-browser.org

Saturday, 18 November 2023

Re: libcss node_data cleanup issue

On Wed, 2023-11-15 at 19:07 -0500, Michael Orlitzky wrote:
>
> if (node_data->bloom != NULL) {
> free(node_data->bloom);
> }
>
> So, ultimately, we try to free the static empty_bloom. This does not
> work.
>

It turns out that providing user-agent defaults for a few properties
avoids this code path. How? I don't know. But those same defaults also
appear necessary for parent/child style composition to work, making the
issue above somewhat less pressing.

_______________________________________________
netsurf-dev mailing list -- netsurf-dev@netsurf-browser.org
To unsubscribe send an email to netsurf-dev-leave@netsurf-browser.org

[Rpcemu] Linux Home driretory next to my HostFS drive

Hello,

I have two versions of RPCEmu running on my Linux laptop and have
created Symlinks to access my USB drives. So far, so good, so happy.

Now I would like the Linux Home directory to appear next to my HostFS
drive on the taskbar, and or is there a way to make symlinks appear on
the taskbar (either as a folder or as a drive).

Does anyone have any experience with this?

--
Kind regards, Steve


_______________________________________________
RPCEmu mailing list
RPCEmu@riscos.info
http://www.riscos.info/cgi-bin/mailman/listinfo/rpcemu

Thursday, 16 November 2023

Re: [gccsdk] sizeof structs

 
typedef union {
uint16_t cache;
struct {
uint8_t code;
uint8_t arg;
} __attribute__((__packed__)) op;
} __attribute__((__packed__)) _Py_CODEUNIT;
 
typedef struct { } __attribute__((__packed__)) _PyAttrCache;
 
Aha. Thanks. That's got it past that static assert at least :)
You have to pack the nested structs as well. That's what I had to do
with harfbuzz for GCC 4.
I think that's the bit I missed.
Are you dynamic linking? The only issue with GCC 10 is we don't have a
point of distribution for the shared libraries. If you're static
linking then you don't have to worry about that.
 
Ah. yeah I am. I guess this is why Iris needs to come with it's own set of shared libs?
 
Cheers
 
Chris
 

Re: [gccsdk] sizeof structs

On 16/11/2023 09:46, Chris Johns wrote:
> Hello
> I thought I'd have a go at building Python 3.12. While ro-config step
> works (with the patch from 3.11), trying the build fails with a static
> assertion "incorrect cache size".
I remember quite some time ago (wow, nearly 10 years according to the
autobuilder log) having similar problems with harfbuzz and GCC 4. If you
look at the recipe in the autobuilder, you'll see a lot of the patches
are to add packing to structs. I remember it was quite tedious because
the structs tended to be nested so packing one affected another, but
eventually I got it working.

Looking at my local version that I'm using with GCC 10, I see that I am
not applying these patches, and IIRC, came to the conclusion that GCC
10 packed structs by default whereas GCC 4 didn't.

> From a look at the code, it seems to be related to the size of some
> structs .. for example
>
> typedef union {
> uint16_t cache;
> struct {
> uint8_t code;
> uint8_t arg;
> } op;
> } _Py_CODEUNIT;
> and
> typedef struct {
> uint16_t counter;
> uint16_t version[2];
> uint16_t index;
> } _PyAttrCache;
> The assert that INLINE_CACHE_ENTRIES_STORE_ATTR == 4
> So what is that doing?
> #define CACHE_ENTRIES(cache) (sizeof(cache)/sizeof(_Py_CODEUNIT))
> #define INLINE_CACHE_ENTRIES_STORE_ATTR CACHE_ENTRIES(_PyAttrCache)
> So from a naive point of view, it should be fine .. sizeof(_Py_CODEUNIT)
> is 2 bytes (a uniion of a 16 bit int or 2 8-bit ones),
> sizeof(_PyAttrCache) is 8 bytes (4 16-bit int (two plus two in the array).
> However, while sizeof(_PyAttrCache) is indeed 8, sizeof(_PyCODEUNIT) is
> 4 (I am guessing it's being rounded up to a word).
> I'm using gcc 4.7.4 (cross compiler). I have tried targetting a later
> CPU, and I did try setting the packed, aligned=2 on the _Py_CODEUNIT
> struct but that didn't seem to make any difference.

When you say you tried setting the packed, aligned=2, did you try:

typedef union {
uint16_t cache;
struct {
uint8_t code;
uint8_t arg;
} __attribute__((__packed__)) op;
} __attribute__((__packed__)) _Py_CODEUNIT;

typedef struct { } __attribute__((__packed__)) _PyAttrCache;

You have to pack the nested structs as well. That's what I had to do
with harfbuzz for GCC 4.

> Any other suggestions? Later gcc? Some other options? I guess python
> probably shouldn't be assuming the sizes, but I'm not sure about getting
> that changed :)

I suspect GCC 10 may do a better job as, like I say, harfbuzz seems to
work without patches to pack the structs. Admittedly, I didn't do any
actually testing, I just went off the fact that it built without the
static assertions failing and Webkit produced readable text!

> I'm not too worried if it means python 3.12 is limited to more modern
> mechines. 3.8 works on everything else.

Are you dynamic linking? The only issue with GCC 10 is we don't have a
point of distribution for the shared libraries. If you're static
linking then you don't have to worry about that.

Lee.


_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

[gccsdk] sizeof structs

Hello
 
I thought I'd have a go at building Python 3.12. While ro-config step works (with the patch from 3.11), trying the build fails with a static assertion "incorrect cache size".
 
From a look at the code, it seems to be related to the size of some structs .. for example
 

typedef union {
uint16_t cache;
struct {
uint8_t code;
uint8_t arg;
} op;
} _Py_CODEUNIT;
 
and
 
typedef struct {
uint16_t counter;
uint16_t version[2];
uint16_t index;
} _PyAttrCache;
 
The assert that INLINE_CACHE_ENTRIES_STORE_ATTR == 4
 
So what is that doing?
 
#define CACHE_ENTRIES(cache) (sizeof(cache)/sizeof(_Py_CODEUNIT))
#define INLINE_CACHE_ENTRIES_STORE_ATTR CACHE_ENTRIES(_PyAttrCache)
 
So from a naive point of view, it should be fine .. sizeof(_Py_CODEUNIT) is 2 bytes (a uniion of a 16 bit int or 2 8-bit ones), sizeof(_PyAttrCache) is 8 bytes (4 16-bit int (two plus two in the array).
 
However, while sizeof(_PyAttrCache) is indeed 8, sizeof(_PyCODEUNIT) is 4 (I am guessing it's being rounded up to a word).
 
I'm using gcc 4.7.4 (cross compiler). I have tried targetting a later CPU, and I did try setting the packed, aligned=2 on the _Py_CODEUNIT struct but that didn't seem to make any difference.
 
Any other suggestions? Later gcc? Some other options? I guess python probably shouldn't be assuming the sizes, but I'm not sure about getting that changed :)
 
I'm not too worried if it means python 3.12 is limited to more modern mechines. 3.8 works on everything else.
 
 
Cheers
 
Chris

Wednesday, 15 November 2023

libcss node_data cleanup issue

I'm still making progress on this, but fixed some crashes today that
may belong to libcss. The css_select__initialise_selection_state()
function initializes node_data->bloom with the parent's bloom filter:

error = css__get_parent_bloom(parent, handler, pw,
&state->node_data->bloom);

But when "parent" is NULL, that function returns

static css_bloom empty_bloom[CSS_BLOOM_SIZE];
bloom = empty_bloom;
*parent_bloom = bloom;
return CSS_OK;

The matching call to css_select__finalise_selection_state() eventually
tries to free that data:

if (state->node_data != NULL) {
css__destroy_node_data(state->node_data);
}

And that involves

if (node_data->bloom != NULL) {
free(node_data->bloom);
}

So, ultimately, we try to free the static empty_bloom. This does not
work.

Since this only happens when "parent" is NULL, I can easily check for
that case and avoid calling css_select_style(). But is that the right
thing to do? Or is this a corner case that css_select_style() should
handle?
_______________________________________________
netsurf-dev mailing list -- netsurf-dev@netsurf-browser.org
To unsubscribe send an email to netsurf-dev-leave@netsurf-browser.org