<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>240867</bug_id>
          
          <creation_ts>2022-05-24 05:33:53 -0700</creation_ts>
          <short_desc>&lt;text&gt;, &lt;tspan&gt; position is not respected when white-space is applied and element contains text nodes</short_desc>
          <delta_ts>2022-12-14 13:21:36 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=249300</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bartosz Gryta">gtktsc</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mmaxfield</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1871468</commentid>
    <comment_count>0</comment_count>
      <attachid>459718</attachid>
    <who name="Bartosz Gryta">gtktsc</who>
    <bug_when>2022-05-24 05:33:53 -0700</bug_when>
    <thetext>Created attachment 459718
Example of working and broken &lt;text&gt; nodes in SVG when white-space is applied

When &lt;text&gt; node has `white-space` property set to `pre-wrap` or `pre-line` and it contains &lt;tspan&gt; nodes and text nodes combined (for example newline character or empty space between &lt;tspan&gt;) children overlap on each other - their position is not respected. When text nodes are trimmed from &lt;text&gt; it works properly. It works in Firefox and Chrome.

Similar bug https://bugs.webkit.org/show_bug.cgi?id=189790 related to how `white-space` behaves, but it&apos;s not about text nodes in particular.

I&apos;ve attached an example, it contains three &lt;text&gt; nodes:
- text node without `white-space` property - working,
- text node with `white-space` property and text nodes in between - broken,
- text node with `white-space` property but without text nodes in between - working.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872945</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-31 05:34:29 -0700</bug_when>
    <thetext>&lt;rdar://problem/94145711&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>459718</attachid>
            <date>2022-05-24 05:33:53 -0700</date>
            <delta_ts>2022-05-24 05:33:53 -0700</delta_ts>
            <desc>Example of working and broken &lt;text&gt; nodes in SVG when white-space is applied</desc>
            <filename>example.svg</filename>
            <type>image/svg+xml</type>
            <size>567</size>
            <attacher name="Bartosz Gryta">gtktsc</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3
dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZwogIHhtbG5zPSJo
dHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB2aWV3Qm94PSIwIDAgMzIwIDMyMCIKICB3aWR0
aD0iMzIwIgogIGhlaWdodD0iMzIwIgo+CiAgPHRleHQ+CiAgICA8dHNwYW4geD0iMCIgeT0iMzBw
eCI+bGluZS0xPC90c3Bhbj4KICAgIDx0c3BhbiB4PSIwIiB5PSI2MHB4Ij5saW5lLTI8L3RzcGFu
PgogIDwvdGV4dD4KICA8dGV4dCBzdHlsZT0id2hpdGUtc3BhY2U6IHByZS13cmFwIj4KICAgIDx0
c3BhbiB4PSI4MHB4IiB5PSIzMHB4Ij5saW5lLTE8L3RzcGFuPgogICAgPHRzcGFuIHg9IjgwcHgi
IHk9IjYwcHgiPmxpbmUtMjwvdHNwYW4+CiAgPC90ZXh0PgogIDx0ZXh0IHN0eWxlPSJ3aGl0ZS1z
cGFjZTogcHJlLXdyYXAiPjx0c3BhbiB4PSIxNjBweCIgeT0iMzBweCI+bGluZS0xPC90c3Bhbj48
dHNwYW4geD0iMTYwcHgiIHk9IjYwcHgiPmxpbmUtMjwvdHNwYW4+PC90ZXh0Pgo8L3N2Zz4K
</data>

          </attachment>
      

    </bug>

</bugzilla>