Bug 56890

Summary: It is possible to calculate a NaN value for "value" in ScrollbarThemeMac::paint()
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: Layout and RenderingAssignee: Beth Dakin <bdakin>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch sam: review+

Beth Dakin
Reported 2011-03-22 19:16:38 PDT
In ScrollbarThemeMac::paint() the following code can result in value being NaN, which is not great: else { // Within the bounds of the scrollable area. value = scrollbar->currentPos() / scrollbar->maximum(); } Patch forthcoming. <rdar://problem/9160621>
Attachments
Patch (1.49 KB, patch)
2011-03-22 19:19 PDT, Beth Dakin
sam: review+
Beth Dakin
Comment 1 2011-03-22 19:19:51 PDT
Sam Weinig
Comment 2 2011-03-22 19:43:42 PDT
Comment on attachment 86561 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=86561&action=review > Source/WebCore/platform/mac/ScrollbarThemeMac.mm:445 > + if (max > 0) > + value = scrollbar->currentPos() / max; I think the whole word maximum here would be better.
Beth Dakin
Comment 3 2011-03-22 20:16:59 PDT
Fixed with revision 81745. Thanks, Sam!
Note You need to log in before you can comment on or make changes to this bug.