Patch for bug #200795

Allan Sandfeld Jensen kde at carewolf.com
Sun Aug 2 09:14:58 BST 2009


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()))

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

`Allan




More information about the kfm-devel mailing list