[libcroco-list] About CRStyle datastructure

Hi all,

I am pondering moving the CRStyle datastructure from libcroco to sewfox.
Before going further, I think some explanations are needed to understand
what's going on.

Libcroco provides a parser, two parsing APIS on top of that parser, and
a selection engine.

Basically, the user asks the selection engine to return the style
properties associated to a given xml node.

We have two apis for requesting the selection engine: a low level and an
upper level one.

Low level api

The low level api returns a list of properties that matches the xml node
given in parameter.

e.g: consider the following css:
x {prop1: val1}
y {prop2: val2}

a request (via the low level api) asking the selection engine to get the
style properties applied to an xml element which name is 'x' will return
the property: "prop1: val1".

Now, let me talk about the higher level api.

High level api

When the user requests the style properties associated to a given xml
node via the higher level api, the selection returns a CRStyle struct.
That datastructure defines _all_ the standard properties of the CSS2
spec. If one (or more) css2 property is defined in the input cascading
style sheet, the matching CRStyle field is set accordingly.
The other standard properties that have not been explicitely defined in
the input styles sheet are set to their "initial" values.
I have made the description of the "CRStyle setting" short for the sake
of simplicity, but this process tries to follow what's stated at 
http://www.w3.org/TR/CSS2/cascade.html#q1 .

Now, the problem

Today, CRStyle does not actually define all the standard css2 properties
because ... we are not there yet.
Working on the layout engine (in sewfox) requires a tight integration
with the CRStyle class. So I keep going back and forth between libcroco
and sewfox.
Furthermore, changing CRStyle all the time will make it hard to reach
ABI stability for libcroco in a mid termed future... and CRStyle *is*
going to change a lot !
Last but not least, CRStyle is useful for xml/css layout, which is the
job of sewfox.

This is why I'd like to move the CRStyle struct and its management into

If you don't have anything against this I'll go for it in the coming



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]