Bug 157883 - Scrolling is completely broken in trunk
Summary: Scrolling is completely broken in trunk
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal with 20 votes (vote)
Target Milestone: ---
Assignee: Konqueror Developers
Depends on:
Reported: 2008-02-15 19:00 UTC by András Manţia
Modified: 2009-04-18 12:57 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description András Manţia 2008-02-15 19:00:46 UTC
Trunk from today, running on Qt 4.4 snapshot (qt-copy, all patches applied). It 
seems scrolling is pretty broken, on all web pages. Usually when you move the 
scrollbar, the top and bottom parts are scrolled, the center remains unchanged. 
It does not happen  when using pgdn, pgup (or clickin somewhere on the 
scrollbar), just when scrolling with the up/down button or dragging the 
Hm, might be qt-copy patch???
Comment 1 András Manţia 2008-02-15 19:04:40 UTC
It wasn't completely correct what I wrote: pgup/pgdn is also broken, but it is not that visible. bugs.kde.org is a good testpage.
Comment 2 András Manţia 2008-02-16 09:12:00 UTC
Some updates:
- scrolling works OK when you start Konqueror on bugs.kde.org
- open the following site: http://www.rdi-board.com/forumdisplay.php?f=9 . As I run on 64bit, I disabled plugins (for real, Enable plugins globally is not checked, and I removed the path to /usr/lib64/browser-plugins and run a scan so no plugins are found). I get the Missing Plugin dialog for Shockwave Flash. Click on Do Not Download.
- scrolling is really broken now
- if I open a new tab, scrolling is broken on bugs.kde.org as well.
Comment 3 Dario Panico 2008-03-01 22:31:19 UTC
i experienced it when a page with a flash object is rendered (via nsplugin)
Comment 4 Dario Panico 2008-03-01 23:04:58 UTC

What I was doing:
1. go to a website (kde-look.org), scrolling works fine
2. go to a website (pollycoke.net) with a flash object to be loaded via nsplugin
(the object is the big gray square)
3. go back to the first URL (kde-look.org) scrolling is broken
4. go to another url (liceotosi.va.it) to show another case of broken scrolling
Comment 5 András Manţia 2008-03-02 09:53:34 UTC
The problem is that  I see this behavior also in KMail (which uses khtml 
to display the mail), and there is no flash involved for sure.
Comment 6 makosoft 2008-03-07 23:49:42 UTC
Same here - KDE trunk (couple of days old). Not only does using PgUp and PgDown not work quite correctly, clicking on the scrollbar doesn't always either. Specifically, the last time I scroll down using this method on an affected page (which seems to be pretty much everything), the area at the top that should show the part of the page visible before scrolling isn't updated correctly. A similar thing happens with PgUp and PgDown - they always scroll just under a full page, so there's an area of the page at the bottom or top of the window respectively that was visible before hitting the key and doesn't get redrawn properly/at all.

I'm using KDE trunk and qt-copy from a couple of days ago, as well as xorg-server (Gentoo patched version) and Nouveau, which would probably exclude me from reporting the issue myself.
Comment 7 Germain Garand 2008-03-10 10:21:46 UTC
does it happen when starting konqueror with


(in a console)?
Comment 8 András Manţia 2008-03-10 10:30:10 UTC
Actually I use this for a few days, because of bug #157659, and I did 
not see the problem since. I'll comment here if it happens again.
Comment 9 Germain Garand 2008-03-10 10:43:26 UTC
allright... meanwhile I'll disable alien widgets in KHTML for the time being.

We have basically no use for those anyway and we have enough Qt bugs to deal with elsewhere.
Comment 10 Germain Garand 2008-03-10 11:35:09 UTC
SVN commit 783986 by ggarand:

disable alien widgets on khtmlview
while they break scroll blitting

CCBUG: 157883

 M  +6 -0      khtmlview.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=783986
Comment 11 András Manţia 2008-03-11 21:46:41 UTC
Unless there were other KHTML commits to fix bug 158664, I think that disabling of alien widgets fixed it.
Comment 12 Germain Garand 2008-03-12 06:48:13 UTC
 András: no, it's unrelated, I disabled form widgets drawing optimizations in another commit, to cope with the buggy state of qt-copy (r783807).

It looks like I'll have to revert the disabling of alien widgets anyway, as it triggers other Qt scrolling bugs in kopete. Mixing alien and native widgets doesn't seem trivial at all.

One will have to use QT_USE_NATIVE_WINDOWS=1 for the time beeing...
Comment 13 Germain Garand 2008-03-12 08:18:33 UTC
all right, might not need to revert eventually. I've been working on a big scrolling optimization I had in mind for a very long time, and it seem it has the nice side effect of keeping Qt happy in all situations...
Comment 14 Germain Garand 2008-03-12 09:09:46 UTC
SVN commit 784703 by ggarand:

Large optimization of scrolling for pages containing "position: fixed"

.replace the dumb approach of repainting the whole page always,
 by collecting fixed regions, repainting them individually,
 then blit-scrolling the remaining surface.

.also maintain a tighter count of fixed objects, so that changes of
 styles might trigger a switch from static to blitting (i.e. fast)

.consequently, go all the way to using QWidget::scroll()
 instead of native QWidget::move() for scrolling, so as to avoid the
 unescapable flicker when switching from a method to the other.
 QWidget::scroll is - I believe, a tad slower, but not significantly so,
 and the gain in overall browsing smoothness is very satisfactory.

-change of scrolling method conveniently allows to avoid the serious
 scrolling bugs in 4.4 beta, making it possible to remove the disabling
 of alien widgets, which in turn should fix the problems Roman encountered
 in Kopete.

CCMAIL: kedgedev@centrum.cz
CCBUG: 157883

 M  +1 -11     css/cssstyleselector.cpp  
 M  +97 -52    khtmlview.cpp  
 M  +4 -1      khtmlview.h  
 M  +1 -1      rendering/render_block.h  
 M  +16 -0     rendering/render_canvas.cpp  
 M  +1 -0      rendering/render_canvas.h  
 M  +2 -0      rendering/render_layer.cpp  
 M  +26 -1     rendering/render_object.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=784703
Comment 15 Germain Garand 2008-03-12 09:41:01 UTC
SVN commit 784727 by ggarand:

automatically merged revision 783986:
disable alien widgets on khtmlview
while they break scroll blitting

CCBUG: 157883

 M  +6 -0      khtmlview.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=784727
Comment 16 András Manţia 2008-05-10 16:53:29 UTC
This is fixed now, the new scrolling bug is 161148.
Comment 17 András Manţia 2009-04-18 12:57:43 UTC
Recently (r954446) I saw it again on two sites, in a short time-frame. Nothing else changed on my system, but my trunk checkout was updated (last update was ~10 days ago). I don't reopen (yet), I'll wait to see it again, but anyway I wanted to let you know about it.