Bug 139266 - A <tspan display="none"> is ignored completely when specifying multiple midpoints in the parent text content element
Summary: A <tspan display="none"> is ignored completely when specifying multiple midpo...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, LayerBasedSVGEngine
Depends on:
Blocks:
 
Reported: 2014-12-04 12:48 PST by Said Abou-Hallawa
Modified: 2023-10-03 14:59 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2014-12-04 12:48:39 PST
Open the following svg in WebKit:

<svg xmlns="http://www.w3.org/2000/svg">
  <text x="100 150 200 250" y="100"><tspan display="none">12</tspan>34</text>
  <text x="200 250 300 350" y="150">34</text>
</svg>

Result: The letters '3' and '4' are not aligned vertically in the two lines.
Expected:  The letters '3' and '4' should be displayed at the same vertical positions (200 and 250) in the two lines.

The W3C specs http://www.w3.org/TR/SVG/painting.html#DisplayProperty says that if the property 'display' is set to 'none', the element will not be part of the rendering tree.  The element will not take space nor will its contents be rendered on the page.  But the specs does not say that the characters' indices of the <tspan display="none"> tag will be ignored when specifying multiple mid-points in the parent text content element.  So it is fair to expect the beginning of the following text to be shifted to the same mid-point as if display="none" were not specified in the previous <tspan> tag.
Comment 1 Radar WebKit Bug Importer 2014-12-04 12:51:59 PST
<rdar://problem/19147394>
Comment 2 Ahmad Saleem 2022-09-22 16:16:28 PDT
Changed it into JSFiddle: https://jsfiddle.net/7kd4rjzv/show

Only Firefox Nightly 107 have them as aligned while Safari Technical Preview 154 and Chrome Canary 108 does not align them in same line vertically above each other. Thanks!