Summary: | New page does not fully repaint window | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Daniel Richard G. <skunk> |
Component: | khtml | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dantti12, frank78ac, germain |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | The partially repainted page |
Description
Daniel Richard G.
2008-07-13 02:06:42 UTC
Created attachment 26071 [details]
The partially repainted page
Thanks for the bug report. Right now, I cannot reproduce this on either Konqueror 4.1.1 or SVN trunk 856793 by clicking "Next", but I can get something very similar to your screenshot using the method given in bug 170326: Scroll down and press Enter in the location bar. The two bugs are probably duplicates. My original URL above no longer causes the bug. But could you try it again with this one? http://www.google.com/search?hl=en&q=polyester+fur+breathe&start=50&sa=N Scroll to the bottom, hit Next. I'm still unable to get any unusual effects by clicking "Next", but I'm pretty sure that this rendering issue is related to bug 170326 which I can reproduce. Nuts. The URL won't reproduce the bug for me either anymore. I guess I'll have to find a more stable bug-case than a page of Google search results :] Here's hoping the two bugs are one in the same. SVN commit 869761 by ggarand: - fix incomplete repaints happening from time to time when jumping early during page load. (#166413) - various RTL layout application (-reverse cmdline option) fixes . implement RTL scrollbars on CSS containers . fix iframes scrollbars in RTL mode . fix wrong direction when scrolling horizontally (#172258) . fix grey block on left of view (#170679) - avoid smooth scrolling during early stage of layout if the option has the WhenEfficient value BUG: 166413, 172258, 170679 M +1 -1 khtml_part.cpp M +18 -3 khtmlview.cpp M +2 -1 rendering/render_block.cpp M +3 -2 rendering/render_layer.cpp M +2 -1 rendering/render_replaced.cpp --- trunk/KDE/kdelibs/khtml/khtml_part.cpp #869760:869761 @@ -2576,7 +2576,7 @@ bool quirkyName = !n && !d->m_doc->inStrictMode() && (name.isEmpty() || name.toLower() == "top"); if (quirkyName) { - d->m_view->setContentsPos(0, 0); + d->m_view->setContentsPos( d->m_view->contentsX(), 0); return true; } else if (!n) { kDebug(6050) << name << "not found"; --- trunk/KDE/kdelibs/khtml/khtmlview.cpp #869760:869761 @@ -786,7 +786,8 @@ void KHTMLView::setContentsPos( int x, int y) { - horizontalScrollBar()->setValue( x ); + horizontalScrollBar()->setValue( QApplication::isRightToLeft() ? + horizontalScrollBar()->maximum()-x : x ); verticalScrollBar()->setValue( y ); } @@ -2382,6 +2383,13 @@ } } } + case QEvent::Move: { + if (static_cast<QMoveEvent*>(e)->pos() != QPoint(0,0)) { + widget()->move(0,0); + updateScrollBars(); + return true; + } + } default: break; } @@ -3870,6 +3878,8 @@ unscheduleRelayout(); layout(); } + if (d->smoothScrollMode == KHTMLView::SSMWhenEfficient) + d->shouldSmoothScroll = false; } if ( d->smoothScrollMode != SSMDisabled && @@ -3888,6 +3898,9 @@ if (m_part->xmlDocImpl() && m_part->xmlDocImpl()->documentElement()) m_part->xmlDocImpl()->documentElement()->dispatchHTMLEvent(EventImpl::SCROLL_EVENT, false, false); + if (QApplication::isRightToLeft()) + dx = -dx; + if (!d->smoothScrolling) { d->updateContentsXY(); } else { @@ -3907,6 +3920,7 @@ KHTMLView* v = m_kwp->rootViewPos( off ); if (v) w = v->widget(); + off = viewport()->mapTo(this, off); } #ifdef FIX_QT_BROKEN_QWIDGET_SCROLL @@ -3967,8 +3981,6 @@ } return; } - if (d->firstRepaintPending) - return; #ifdef FIX_QT_BROKEN_QWIDGET_SCROLL if (hideScrollBars) { @@ -4359,6 +4371,9 @@ horizontalScrollBar()->setPageStep(p.width()); verticalScrollBar()->setRange(0, v.height() - p.height()); verticalScrollBar()->setPageStep(p.height()); + if (!d->smoothScrolling) { + d->updateContentsXY(); + } } void KHTMLView::slotMouseScrollTimer() --- trunk/KDE/kdelibs/khtml/rendering/render_block.cpp #869760:869761 @@ -2617,7 +2617,8 @@ return false; if (m_layer->verticalScrollbarWidth()) { - QRect vertRect(_tx + width() - borderRight() - m_layer->verticalScrollbarWidth(), + bool rtl = QApplication::isRightToLeft(); + QRect vertRect(_tx + (rtl ? borderLeft() : width() - borderRight() - m_layer->verticalScrollbarWidth()), _ty + borderTop() - borderTopExtra(), m_layer->verticalScrollbarWidth(), height() + borderTopExtra() + borderBottomExtra()-borderTop()-borderBottom()); --- trunk/KDE/kdelibs/khtml/rendering/render_layer.cpp #869760:869761 @@ -843,15 +843,16 @@ if (!m_hBar) b = m_vBar; int sw = b->style()->pixelMetric(QStyle::PM_ScrollBarExtent); + bool rtl = b->layoutDirection() == Qt::RightToLeft; if (m_vBar) { - QRect vBarRect = QRect(tx + w - sw, ty, sw, h - (m_hBar ? sw : 0)); + QRect vBarRect = QRect(tx + (rtl ? 0 : w-sw), ty, sw, h - (m_hBar ? sw : 0)); m_vBar->resize(vBarRect.width(), vBarRect.height()); m_vBar->m_kwp->setPos(QPoint(vBarRect.x(), vBarRect.y())); } if (m_hBar) { - QRect hBarRect = QRect(tx, ty + h - sw, w - (m_vBar ? sw : 0), sw); + QRect hBarRect = QRect(tx + (rtl && m_vBar ? sw : 0), ty + h - sw, w - (!rtl && m_vBar ? sw : 0), sw); m_hBar->resize(hBarRect.width(), hBarRect.height()); m_hBar->m_kwp->setPos(QPoint(hBarRect.x(), hBarRect.y())); } --- trunk/KDE/kdelibs/khtml/rendering/render_replaced.cpp #869760:869761 @@ -794,7 +794,8 @@ if (hbr.isValid() && !hbr.isEmpty()) copyWidget(hbr, p, v->horizontalScrollBar(), tx+ of.x(), ty+ of.y(), buffered, buffer[1]); } - QRect vr = (r & v->viewport()->rect()); + QPoint of = v->viewport()->mapTo(v, QPoint(0,0)); + QRect vr = (r & v->viewport()->rect().translated(of)); if (vr.isValid() && !vr.isEmpty()) v->render(p, vr, thePoint); } else { *** Bug 170326 has been marked as a duplicate of this bug. *** Confirmed that the original bug can no longer be reproduced in an Oct. 12th build (while observable in one from Sep. 28). Thank you, GG, for striking this one down! SVN commit 873671 by ggarand: automatically merged revision 869761: - fix incomplete repaints happening from time to time when jumping early during page load. (#166413) - various RTL layout application (-reverse cmdline option) fixes . implement RTL scrollbars on CSS containers . fix iframes scrollbars in RTL mode . fix wrong direction when scrolling horizontally (#172258) . fix grey block on left of view (#170679) - avoid smooth scrolling during early stage of layout if the option has the WhenEfficient value BUG: 166413, 172258, 170679 M +1 -1 khtml_part.cpp M +18 -3 khtmlview.cpp M +2 -1 rendering/render_block.cpp M +3 -2 rendering/render_layer.cpp M +2 -1 rendering/render_replaced.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=873671 |