Re: [libcroco-list] API corresponding to getComputedStyle() of DOM

On 2003.08.08 20:12, Dodji Seketeli wrote:
> Hi Kang,
> Hi think some explanations are needed here so that we get sure
> we talk about the same thing.
> Well, from what I understand at
> the interface of getComputedStyle is :
> CSSStyleDeclaration getComputedStyle(in Element elt, 
>                                        in DOMString pseudoElt);
> Libcroco's layout engine aka layeng, when dealing with
> specified/computed/actual style properties doesn't keep any information
> about the css declaration that originated the style.
> In other word, (for the moment) you cannot get the CSSStyleDeclaration
> that originated a given style property.

Yeah, the CSSStyleDeclaration returned by getComputedStyle() is not
original CSSStyleDeclaration. It's just a series of CRDeclarations
which have computed values, in manner of libcroco.

> Instead,  the style information is encoded in a CRStyle data structure,
> and each instance of CRStyle holds both speficied and computed values.
> Of course, the "computed values" are ... computed from the
> "specified values" and from some other information.
> The "computed values" processing is done by the function :
> static enum CRStatus
> style_specified_2_computed_values (CRLayEng *a_this,
>                                    CRStyle *a_style, 
>                                    CRBox *a_parent_box) ;
> This function is defined at
> line 339.
> Note that each instance of xmlNode* from the origin xml document has
> an instance of CRStyle associated to it.
> Is this the function you would like to see "public" ?

It may be, though there seems really not full cases for all 122 properties
that interface CSS2Properties declares. Or am I wrong?


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