[Patch] a renderer for <FIELDSET> and <LEGEND>

Lars Knoll lars at trolltech.com
Wed Jul 24 10:26:20 BST 2002


> Hi,
>
> well done!
> I just ask myself why the form elements were ignored before. Shouldn't any
> body content be rendered as normal when a tag is unknown in a browser ?
>
> So, your patch a) fixes a grave bug. b) adds a nice feature.
>
> I would say, it's worth committing, and should even be backported because
> without your patch the form isn't displayed at all - but I cannot decide
> about this.
> Dirk - are you here ? What do you think ?

I'm not Dirk, but hope you take my answer aswell... ;-)

First of all: Nice work :)

There are some comments I have however ;-)

I don't really like the fact, that legend get's a rendering element. I think 
it should get "display: none" in the default stylesheet. We should then 
search for a legend element in the DOM tree, not the rendering tree, and 
printBoxDecorations should render the legend string aswell.

This reduces some complexity in the rendering code, and also follows the specs 
better IMO, as legend assigns a caption to the fieldset element according to 
the specs. So IMO the legend string should be drawn with the font of the 
fieldset element.

But maybe IE interprets this differently...

Cheers,
Lars

>
> regards, till
>
> On Wednesday 24 July 2002 04:13, Germain Garand wrote:
> > Hello there,
> >
> > I noticed a while back that HTML 4's <FIELDSET> and <LEGEND> elements
> > didn't have a renderer in KHTML, so I've worked on this topic.
> > It was ennoying to sometime miss forms because they were wrapped in
> > those.
> >
> > I intended to respect HTML 4.01's DTD, so tell me if I've missed
> > something.
> >
> > Here is a testcase:
> > http://www.phoenix-library.org/germain/testcases/testfieldset.html
> >
> > And a screenshot after patch :
> > http://www.phoenix-library.org/germain/shots/konq_fieldset.png
> >
> > Cheers,
> >
> > Germain





More information about the kfm-devel mailing list