Bug 179122 - -webkit-scroll size and position not painted correctly under browser zoom
Summary: -webkit-scroll size and position not painted correctly under browser zoom
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 10
Hardware: Mac macOS 10.12.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-01 09:47 PDT by Danyao Wang
Modified: 2017-11-08 11:16 PST (History)
5 users (show)

See Also:


Attachments
Screen capture video showing the buggy behavior (7.63 MB, video/quicktime)
2017-11-01 09:47 PDT, Danyao Wang
no flags Details
Buggy behavior on a real website (1.74 MB, video/quicktime)
2017-11-03 10:32 PDT, Danyao Wang
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Danyao Wang 2017-11-01 09:47:51 PDT
Created attachment 325580 [details]
Screen capture video showing the buggy behavior

Reproduction steps:
1. Load a page that uses -webkit-scrollbar, e.g.
   http://w3c-test.org/visual-viewport/viewport-dimensions-custom-scrollbars-manual.html
   Notice that the custom vertical and horizontal scrollbars touch at the corner
2. Press Ctrl/+ several times. Notice a gap appearing between the corners of the vertical and horizontal scrollbars
3. Press Ctrl/- once. Notice that the scrollbars are not touching at the corner, but a gap appears between each scrollbar and the respective page edge.
4. Press Ctrl/- a few more times. Notice that the edge gaps persist.
5. Press Ctrl/+ once. Notice that the edge gaps disappear, but the corner gap reappears.
Comment 1 Simon Fraser (smfr) 2017-11-01 11:00:02 PDT
Does this affect real sites?
Comment 2 Radar WebKit Bug Importer 2017-11-01 11:01:11 PDT
<rdar://problem/35296527>
Comment 3 Danyao Wang 2017-11-03 10:32:19 PDT
The impact on real websites is probably not too large. I spent 30 minutes digging through URLs from HTTPArchive that use -webkit-scrollbar, and only found one website where the problem is somewhat visible:

http://www.toixemphim.net/p/lich-phim.html

Even in this case, I'd have to zoom in to see the buggy behavior. Movie attached.

HTTPArchive data reports ~3% CSS files out there in the wild uses this prefix. But it's hard to tell whether that translate into user visible impact. From the small sample size of ~100 URLs I looked at, it seems that either the style is not applied to the main element, so this bug is not manifesting, or the scrollbar is so small the effect of the bug is minimal. I wish we have better tools to know when custom scrollbar is actually rendered.

Just a wild question: would you consider deprecating support for webkit-scrollbar? Most mainstream sites don't seem to use it anyways...
Comment 4 Danyao Wang 2017-11-03 10:32:50 PDT
Created attachment 325912 [details]
Buggy behavior on a real website
Comment 5 Simon Fraser (smfr) 2017-11-03 11:16:01 PDT
If you can get gmail off of it, sure :)

It's also used on neatorama.com.
Comment 6 Simon Fraser (smfr) 2017-11-03 11:16:40 PDT
Some sites also use it to hide the scrollbar (esp. with -webkit-overflow-scrolling: touch) so we'd need new CSS to do that.