WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
139210
When the textLength attribute is specified on a given <tspan> and also specified on its ancestor, the textLength on this <tspan> is ignored
https://bugs.webkit.org/show_bug.cgi?id=139210
Summary
When the textLength attribute is specified on a given <tspan> and also specif...
Said Abou-Hallawa
Reported
2014-12-02 16:32:40 PST
Open the following svg in WebKit <svg xmlns="
http://www.w3.org/2000/svg
"> <text x="100" y="100" style="font: 32px sans-serif" textLength="100" lengthAdjust="spacingAndGlyphs"> hello <tspan x="100" y="140" textLength="50" lengthAdjust="spacingAndGlyphs"> hello </tspan> </text> </svg> Result: Two lines of text are displayed. The width of the first line is 100 pixels while the width of the second line is the measured text of the word hello without glyph of spacing adjustment. Expected: The quote below is the w3c specs for the textLength attribute of the tspan element (copied from
http://www.w3.org/TR/SVG/text.html
). According to the first paragraph, the svg above should display two lines of text each of them has the width of 50 pixels. NOTE: FireFox displays the above svg as it is described in the Expected statement above. ------------------------------------------------------ If attribute ‘textLength’ is specified on a given element and also specified on an ancestor, the adjustments on all character data within this element are controlled by the value of ‘textLength’ on this element exclusively, with the possible side-effect that the adjustment ratio for the contents of this element might be different than the adjustment ratio used for other content that shares the same ancestor. The user agent must assume that the total advance values for the other content within that ancestor is the difference between the advance value on that ancestor and the advance value for this element. A negative value is an error (see Error processing). If the attribute is not specified anywhere within a ‘text’ element, the effect is as if the author's computation exactly matched the value calculated by the user agent; thus, no advance adjustments are made. ------------------------------------------------------
Attachments
STP 151 differs from other browsers
(565.12 KB, image/png)
2022-08-13 16:09 PDT
,
Ahmad Saleem
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2014-12-02 16:33:43 PST
<
rdar://problem/19121927
>
Ahmad Saleem
Comment 2
2022-08-13 16:09:50 PDT
Created
attachment 461603
[details]
STP 151 differs from other browsers I changed the test case into JSFiddle: Link -
https://jsfiddle.net/91na45ro/show
As can be seen from attached screenshot, Safari TP 151 (Safari 15.6 is same as well) differs from other browsers. Just wanted to share updated testing status. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug