[Webkit-unassigned] [Bug 80879] Mock scrollbars differ by 1px in DRT vs. WKTR

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 5 11:28:50 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=80879





--- Comment #10 from Darin Adler <darin at apple.com>  2012-06-05 11:28:48 PST ---
(From update of attachment 145639)
View in context: https://bugs.webkit.org/attachment.cgi?id=145639&action=review

> Source/WebCore/platform/ScrollbarThemeComposite.cpp:245
> +    int length = round(proportion * trackLen);

Since we are rounding a float and want the result to be an int, the best function is lroundf.

By using round, we are converting from float to double, then rounding to another double, then converting to an int.

If we used lroundf, we would pass in a float, then get a long as a result, and then we would be good, since long and int are the same type on all the compilers that are used to compile WebKit.

-- 
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