Generated content: counters and quotes

Germain Garand germain at ebooksfrance.org
Mon Feb 7 11:05:14 GMT 2005


Le lundi 07 Février 2005 09:37, Allan Sandfeld Jensen a écrit :
> On Saturday 29 January 2005 00:40, Germain Garand wrote:
> > this looks just great...
> > Only thing I find questionable in your patch is the added stuff in
> > RenderObject, especially the added pointer  to a cache struct.
> > IMO, it should be in at least RenderBox to avoid any unnecessary bloat.
>
> Technically it is because any object that has a style can have a
> counter-node attached. It also reduces the need for
> static_cast<RenderBox*>.
>

ah, I was rather thinking virtuals with asserts in RenderObject, but it might 
indeed be seen as another kind of bloat :)

> Also I am not sure RenderBox is generic enough, since any stupid type of
>
> element can be counted. Imagine:
> :first-letter { counter-increment: firstletter 1; }
>
> #count { content: "Number of first letters: " counter(firstletter); }
>

well, my assumption is: you can only select full blown element nodes from CSS, 
so how could those selectors apply to anything Object or Text?

> > Also, "RenderGenerated" is rather confusing... the class is much less
> > generic than the name would lead one to expect...
>
> The plan is to make it more generic to move handling of generated content
> out of RenderContainer. I am trying to find out what is wrong with attr()
> content, and if it needs to be made dynamic it would be created here as
> well. (attr is currently inserted as text during style-selection, but for
> some reason the inserted text is empty)
>

OK... it's not like it bother much anyway :)

Greetings,
Germain




More information about the kfm-devel mailing list