Bug 100957 - [WK1] Fixed-position elements jiggle up and down slightly during scrolling on a Retina display
Summary: [WK1] Fixed-position elements jiggle up and down slightly during scrolling on...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh Intel OS X 10.8
: P2 Normal
Assignee: Adam Roben (:aroben)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-11-01 07:15 PDT by Adam Roben (:aroben)
Modified: 2012-11-01 13:58 PDT (History)
5 users (show)

See Also:


Attachments
testcase (396 bytes, text/html)
2012-11-01 07:15 PDT, Adam Roben (:aroben)
no flags Details
Patch (1.92 KB, patch)
2012-11-01 11:25 PDT, Adam Roben (:aroben)
no flags Details | Formatted Diff | Diff
Patch (2.77 KB, patch)
2012-11-01 12:02 PDT, Adam Roben (:aroben)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2012-11-01 07:15:42 PDT
Created attachment 171842 [details]
testcase

To reproduce:

1. Set your display to a Retina resolution
2. Load the attached test case in WebKit1
3. Scroll up and down a bit

The fixed div jiggles up and down slightly while scrolling. This does not happen in WebKit2.
Comment 1 Adam Roben (:aroben) 2012-11-01 07:34:42 PDT
This even happens waaaaaay back in the r37376 nightly build.
Comment 2 Adam Roben (:aroben) 2012-11-01 07:41:14 PDT
The bug gets worse if the fixed-position element has -webkit-transform:translate3d(0,0,0) applied to it. Then it jiggles by two device pixels instead of one.
Comment 3 Beth Dakin 2012-11-01 10:18:00 PDT
Adam Roben!!

I could have sworn we fixed this. Simon, did we fix this?
Comment 4 Adam Roben (:aroben) 2012-11-01 10:38:54 PDT
Turning off Settings::setFixedPositionCreatesStackingContext does not fix this.
Comment 5 Adam Roben (:aroben) 2012-11-01 10:51:29 PDT
Simon helped us realize that WebKit2 only scrolls by full pixels, even in Retina mode, while AppKit will scroll by half-pixels in Retina mode. WebCore can only represent full pixels at the moment, so this is probably the source of the bug.
Comment 6 Beth Dakin 2012-11-01 11:07:04 PDT
Ah yes, this is in Radar as <rdar://problem/11244706>
Comment 7 Adam Roben (:aroben) 2012-11-01 11:25:11 PDT
Created attachment 171899 [details]
Patch
Comment 8 Simon Fraser (smfr) 2012-11-01 11:27:54 PDT
Comment on attachment 171899 [details]
Patch

It seems unfortunate to impact the scrolling behavior of every app using WK1, whether or not they have fixed position elements. Maybe this should be opt-in somehow?
Comment 9 Adam Roben (:aroben) 2012-11-01 12:02:31 PDT
Created attachment 171904 [details]
Patch
Comment 10 Adam Roben (:aroben) 2012-11-01 12:03:10 PDT
OK, added a new patch that only affects pages with position:fixed or position:sticky elements. It is not currently opt-in.

Simon, were you imagining a new preference key? Or some other opt-in mechanism?
Comment 11 WebKit Review Bot 2012-11-01 13:58:09 PDT
Comment on attachment 171904 [details]
Patch

Clearing flags on attachment: 171904

Committed r133225: <http://trac.webkit.org/changeset/133225>
Comment 12 WebKit Review Bot 2012-11-01 13:58:12 PDT
All reviewed patches have been landed.  Closing bug.