NSScroller and HIThemeDrawTrack draw scrollbar thumbs differently

Originator:mihai.parparita
Number:rdar://8881862 Date Originated:18-Jan-2011 03:52 PM
Status:Open Resolved:
Product:Mac OS X Product Version:10.6
Classification:UI/Usability Reproducible:Always
 
Summary: Scrollbar thumbs drawn by NSScroller and HIThemeDrawTrack have different heights and inner wavy patterns.

Steps to Reproduce: Paint a scrollbar track with HIThemeDrawTrack, and repeat with [NSScroller drawKnob] (see code.mm).

Expected Results: Pixel-for-pixel equivalence.

Actual Results: Inner wavy pattern is shifted by 11 pixels, endcaps are different. See scrollbars-HITheme.pn, scrolbars-NSScroller.png and scrollbars-diff.png (different pixels are in red).

Regression:

Notes:
See paintHIThemeScrollbarThumb and paintNSScrollerScrollbarThumb in http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm#L117 for the two equivalent codepaths that produce different results.

This affects the Chromium port of WebKit. More information at:

https://webkit.org/b/51151
http://www.mail-archive.com/chromium-dev@googlegroups.com/msg08115.html

And will soon affect WebKit2 (which also uses HITheme to draw scrollbars, but will be using NSScroller-generated golden files for expected rendering).

Possibly related to this is the fact that, based on http://trac.webkit.org/changeset/76292 (which fixes <rdar://problem/8890255>), on non-SnowLeopard (or Leopard, or Tiger) OSes, WebKit now uses a private "ScrollbarPainter" API.

Comments

Referenced files are at http://persistent.info/webkit/test-cases/scrollbars/

By mihai.parparita at Jan. 18, 2011, 11:56 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!