[Patch] improved text-decoration II
Luciano Montanaro
mikelima at virgilio.it
Tue Apr 20 09:41:49 BST 2004
On Sunday 18 April 2004 19:28, Leo Savernik wrote:
> Hello,
>
> This is basically the patch from Luciano Montanaro which replaces drawLine by
> fillRect, takes the QFontMetrics' line width into account, and makes
> underlining fully compliant to CSS 1 in transitional and strict modes.
>
Thanks a lot for your work on this. I'll try your patch as soon as I have
the time (not before next weekend, sadly).
> The problem with this patch is that the text decoration is painted over any
> existing selection. Therefore, I shelled out painting of text selection into
> the PaintActionSelection phase. While this works great visually, it makes
> text selection feel slower. (The patch is slightly wrong. It should initiate
> the PaintActionSelection phase from RenderLayer::paintLayer, not from
> KHTMLView::drawContents, but I don't think this makes a difference speed
> wise.)
>
I've not tried this out, so I don't know how bad the performance is really.
Would it be a problem to make the renderer use setUnderline(),
setStrikeOut() and so on, instead of faking the font attributes as it does
currently?
> If that isn't bearable, should we take the IE approach to favour speed over
> correctness, and leave everything as is?
Well, we've been using this approach till now, so that's an option.
However, as display resolution increases, thin lines will be more and
more noticeable.
Luciano
More information about the kfm-devel
mailing list