[Webkit-unassigned] [Bug 139210] New: When the textLength attribute is specified on a given <tspan> and also specified on its ancestor, the textLength on this <tspan> is ignored

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 2 16:32:40 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=139210

            Bug ID: 139210
           Summary: When the textLength attribute is specified on a given
                    <tspan> and also specified on its ancestor, the
                    textLength on this <tspan> is ignored
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sabouhallawa at apple.com
                CC: zimmermann at kde.org

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.
------------------------------------------------------

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141203/833bffb9/attachment-0002.html>


More information about the webkit-unassigned mailing list