RESOLVED WORKSFORME 48017
Incorrect scrolling behavior with the compositor and position: fixed elements
https://bugs.webkit.org/show_bug.cgi?id=48017
Summary Incorrect scrolling behavior with the compositor and position: fixed elements
Mihai Parparita
Reported 2010-10-20 15:49:17 PDT
Created attachment 71350 [details] Test case Load the attached test case. Scroll the page. Expected behavior: nothing scrolls, since the content is an position: fixed element. Actual behavior: The gray rectangle stays put, but the text around it scrolls. This is triggered by -webkit-transform: translateZ(0px) property on the gray element, hence the suspicion that the compositor is involved. This is a reduction of http://crbug.com/58982, which is a bug that affects twitter.com. This is not a recent WebKit regression (happens with Safari 5.0.2), but only started to happen with Chrome 8 (where I believe we enabled the compositor for the first time).
Attachments
Test case (486 bytes, text/html)
2010-10-20 15:49 PDT, Mihai Parparita
no flags
Screenshot (292.77 KB, image/png)
2010-10-20 16:12 PDT, Mihai Parparita
no flags
Simon Fraser (smfr)
Comment 1 2010-10-20 16:03:26 PDT
Simon Fraser (smfr)
Comment 2 2010-10-20 16:04:28 PDT
Can you give the Twitter URL that shows this?
Mihai Parparita
Comment 3 2010-10-20 16:11:39 PDT
Twitter doesn't seem to have permalinks for expanded pages, but to reproduce: 1. Set the user agent to "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7" (otherwise the map data doesn't load at all, presumably another bug on Twitter's side) 1. Load http://twitter.com/#!/anildash (while signed in) 2. Find a tweet with a location (any that say "from Gramercy Park") and click on it 3. Scroll the whole page and/or the right-side preview area.
Mihai Parparita
Comment 4 2010-10-20 16:12:01 PDT
Created attachment 71352 [details] Screenshot
Simon Fraser (smfr)
Comment 5 2010-12-08 21:59:55 PST
I think the issue is that we normally repaint the entire view after scrolling if there are fixed position elements. However, with compositing layers, we don't. This may also affect fixed backgrounds too.
Simon Fraser (smfr)
Comment 6 2010-12-08 22:00:57 PST
The easy fix is to do more repainting. A smarter fix would be to make compositing layers for position:fixed elements (if there is other compositing on the page), so that we can scroll without painting.
Julien Chaffraix
Comment 7 2011-12-01 09:38:21 PST
> A smarter fix would be to make compositing layers for position:fixed elements (if there is other compositing on the page), so that we can scroll without painting. For the record, bug 69796 landed which enables composited layers for position: fixed elements. However the bug is still present (tested on ToT Chromium).
lars.sonchocky-helldorf
Comment 8 2012-04-13 15:00:02 PDT
I've reported https://bugs.webkit.org/show_bug.cgi?id=83948 since to me this appears a different issue. If this is not the case please close 83948 as duplicate.
Simon Fraser (smfr)
Comment 9 2015-07-22 17:45:02 PDT
This seems to work correctly now.
Note You need to log in before you can comment on or make changes to this bug.