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.
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).
Created attachment 19479 [details] Updated test-case, removing unnecessary alerts
Possibly related to Bug 15799 ?
Just an extra note: doing the same manipulation of other elements such as 'rectangle' works.
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.
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
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.
Fixed by #31441.