Last Comment Bug 503075 - SVG: text-anchor="end" should ignore trailing whitespace
: SVG: text-anchor="end" should ignore trailing whitespace
Status: RESOLVED FIXED
: testcase
Product: Core
Classification: Components
Component: SVG (show other bugs)
: unspecified
: All All
: -- normal with 3 votes (vote)
: mozilla6
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 620286
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-08 07:10 PDT by jonathan chetwynd
Modified: 2011-05-10 00:25 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (549 bytes, image/svg+xml)
2009-07-08 07:10 PDT, jonathan chetwynd
no flags Details
Modified test case which doesn't reproduce the issue (for comparison) (547 bytes, image/svg+xml)
2009-08-26 01:59 PDT, Helder "Lthere" Magalhães
no flags Details

Description jonathan chetwynd 2009-07-08 07:10:43 PDT
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"
Comment 1 Robert Longson 2009-07-08 07:19:34 PDT
(In reply to comment #0)
> this should be an "easy-fix"

Happy to review any easy patch you submit then :-)
Comment 2 Helder "Lthere" Magalhães 2009-08-26 01:59:11 PDT
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 Mike Capp 2009-08-28 04:12:41 PDT
Reproducible on Win2003 Server (FF 3.5.2), suggest Platform => All
Comment 4 Robert Longson 2009-12-09 14:06:35 PST
(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.
Comment 5 Helder "Lthere" Magalhães 2010-08-10 02:29:24 PDT
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.
Comment 6 Robert Longson 2011-05-05 00:43:31 PDT
Fixed by patch in bug 620286
Comment 7 jonathan chetwynd 2011-05-10 00:25:26 PDT
wfm, cheers ~:"

Note You need to log in before you can comment on or make changes to this bug.