Version: (using KDE KDE 3.1) Installed from: Mandrake RPMs OS: Linux If a text link is combined with a image link, the text is overwritten with images. The problem didn't occur in Konqueror 3.0. Seen on: http://web-graphics.com/
see test case
Created attachment 1800 [details] test case
*** Bug 45323 has been marked as a duplicate of this bug. ***
Using konkeror 3.1.4. See test case below: In goto.gif put a image valid link to show the test. <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>KHTML test case</title> <style type="text/css"> div.seeAlso { margin-top: 8px; margin-bottom: 12px; } a.seeAlso { background: url("goto.gif") 0px 4px no-repeat; padding-left: 10px; font-weight: normal; color: #101010; } </style> </head> <body> <div class="seeAlso"> <a href="http://www.blahblah.com" class="seeAlso"> CLICK HERE</a> </div> </body> </html>
still seems to occur in HEAD (few weeks old)
*** Bug 67291 has been marked as a duplicate of this bug. ***
*** Bug 69654 has been marked as a duplicate of this bug. ***
Created attachment 3568 [details] test case 2 yet another test case (from bug 69654), which shows that background-repeat works for block elements but not for flow elements.
applying Summary from bug 69654 which is more precise :) please fix this bug for 3.2 (it's still reproducable with a build from 19.11.) as it renders quite some websites unreadable.
*** Bug 69791 has been marked as a duplicate of this bug. ***
still exists with konqueror from kde 3.2beta2
Subject: kdelibs/khtml CVS commit by ggarand: make background images on inlines obey the full CSS specification CCMAIL: 59600-done@bugs.kde.org M +10 -0 ChangeLog 1.151 M +4 -0 rendering/render_line.cpp 1.11 M +24 -5 rendering/render_text.cpp 1.236 M +2 -2 rendering/render_text.h 1.104 --- kdelibs/khtml/ChangeLog #1.150:1.151 @@ -1,2 +1,12 @@ +2004-01-11 Germain Garand <germain@ebooksfrance.org> + + * rendering/render_text.cpp (paintBoxDecorations): + make background images on inlines obbey the full CSS + spec (#59600) + + * rendering/render_text.h (paintBoxDecorations): changed prototype + + * rendering/render_line.cpp (paintDecorations): disable for now. + 2004-01-11 Dirk Mueller <mueller@kde.org> --- kdelibs/khtml/rendering/render_text.cpp #1.235:1.236 @@ -268,5 +268,5 @@ void InlineTextBox::paintDecoration( QPa #endif -void InlineTextBox::paintBoxDecorations(QPainter *pt, RenderStyle* style, RenderText *p, int _tx, int _ty, bool begin, bool end) +void InlineTextBox::paintBoxDecorations(QPainter *pt, RenderStyle* style, RenderText *p, int _tx, int _ty, int curr, int count) { int topExtra = p->borderTop() + p->paddingTop(); @@ -279,4 +279,6 @@ void InlineTextBox::paintBoxDecorations( int width = m_width; + bool begin = !curr; + bool end = (curr == count-1); // the height of the decorations is: topBorder + topPadding + CSS font-size + bottomPadding + bottomBorder @@ -292,7 +294,24 @@ void InlineTextBox::paintBoxDecorations( if(i) { - // ### might need to add some correct offsets - // ### use paddingX/Y - pt->drawTiledPixmap(_tx, _ty, width, height, i->tiled_pixmap(c)); + if (begin && end) { + p->parent()->paintBackgroundExtended(pt, c, i, _ty, height, + _tx, _ty, width, height, + p->borderLeft(), p->borderRight()); + } else { + int mw = 0; + int startX = _tx; + for (int ix=0; ix<count; ix++) { + if(ix == curr) startX -= mw; + mw += static_cast<InlineBox*>(renderText()->m_lines[ix])->width(); + } + QRect clipRect(_tx, _ty, width, height); + clipRect = pt->xForm(clipRect); + pt->save(); + pt->setClipRect( clipRect ); + p->parent()->paintBackgroundExtended(pt, c, i, _ty, height, + startX, _ty, mw, height, + p->borderLeft(), p->borderRight()); + pt->restore(); + } } @@ -963,5 +982,5 @@ void RenderText::paintObject( QPainter * ((pseudoStyle && s->m_firstLine) || (!pseudoStyle && parent()->isInline()))) - s->paintBoxDecorations(p, _style, this, tx, ty, si == 0, si == (int)m_lines.count()-1); + s->paintBoxDecorations(p, _style, this, tx, ty, si, (int)m_lines.count()); if(_style->color() != p->pen().color()) --- kdelibs/khtml/rendering/render_text.h #1.103:1.104 @@ -71,5 +71,5 @@ public: void paintDecoration( QPainter *pt, const Font *f, int _tx, int _ty, int decoration, bool begin, bool end); - void paintBoxDecorations(QPainter *p, RenderStyle* style, RenderText *parent, int _tx, int _ty, bool begin, bool end); + void paintBoxDecorations(QPainter *p, RenderStyle* style, RenderText *parent, int _tx, int _ty, int curr, int count); void paintSelection(const Font *f, RenderText *text, QPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos, int deco); --- kdelibs/khtml/rendering/render_line.cpp #1.10:1.11 @@ -566,4 +566,8 @@ void InlineFlowBox::paintDecorations(QPa // Now paint our text decorations. We only do this if we aren't in quirks mode (i.e., in // almost-strict mode or strict mode). + + // ### disabled for now + return; + _tx += m_x; _ty += m_y;