Closed Bug 936670 Opened 11 years ago Closed 11 years ago

right-anchor is not applied while rendering text in svg

Categories

(Core :: SVG, defect, P3)

25 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla28
Tracking Status
firefox25 - wontfix
firefox26 - fixed
firefox27 - fixed
firefox28 - fixed
firefox-esr24 --- unaffected
b2g-v1.2 --- fixed

People

(Reporter: gr.hayduk, Assigned: heycam)

References

()

Details

(Keywords: regression, testcase, Whiteboard: [good first verify])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 (Beta/Release)
Build ID: 20131025151332

Steps to reproduce:

Display svg generated with gnuplot. The svg contains a text with text-anchor:end. See http://home.agh.edu.pl/~hayduk/ff25bug/psegs.html


Actual results:

The text is displayed at wrong position, such as text-anchor:end in svg was not applied - see the Y axis labels. They are displayed over the axis, not on the left of the axis.


Expected results:

Y axis labels in example svg chart should be displayed to the left of the axis, as they are i.e. in Chrome. They were displayed correctly in FF from June 2012.
This looks like a regression from bug 655877 as the labels are positioned correctly when
about:config?filter=svg.text.css-frames.enabled is set to false
Blocks: svgtext
Component: Untriaged → SVG
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86_64 → All
Attached image reduced testcase
It seems to be right adjusting the space and then putting the text after that.
Attachment #829557 - Attachment mime type: text/plain → image/svg+xml
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression, testcase
Priority: -- → P3
Attached patch patchSplinter Review
We were getting the position assigned to the trimmed-away white space character, which doesn't have the right mPositions[].mPosition value to use for the positioning of the run.  Haven't looked for where this bug was introduced or whether it was there from the initial landing of the new text support.
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #829729 - Flags: review?(longsonr)
Attachment #829729 - Flags: review?(longsonr) → review+
This bug (certain text in SVG documents could be positioned incorrectly) also probably isn't serious enough to land on Release; setting track? on current branches, though.
https://hg.mozilla.org/mozilla-central/rev/6f5bbe846139
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Comment on attachment 829729 [details] [diff] [review]
patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 839955
User impact if declined: some SVG content may display incorrectly
Testing completed (on m-c, etc.): only just landed on m-c, but automated test added
Risk to taking this patch (and alternatives if risky): low risk
String or IDL/UUID changes made by this patch: N/A
Attachment #829729 - Flags: approval-mozilla-beta?
Attachment #829729 - Flags: approval-mozilla-aurora?
No need to track this, it's a regression from 21 but will take the low risk uplift to branches.
Attachment #829729 - Flags: approval-mozilla-beta?
Attachment #829729 - Flags: approval-mozilla-beta+
Attachment #829729 - Flags: approval-mozilla-aurora?
Attachment #829729 - Flags: approval-mozilla-aurora+
Bug 839955 where we turned the pref on is really where the regression is, so that's Firefox 25.
Whiteboard: [good first verify]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: