Bug 17633

Summary: SVG: modifying x & y attribute of text element from JS fails
Product: WebKit Reporter: Andre-John Mas <andrejohn.mas>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Test case illustrating the issue
none
Updated test-case, removing unnecessary alerts
none
First attempt oliver: review+

Andre-John Mas
Reported 2008-03-01 20:32:56 PST
Tested with nightly of 2008-03-01 If you try modifying the x and y attributes of a text element they are ignored, from Javascript, when they should be taken into account. In other words if I change x from 200 to 300, then the object remains at 200. I have compared this behaviour with Opera 9.5 and Firefox where the object moves. This behaviour should be corrected in Webkit.
Attachments
Test case illustrating the issue (2.11 KB, image/svg+xml)
2008-03-01 20:35 PST, Andre-John Mas
no flags
Updated test-case, removing unnecessary alerts (1.87 KB, image/svg+xml)
2008-03-01 20:36 PST, Andre-John Mas
no flags
First attempt (8.89 KB, patch)
2008-03-30 03:38 PDT, Rob Buis
oliver: review+
Andre-John Mas
Comment 1 2008-03-01 20:35:03 PST
Created attachment 19478 [details] Test case illustrating the issue I have attached a test case which illustrates the issue. Here you see that both rectangles are moved to the new location (correct behaviour), but not the text element (incorrect behaviour).
Andre-John Mas
Comment 2 2008-03-01 20:36:41 PST
Created attachment 19479 [details] Updated test-case, removing unnecessary alerts
Adam Rofer
Comment 3 2008-03-20 10:57:15 PDT
Possibly related to Bug 15799 ?
Andre-John Mas
Comment 4 2008-03-20 11:25:39 PDT
Just an extra note: doing the same manipulation of other elements such as 'rectangle' works.
Rob Buis
Comment 5 2008-03-30 03:38:42 PDT
Created attachment 20211 [details] First attempt This should fix the bug. It does not cover setting for example rotate on text though. Also I intend this so far only for <text>, not <tspan>. I think we should make seperate bugs for them and ofcourse also testcase(s) for those bugs. Cheers, Rob.
Oliver Hunt
Comment 6 2008-03-30 04:26:56 PDT
Comment on attachment 20211 [details] First attempt Looks good. I'd like the testcase to be pure text output though -- dumpAsText() is your friend :D
Rob Buis
Comment 7 2008-03-30 10:17:18 PDT
Hi Oliver, (In reply to comment #6) > (From update of attachment 20211 [details] [edit]) > Looks good. I'd like the testcase to be pure text output though -- > dumpAsText() is your friend :D I didnt see a way to make it work that way. The test relies on the end position of the text. Eric didnt see an (easy) way either. Anyway, let me know if you feel I missed an opportunity to use dumpAsText here, then I will replace the testcase. Cheers, Rob.
Rob Buis
Comment 8 2008-03-30 10:18:35 PDT
Fixed by #31441.
Note You need to log in before you can comment on or make changes to this bug.