Closed
Bug 999943
Opened 12 years ago
Closed 12 years ago
getPointAtLength returns the wrong point for some path segments
Categories
(Core :: SVG, defect)
Tracking
()
VERIFIED
FIXED
mozilla32
People
(Reporter: birtles, Assigned: bas.schouten)
References
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
|
931 bytes,
image/svg+xml
|
Details | |
|
1.17 KB,
patch
|
jwatt
:
review+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
The attached test includes an SVG path. We call getPointAtLength at regular intervals along the path length and plot the returned point. The path created by the returned points deviates significantly from the drawn path.
If I change the first path command from:
M17.635,27.137c0,0-17.466,36.073-3.425,45.662...
to, say:
M17.635,27.137c0,1-17.466,36.073-3.425,45.662...
The problem is resolved.
| Reporter | ||
Comment 1•12 years ago
|
||
Attachment #8410776 -
Attachment is obsolete: true
| Reporter | ||
Updated•12 years ago
|
OS: All → Windows 7
Hardware: All → x86_64
Comment 2•12 years ago
|
||
Regressed by 4f086025350f Bug 930577 Convert much of the SVG code for calculating path lengths and position at an offset along a path to Moz2D
Blocks: 930577
status-firefox28:
--- → affected
status-firefox29:
--- → affected
status-firefox30:
--- → affected
status-firefox31:
--- → affected
status-firefox-esr24:
--- → unaffected
tracking-firefox30:
--- → ?
tracking-firefox31:
--- → ?
Component: Graphics → SVG
Keywords: regressionwindow-wanted
Updated•12 years ago
|
| Assignee | ||
Comment 4•12 years ago
|
||
I'll fix this today.
Assignee: nobody → bas
Status: NEW → ASSIGNED
Flags: needinfo?(bas)
| Assignee | ||
Comment 5•12 years ago
|
||
We need min to be the lowest point in the approximation range and max the highest. I accidentally forgot an abs call here which made this not always be true. This fixes that problem.
Attachment #8428440 -
Flags: review?(jwatt)
Comment 6•12 years ago
|
||
Comment on attachment 8428440 [details] [diff] [review]
Use abs to make sure min and max don't get swapped.
r=me, but maybe also consider storing |abs(aTolerance / (cp41.x - cp41.y))| in a variable unless you're absolutely sure all compilers will optimize it away so the division doesn't happen twice. It probably makes it clearer anyway.
Also please note in a comment why we use abs().
And I presume you'll add a test to the Moz2D suite. :)
Attachment #8428440 -
Flags: review?(jwatt) → review+
Comment 7•12 years ago
|
||
We've already shipped this in 28/29 so I'm untracking for upcoming versions. At this point we are too late in the FF30 cycle to take this on so a low risk uplift will have to be considered for later versions when ready.
| Assignee | ||
Comment 8•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0acfd585d47c
https://hg.mozilla.org/integration/mozilla-inbound/rev/b520d877a92e
Fwiw, this is extremely low risk to uplift.
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0acfd585d47c
https://hg.mozilla.org/mozilla-central/rev/b520d877a92e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Comment 10•12 years ago
|
||
(In reply to Bas Schouten (:bas.schouten) from comment #8)
> Fwiw, this is extremely low risk to uplift.
(Sounds like it might be worth requesting aurora approval, then? (though not beta, given comment 7))
Flags: needinfo?(bas)
| Assignee | ||
Comment 11•12 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #10)
> (In reply to Bas Schouten (:bas.schouten) from comment #8)
> > Fwiw, this is extremely low risk to uplift.
>
> (Sounds like it might be worth requesting aurora approval, then? (though not
> beta, given comment 7))
I wanted to give it a day or 2 of nightly coverage :).
Flags: needinfo?(bas)
Comment 12•12 years ago
|
||
Verified fixed 32.0a1 (2014-06-02), win 7 x64
Status: RESOLVED → VERIFIED
status-firefox32:
--- → verified
Comment 14•12 years ago
|
||
(It's release week, so we'll need to request Beta approval instead of Aurora approval now (or soon).)
| Assignee | ||
Comment 15•12 years ago
|
||
Comment on attachment 8428440 [details] [diff] [review]
Use abs to make sure min and max don't get swapped.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 930577
User impact if declined: Incorrect points reported for getPointAtLength
Testing completed (on m-c, etc.): nightly and some aurora testing
Risk to taking this patch (and alternatives if risky): Low
String or IDL/UUID changes made by this patch: None
Attachment #8428440 -
Flags: approval-mozilla-beta?
Flags: needinfo?(bas)
Updated•12 years ago
|
Updated•12 years ago
|
Attachment #8428440 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 16•12 years ago
|
||
Comment 18•12 years ago
|
||
Reproduced the issue on Firefox Nightly from 2014-04-21.
Verified as fixed on Win 7 64bit, using Firefox 31 Beta 2:
- User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
- BuildID: 20140616143923
You need to log in
before you can comment on or make changes to this bug.
Description
•