Bug 29137

Summary: [WinCE] Loss of accuracy: Using abs() instead of fabs() in addArcTo()
Product: WebKit Reporter: Jakob Petsovits <jpetsovits>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: paroga, staikos
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Other   
Attachments:
Description Flags
Use fabs() in order to fix addArcTo(). eric: review-

Description Jakob Petsovits 2009-09-10 12:00:33 PDT
PlatformPathWinCE does lots of calculations on doubles, but in one place in addArcTo() it's unintentionally using the integer abs() function instead of fabs(), thus losing accuracy, which can lead to incorrect drawing of arcs.

See the patch below which fixes this.
Comment 1 Jakob Petsovits 2009-09-10 12:06:20 PDT
Created attachment 39365 [details]
Use fabs() in order to fix addArcTo().

No new tests (OOPS!)... what should I do about that? Does WinCE come with pixel tests? If so, how can I generate some without running some WinCE emulator? Can we skip the tests because it's an obvious bug anyways, and I'm not hugely motivated to write some? the answer my friend, etc.
Comment 2 Eric Seidel (no email) 2009-09-15 23:12:59 PDT
Comment on attachment 39365 [details]
Use fabs() in order to fix addArcTo().

Every change requires tests or explanation as to why testing is impossible/impractical.  I'm not sure that wince has pixel tests, which would be an explanation as to why it's impossible.
Comment 3 George Staikos 2009-09-17 13:13:33 PDT
It has no pixel tests, therefore I think it should be r+.  If no objection I will do so.
Comment 4 Patrick R. Gansterer 2010-07-31 12:46:46 PDT
I think we can close this bug now, because the same change was landed with http://trac.webkit.org/changeset/63976.
Comment 5 Patrick R. Gansterer 2010-09-15 16:40:19 PDT
Landed with http://trac.webkit.org/changeset/63976.