[Patch] a renderer for <FIELDSET> and <LEGEND>
Germain Garand
germain at ebooksfrance.com
Wed Jul 24 12:46:51 BST 2002
Le Mercredi 24 Juillet 2002 10:26, Lars Knoll a écrit :
Hello Lars !
> > 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
Ah, I new you would say that ! :) It hurted me as well ! :)
In fact it was my first approach, but it is not quite satisfactory, and I now
think it's wrong ...
Sure, this is quite a special case since the HTML DTD doesn't define LEGEND as
either %inline or %block...
But OTOH, it defines it as :
<!ELEMENT LEGEND - - (%inline;)* -- fieldset legend -->
and NOT :
<!ELEMENT LEGEND - - (#PCDATA) -- fieldset legend -->
Which means, if you follow strictly the spec, that Legend must accept funny
things such as <IMG>s, <INPUT>s, anchors and other fontstyling element, but
should not actually render them because the container is not %flow !?!
That sucks beyond belief !
People do style their legends, do put imgs in their legends, because they are
allowed to do so...
Now, I don't know how IE render them, because I have no IE here and that's not
my reference (my reference is KHTML :), but yes Mozilla style them, Opera
style them ... so what ?
> then search for a legend element in the DOM tree, not the rendering tree,
I do ensure that legend is unique inside it's HTMLFieldsetElementImpl, but you
could only extract #PCDATAs from here, as innerText() do... that's not
following the DTD either... why would they be more important than e.g. an
image ?
G.
More information about the kfm-devel
mailing list