Bug 12925 - PathTraversalState's normalAngleAtLength/pointAtLength don't work.
Summary: PathTraversalState's normalAngleAtLength/pointAtLength don't work.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nikolas Zimmermann
URL:
Keywords:
: 12924 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-28 03:46 PST by Nikolas Zimmermann
Modified: 2007-03-05 16:19 PST (History)
0 users

See Also:


Attachments
Initial patch (4.97 KB, patch)
2007-02-28 03:50 PST, Nikolas Zimmermann
no flags Details | Formatted Diff | Diff
Update patch (10.06 KB, patch)
2007-02-28 05:48 PST, Nikolas Zimmermann
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolas Zimmermann 2007-02-28 03:46:21 PST
Path::pointAtLength() uses PathTraversalState to iterate through the segments. This comment says it all: "// FIXME: Need to actually find the exact point and change m_current".

For Path::normalAngleAtLength() to work the tangent slope calculation has to be corrected. Attaching patch to fix both.
Comment 1 Nikolas Zimmermann 2007-02-28 03:47:59 PST
*** Bug 12924 has been marked as a duplicate of this bug. ***
Comment 2 Nikolas Zimmermann 2007-02-28 03:50:26 PST
Created attachment 13419 [details]
Initial patch

Not marking for review, as it's probably not being accepted in the stabilization spree.
Comment 3 Nikolas Zimmermann 2007-02-28 05:48:39 PST
Created attachment 13420 [details]
Update patch

Just realized that the pointAtLength() stuff is actally exposed via SVGPathElement's interfaces. We shouldn't release it that buggy - added new LayoutTest covering that these methods actually work. Not a P1, but still marking for review - as it would be annoying to release Safari with that bug.
Comment 4 Darin Adler 2007-03-04 23:00:33 PST
Comment on attachment 13420 [details]
Update patch

+            static float rad2deg = 180.0 / M_PI;

Really should include "const" in there too.

Is there a way to test this so that the results are numeric instead of visual? If so, I'd love to see a test like that as well as the visual one!

r=me
Comment 5 Nikolas Zimmermann 2007-03-05 16:19:56 PST
Landed in r19970.