Bug 26490

Summary: Add isFinite method to floating point types.
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Enhancement    
Priority: P5    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Add 'isFinite' operator to floating point types none

Brent Fulgham
Reported 2009-06-17 12:34:00 PDT
There are several places where invalid floating point types will cause graphic subroutines to generate errors or bring the program down. These places are generally protected with various calls to "isfinite" or "isnan", frequently for each element in a multi-valued object (such as FloatPoint). This bug adds an isFinite method to these classes to clean up some of the code in the rest of the system.
Attachments
Add 'isFinite' operator to floating point types (3.21 KB, patch)
2009-07-02 09:47 PDT, Brent Fulgham
no flags
Brent Fulgham
Comment 1 2009-07-02 09:47:49 PDT
Created attachment 32185 [details] Add 'isFinite' operator to floating point types I put this patch together and realized the only place it's really useful (so far) is in the ImageCairo.cpp file. Is this change really worth it? I didn't bother writing changelog, etc., since it seems like the patch is sort of useless unless several routines are changed from using sets of bare float/double values to the corresponding WebKit types. Examples: (1) html/CanvasRenderingContext2D.cpp is passed the individual ordinates as separate values (rather than as a single WebKit type) that are then tested for finite-ness. (2) page/DOMWindow.cpp tests for 'isfinite' in separate ASSERTs, but I don't think the code is helped by using a WebKit type check here, as it would lose the ability to see which ASSERT is failing.
Note You need to log in before you can comment on or make changes to this bug.