[Webkit-unassigned] [Bug 51151] New: NSScrollView-based scrollbars and ScrollBarTheme-based scrollbars don't look the same
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 15 16:53:44 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=51151
Summary: NSScrollView-based scrollbars and ScrollBarTheme-based
scrollbars don't look the same
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: dglazkov at chromium.org
CC: hyatt at apple.com, jamesr at chromium.org,
mihaip at chromium.org
It's an odd thing, but it appears that painting scrollbars using HIThemeDrawTrack and just relying on NSScrollView to make them doesn't produce the same result. Here's an example:
Exhibit A: http://svn.webkit.org/repository/webkit/trunk/LayoutTests/platform/mac/fast/block/float/008-expected.png (uses NSScrollView to paint scrollbars)
Exhibit B: http://build.webkit.org/results/Chromium%20Mac%20Release%20(Tests)/r74045%20(3464)/fast/block/float/008-actual.png (uses ScrollBarTheme)
Exhibit C: http://build.webkit.org/results/Chromium%20Mac%20Release%20(Tests)/r74045%20(3464)/fast/block/float/008-diff.png (the diff between the two)
I spent a day trying to hack ScrollbarThemeChromiumMac.mm into submission, just trying to see what the problem is. Turns out there are lots of funny little issues:
1) The proportions of the thumb are different for each path. Not sure why, but it requires tweaking SliderTrackInfo::viewsize to get them to match. The amount seems to be some proportional value, because it varies depending on the value of max/value in ThemeTrackDrawInfo.
2) The wavey Aqua texture on NSScrollView is off by exactly -11px compared to hand-drawn scrollbars. Again, not sure why. So I wrote an extra step to shift the thumb down, paint into a buffer, then paint back onto the track shifted upwards by the same amount.
3) Even after that, the caps on the thumb don't match! For some reason, they are also drawn differently.
To summarize, I think it might be worth pursuing other options, such as:
1) convert Mac port to hand-drawn scrollbars and rebaseline the tests;
2) cry into a pillow.
Unless someone has better ideas? :)
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list