Bug 19814 - getComputedTextLength always returns 0 with tspan elements
Summary: getComputedTextLength always returns 0 with tspan elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Nikolas Zimmermann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-29 11:16 PDT by John Moe
Modified: 2011-04-06 02:24 PDT (History)
2 users (show)

See Also:


Attachments
Example (514 bytes, image/svg+xml)
2008-06-29 11:18 PDT, John Moe
no flags Details
Testcase (1.88 KB, patch)
2011-04-06 00:42 PDT, Nikolas Zimmermann
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Moe 2008-06-29 11:16:47 PDT
getComputedTextLength always returns 0 with tspan elements.  FF3 does not.
Comment 1 John Moe 2008-06-29 11:18:24 PDT
Created attachment 21997 [details]
Example

Should alert the same number twice.  Instead will be 42 (or so) and then 0.
Comment 2 Eric Seidel (no email) 2008-07-03 21:50:13 PDT
Yup.  Looks like a real bug.  Thanks for the simple example.
Comment 3 Willi Tscheschner 2009-06-09 08:32:57 PDT
Can confirm this bug.

We use the tspan.getComputedTextLength() function for a manual word wrap of a label. Due to the returned 0 our word wrap does not work at all in Webkit. This is a major issue for us and we'd appreciate it to be fixed somewhere in the near future...
Comment 4 Nikolas Zimmermann 2011-04-06 00:42:46 PDT
Created attachment 88380 [details]
Testcase

Bug is resolved in trunk since a while, we forgot to close this bug report.
Nevertheless, I've modified the attached testcase to be a real layout test, and I'd like to land it.
Dirk, can you check?
Comment 5 Dirk Schulze 2011-04-06 01:59:57 PDT
Comment on attachment 88380 [details]
Testcase

r=me
Comment 6 WebKit Commit Bot 2011-04-06 02:24:41 PDT
Comment on attachment 88380 [details]
Testcase

Clearing flags on attachment: 88380

Committed r83035: <http://trac.webkit.org/changeset/83035>
Comment 7 WebKit Commit Bot 2011-04-06 02:24:47 PDT
All reviewed patches have been landed.  Closing bug.