Summary: | [testcase] CSS border-style unproperly rendered | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Pedro Fayolle <pfayolle> |
Component: | khtml renderer | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 3.2 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Pedro Fayolle
2004-01-31 22:28:26 UTC
http://doc.trolltech.com/3.3/qt.html#PenStyle-enum - that are the supported line types by Qt. Drawing the lines you suggest, would mean drawing pixels and I doubt users would justify the slow down for painting the "perfect line". And the only way to avoid that would mean adding a direct X11 call. Also not worth it I'd say. its a Qt/X11 bug.. and the most annoying one too. it works with Qt/Win. so disgusting. > The CSS property border-style values 'groove', 'ridge', 'inset' and 'outset' > all fail to render, creating just simple solid lines. This is correct as you specified the border-width of 1px The dotted line bug is a duplicate of #62296. *** This bug has been marked as a duplicate of 62296 *** CVS commit by mueller: improved rendering of testcase in #73920 CCMAIL: 73920@bugs.kde.org M +12 -16 render_object.cpp 1.252 --- kdelibs/khtml/rendering/render_object.cpp #1.251:1.252 @@ -558,17 +558,9 @@ void RenderObject::drawBorder(QPainter * case BSBottom: case BSTop: - p->drawRect(x1+1,y1,x2-x1-2,y2-y1); - if ( ( x2-x1 ) & 1 ) { - p->setPen( QPen( c, 0 ) ); - p->drawPoint( x2-1, y2-1 ); - } + p->drawRect(x1,y1,x2-x1,y2-y1); break; case BSRight: case BSLeft: - p->drawRect(x1,y1+1,x2-x1,y2-y1-2); - if ( ( y2-y1 ) & 1 ) { - p->setPen( QPen( c, 0 ) ); - p->drawPoint( x2-1, y2-1 ); - } + p->drawRect(x1,y1,x2-x1,y2-y1); } @@ -580,5 +572,5 @@ void RenderObject::drawBorder(QPainter * case DASHED: if(style == DASHED) - p->setPen(QPen(c, width == 1 ? 0 : width, Qt::DashLine)); + p->setPen(QPen(c, width == 1 ? 0 : width, width == 1 ? Qt::DotLine : Qt::DashLine)); if (width > 0) @@ -702,11 +694,15 @@ void RenderObject::drawBorder(QPainter * } case INSET: - if(s == BSTop || s == BSLeft) - c = c.dark(); - - /* nobreak; */ case OUTSET: - if(style == OUTSET && (s == BSBottom || s == BSRight)) + // ### QColor::light/::dark are horribly slow. Cache this somewhere. + if ( (style == OUTSET && (s == BSBottom || s == BSRight)) || + (style == INSET && ( s == BSTop || s == BSLeft ) ) ) c = c.dark(); + else { + int h, s, v; + c.getHsv( h, s, v ); + c.setHsv( h, s, kMax( 100, v ) ); + c = c.light(); + } /* nobreak; */ case SOLID: |