nowrap issues
Lars Knoll
lars@trolltech.com
Fri, 17 Jan 2003 08:06:22 +0100
Sounds like a good idea. I'd like to move more of these hacks into CSS
anyways. Tell me if you have a working patch and I'll apply it to CVS aswell
:)
Cheers,
Lars
> I implemented this, and it works. I just added the new value, and then
> do this in RenderTableCell's setStyle.
>
> if (style->whiteSpace() == KONQ_NOWRAP) {
> // Figure out if we are really nowrapping or if we should just
> // use normal instead. If the width of the cell is fixed, then
> // we don't actually use NOWRAP.
> if (style->width().isFixed())
> style->setWhiteSpace(NORMAL);
> else
> style->setWhiteSpace(NOWRAP);
> }
>
> This lets you get rid of the table cell casting and checks in
> RenderFlow::calcMinMaxWidth too.
>
> dave
>
> On Thursday, January 16, 2003, at 01:42 PM, David Hyatt wrote:
> > So now that I made nowrap work like the KHTML trunk (I was improperly
> > applying nowrap when calcing the minmax for block children, when it
> > should have only applied for minmax calcs of inline children), Apple's
> > internal HR site misrenders. It does so because it has a construction
> > like the following:
> >
> > <td nowrap>
> > <div>
> > Some text that shouldn't wrap.
> > </div>
> > </td>
> >
> > The problem with the current way table nowrap is handled is that it
> > isn't placed into CSS, so there's no inheritance of white-space into
> > child content. The <div> thinks it has white-space: normal, so it
> > computes a min-width that is way too small.
> >
> > My idea for correcting this is to actually make a new CSS value for
> > the white-space property, -konq-nowrap, that can be used to represent
> > <td nowrap>. When encountered, the value can be dynamically mapped to
> > "normal" if the cell has a fixed width or to "nowrap" if the cell does
> > not.
> >
> > What do you think?
> >
> > dave
> > (hyatt@apple.com)
> >
> > _______________________________________________
> > Khtml-devel@mail.kde.org
> > http://mail.kde.org/mailman/listinfo/khtml-devel
>
> _______________________________________________
> Khtml-devel@mail.kde.org
> http://mail.kde.org/mailman/listinfo/khtml-devel