[libcroco-list] Inheritance & Initial value



In the css spec all properties have an initial value but some inherit it
and some don't. But in cr-style.c we have only one function to set the
initial value of the style, that is cr_style_set_props_to_defaults, but
it sets the default value of each property to their initial value. 
In fact should'nt the default value be INHERIT when the property is not
part of the root style and the property is of the inherited type?

I think their should be two functions:
cr_root_style_set_props_to_defaults, where all props are set to their
'initial value' and cr_style_set_props_to_defaults where props that are
of the inherited type are set to INHERIT, and other props are set to
their initial value.

Another problem is where should be done the propagating of inherited
properties from the parent style to their children? Some is done in
cr-style.c when the 'inherit' value is read from the stylesheet, some
other is done directly in sewfox. So should-it be staticaly propagated
somewhere in libcroco ? dynamicaly in sewfox ?

@+




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