Closed Bug 1093327 Opened 5 years ago Closed 5 years ago

Incorrect orient="auto" behavior for SVG <polyline> and <polygon> markers


(Core :: SVG, defect)

25 Branch
Not set





(Reporter: dtrebbien, Assigned: longsonr)



(Keywords: regression)


(3 files)

Test case:

In Firefox 33.0.2 on Mac OS 10.10 and Windows 8.1 Pro, as well as Firefox Nightly 36.0a1 (2014-11-03) on Mac, the auto-orientation of <polyline> start markers and <polygon> start & end markers is not correct.

The specification of orient 'auto' has changed slightly between SVG 1.1 and the latest draft from October 10, 2014 of SVG 2:

However, Firefox' behavior is incorrect according to either wording.

If I have done my math right, here is an updated JSFiddle showing the tangent vectors and angle bisector for the two <polygon>s:
According to SVG 1.1, the X axis of the arrow head marker should be aligned with the light red angle bisector vectors.

Results for other browsers:
- IE9 and IE11 correctly implement the wording of SVG 1.1
- Safari 8.0 has no problem with the <polyline> markers. For <polygon>, Safari appears to be implementing the SVG 2 wording; however, Safari is doing something weird with the end marker.
- Chrome 38.0.2125.111 / Blink 537.36 (@183466) also has no problem with the <polyline> markers. For <polygon>, Chrome appears to be implementing the SVG 2 wording; however, Chrome aligns the end marker X axis with the direction out of the initial/final vertex when it should align the end marker "in the direction of the path", which would be the direction into the vertex, I think.
Attached image Test case
Opera 10.63, 11.11, 11.51, 11.62, 12.10, and 12.16 correctly implement the wording of SVG 1.1.
Daniel, have you tried older versions of Firefox? Did this work in some previous version? If so would you be willing to use to find out when things broke?
Hi Robert,

Using BrowserStack, I found that Firefox 4 through 24 correctly implement the wording of SVG 1.1, like IE and Opera (Presto).  Things broke in Firefox 25.

Sure, I can use mozregression.  I will let you know what I find...
Last good revision: b44898282f21 (2013-07-12)
First bad revision: 32c3ccd8946c (2013-07-13)

Maybe the regression was introduced by the patches for Bug 879659?
Keywords: regression
Version: Trunk → 25 Branch
Blocks: 879659
Ever confirmed: true
Assignee: nobody → longsonr
Attached patch marker.txtSplinter Review
Thanks for the testcase and regression range. Very helpful.
Attachment #8517371 - Flags: review?(cam)
Attachment #8517371 - Flags: review?(cam) → review+
Flags: in-testsuite+
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.