Patch for bug #200795

Andrea Iacovitti aiacovitti at libero.it
Mon Aug 3 11:45:10 BST 2009


Il domenica 2 agosto 2009 10:14:58 Allan Sandfeld Jensen ha scritto:
> On Sunday 02 August 2009, Allan Sandfeld Jensen wrote:
> > Hi
> >
> > On Friday 31 July 2009, Andrea IACOVITTI wrote:
> > > Hi,
> > > i wrote a small patch that solves
> > > http://bugs.kde.org/show_bug.cgi?id=200795 In that case khtml don't
> > > honour 'border:none' for input text widget, on the contrary native
> > > borders are drawn around. Is the patch ok?
> >
> > The patch looks safe, but you should fix the shouldPaintBorder() function
> > instead, its result is obviously wrong and adding logic to correct the
> > result after the function returned is an ugly hack.
>
> Sorry, I may have replied a bit too fast. The problem is
> shouldPaintBorder() doesn't represent the situation where a border is
> possible but set to none. I still believe generic functions should be used
> for the check, but the original patch is better than I originally thought.
> Without testing I would think a check like this could work:
>
> if (shouldPaintBorder() || (!shouldPaintBackgroundOrBorder() &&
> canHaveBorder()))

Yes, you are right: tested the above patch on khtml 4.2.96 and it works.
(I haven't observed any regressions...)

>
> It handles the case where shouldPaintBackgroundOrBorder() is false, usually
> indicating four zero-width borders or border-style none.
>
> `Allan

Thanks,
Andrea.




More information about the kfm-devel mailing list