Closed Bug 1294969 Opened 5 years ago Closed 5 years ago

textPath no longer follows the path


(Core :: SVG, defect)

50 Branch
Not set



Tracking Status
firefox48 --- unaffected
firefox49 --- unaffected
firefox50 + fixed
firefox51 + verified


(Reporter: longsonr, Assigned: nical)



(Keywords: regression)


(2 files)

No description provided.
Attached image testcase
Attachment #8780845 - Attachment mime type: text/plain → image/svg+xml
Broken on trunk, working on 48
Keywords: regression
[Tracking Requested - why for this release]:

[Tracking Requested - why for this release]:

[Tracking Requested - why for this release]:

[Tracking Requested - why for this release]:

regression range:

So that's going to be bug 278512
Blocks: 278512
Has Regression Range: --- → yes
Has STR: --- → yes
It should be Bug 1278512
Blocks: 1278512
No longer blocks: 278512
Version: unspecified → 50 Branch
Nical, can you please take a look at this regression?
Flags: needinfo?(nical.bugzilla)
The first inflection point in the curve is exactly at t=0.0 which means we don't try to find its linear approximation range and goes directly to FlattenBezierCurveSegment since my patch in bug 1278512. With this particular test case, FlattenBezierCurveSegment computes cp21x31 * which turns out to be zero and we render a straight line to the end of the curve.

The way forward should be to not ignore the inflection points at t=0.0, and handle them appropriately. before bug 1278512, there was a particular combination of inputs where the inflection points would land at t=zero + some other thing that would cause the function to drop the curve completely without even drawing a line to the end of the curve which is even worse, so we have to make sure to not run into it again.
Assignee: nobody → nical.bugzilla
Flags: needinfo?(nical.bugzilla)
The issue the other bug was fixing was happening with inflection points at t==1.0 rather than 0.0. The branch 

> if (t1max >= 0 && t1max < 1.0 && (count == 1 || t2min > t1max))

below should take care of the case when t == 1.0, so there is no other special case to add as far as I can tell. This patch fixes the provided test case.
Attachment #8781516 - Flags: review?(bas)
Attachment #8781516 - Flags: review?(bas) → review+
Pushed by
Path flattening should not skip the first inflection point if it is at t=0.0. r=Bas
Let's wait for a few days to be sure it doesn't cause any regression and then uplift the patch.
Tracking 51+ for this SVG regression.
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Hi Nicolas, the fix has stabilized on Nightly for a few days and was verified. Could you please nominate for uplift to Aurora50?
Flags: needinfo?(nical.bugzilla)
Comment on attachment 8781516 [details] [diff] [review]
Don't skip the first inflection point if it is at t=0.0

Approval Request Comment
[Feature/regressing bug #]:
[User impact if declined]: Rendering correctness issue with text along path in SVG. 
[Describe test coverage new/current, TreeHerder]:
[Risks and why]: very low, rather simple and has been on central for a little while with no problem.
[String/UUID change made/needed]:
Flags: needinfo?(nical.bugzilla)
Attachment #8781516 - Flags: approval-mozilla-aurora?
Comment on attachment 8781516 [details] [diff] [review]
Don't skip the first inflection point if it is at t=0.0

Recent regression in 50, was verified on Nightly, Aurora50+
Attachment #8781516 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.