|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Patch for bug #200795Hi,
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? Thanks for consideration, Andrea [=?iso-8859-1?Q?border-none-patch.diff?=] --- khtml/rendering/render_replaced.cpp 2009-04-05 21:59:45.000000000 +0200 +++ khtml/rendering/render_replaced.cpp 2009-07-23 14:52:17.000000000 +0200 @@ -479,7 +479,13 @@ } // Border: - if (shouldPaintBorder()) + + bool borderNone = (style()->borderLeftStyle() == BNONE || + style()->borderRightStyle() == BNONE || + style()->borderTopStyle() == BNONE || + style()->borderBottomStyle() == BNONE); + + if (shouldPaintBorder() || borderNone) { if (QFrame* frame = qobject_cast<QFrame*>(m_widget)) frame->setFrameShape(QFrame::NoFrame); |
|
|
Re: Patch for bug #200795Hi
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. `Allan |
|
|
Re: Patch for bug #200795On 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. > 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 |
|
|
Re: Patch for bug #200795Il 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. |
|
|
Re: Patch for bug #200795Hi,
revision 1046447 fixes half of bug, there are some cases where *buttons* does not respect border:none , like in comment #4 and #5: http://bugs.kde.org/show_bug.cgi?id=200795#c4 http://bugs.kde.org/show_bug.cgi?id=200795#c5 (another test case would be: http://sol.cib.unibo.it/SebinaOpac/Opac?sysb=UBOSB , here some buttons must not have borders) Attached a proposed (tested) patch (same logic as in revision 1046447). Regards, Andrea. [attachment removed] |
| Free embeddable forum powered by Nabble | Forum Help |