The default bug view has changed. See this FAQ.

SVG: text-anchor="end" should ignore trailing whitespace

RESOLVED FIXED in mozilla6

Status

()

Core
SVG
RESOLVED FIXED
8 years ago
6 years ago

People

(Reporter: jonathan chetwynd, Unassigned)

Tracking

({testcase})

unspecified
mozilla6
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

8 years ago
Created attachment 387450 [details]
testcase

each line of text should be aligned on right-hand.
NB: last item is thrown-out to right.

same bug in opera
parity webkit

this should be an "easy-fix"
(Reporter)

Updated

8 years ago
Keywords: testcase

Comment 1

8 years ago
(In reply to comment #0)
> this should be an "easy-fix"

Happy to review any easy patch you submit then :-)

Updated

8 years ago

Updated

8 years ago
Keywords: regressionwindow-wanted
Created attachment 396692 [details]
Modified test case which doesn't reproduce the issue (for comparison)

Seems to be due to white space handling: by removing the white space notes from within the text element, all strings pass to be properly aligned right.

This suggests that the description is wrong: it's not the last item which is shifted right, it's the remaining items shifted left! ;-)

There's a somehow related white space handling noted in another bug's comment [1] (second bullet in "Few thoughts"), which suggests that maybe white space handling should deserve a bug of it's own.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=292498#c10

Comment 3

8 years ago
Reproducible on Win2003 Server (FF 3.5.2), suggest Platform => All

Updated

7 years ago
Summary: SVG: text-anchor="end" broken → SVG: text-anchor="end" should ignore trailing whitespace

Updated

7 years ago
Keywords: regressionwindow-wanted

Comment 4

7 years ago
(In reply to comment #2)
> 
> This suggests that the description is wrong: it's not the last item which is
> shifted right, it's the remaining items shifted left! ;-)

Correct. You could replace the whitespace by letters to see what's going on. The final whitespace is suppressed because the default processing mode for text is xml:space="default" which removes initial and trailing whitespace and compresses internal whitespace to one space.
Just confirmed that it still reproduces for both stable and trunk (using a nightly build) on Windows. Adjusting platform to "All" as suggested in comment #3.
OS: Mac OS X → All
Hardware: PowerPC → All

Updated

6 years ago

Updated

6 years ago
Depends on: 620286

Comment 6

6 years ago
Fixed by patch in bug 620286
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
(Reporter)

Comment 7

6 years ago
wfm, cheers ~:"
You need to log in before you can comment on or make changes to this bug.