Closed Bug 503075 Opened 15 years ago Closed 13 years ago

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

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla6

People

(Reporter: jay, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(2 files)

Attached image 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"
Keywords: testcase
(In reply to comment #0)
> this should be an "easy-fix"

Happy to review any easy patch you submit then :-)
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
Reproducible on Win2003 Server (FF 3.5.2), suggest Platform => All
Summary: SVG: text-anchor="end" broken → SVG: text-anchor="end" should ignore trailing whitespace
(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
Depends on: 620286
Fixed by patch in bug 620286
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
wfm, cheers ~:"
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: