Re: [libcroco-list] Heritage mecanism patch



Hi Benjamin,

Le sam 03/04/2004 à 19:24, Benjamin Dauvergne a écrit :
> I have committed a patch in my archive that implement the heritage
> mecanism.
> 
> The main change is a new function:
> enum CRStatus cr_style_propagate_from_parent (CRStyle *a_this);
> that can be used by sewfox ( no need to implement propagation in sewfox,
> or other renderers ).

I have star-merged the patch in my tree, and the merge went just
smoothly fine.

I have made some minor modifications though:

- I have reverted the changes made in
CRStyle::set_prop_padding_from_value() and
CRStyle::set_prop_white_space_from_value() because they kind of break
the previous behaviour.

- in cr-style.c I have made some coding style changes to comply with the
overall libcroco coding style. Basically, we do
if () {

} else if (){

}
and not

if ()
{

}
else if ()
{

}

and also we do
enum CRStatus
cr_style_set_props_to_initial_values () 
{

}

and not

enum CRStatus cr_style_set_props_to_initial_values () 
{

}


- in CRRgb::set_from_term() :
I made sure to replace the strcmp () ; by !strcmp () otherwise, it
breaks the previous behaviour of the method.

I have also made some modifications in sewfox to make it take benefit of
this patch. Inheritance works in sewfox now, thanks to your patch !!!

As the patch looks good to me, I have commited it in the tla main
archive. It's available at
dodji gnome org--xml-style-2004/libcroco--mainline--0.6--patch-6 .

The inheritance powered sewfox patch is
dodji gnome org--xml-style-2004/sewfox--mainline--0.1--patch-3 .

Just for the record, this xml input that uses CSS properties
inheritance:
-=-
<html>
<b>An inheritance test: </b>
<i><b>This       text (in bold italic)</b>  <i> has (in italic)</i>   
normalized  spaces (in italic)</i>
<blockquote>
This is a blockquoted text (normal)<p>And this is a para in the
blockquoted text (normal)</p>
</blockquote>
</html>
-=-

is rendered by sewfox like
http://www.freespiders.org/projects/sewfox/tests/inheritance.png .

Of course, we use the html4 default CSS brought by David Knight. Sewfox
does'nt know anything about html.

Thank you.

Regards,

	Dodji.





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