<?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>139183</bug_id>
          
          <creation_ts>2014-12-02 08:42:57 -0800</creation_ts>
          <short_desc>CSS first-letter property is not respected by the SVG &lt;text&gt; element</short_desc>
          <delta_ts>2026-04-02 07:16:55 -0700</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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>https://wpt.fyi/results/svg/text/reftests/first-letter.svg</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="Said Abou-Hallawa">sabouhallawa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>karlcow</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1051837</commentid>
    <comment_count>0</comment_count>
      <attachid>242409</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2014-12-02 08:42:57 -0800</bug_when>
    <thetext>Created attachment 242409
Test first-letter style element with the svg &lt;text&gt; element.

Open the attached file and compare it with the expected results. They should be identical.

The CSS first-letter is not respected by the SVG text element. If the selector is text::first-letter or ::first-letter is in the style section of the svg, it has no effect.  It is expected to have the first letter drawn with the style specified in the first-letter element.

NOTE: The attached file is an imported test from Mozilla test suite for svg</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1051839</commentid>
    <comment_count>1</comment_count>
      <attachid>242411</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2014-12-02 08:43:30 -0800</bug_when>
    <thetext>Created attachment 242411
Expected file</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1051840</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-12-02 08:44:01 -0800</bug_when>
    <thetext>&lt;rdar://problem/19114946&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2196286</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-04-02 07:16:55 -0700</bug_when>
    <thetext>This is tested here https://wpt.fyi/results/svg/text/reftests/first-letter.svg

```
&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:h=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;metadata&gt;
    &lt;h:title&gt;first-letter should apply to SVG text&lt;/h:title&gt;
    &lt;h:link rel=&quot;help&quot; href=&quot;https://www.w3.org/TR/SVG2/text.html#TextProperties&quot;/&gt;
    &lt;h:link rel=&quot;match&quot; href=&quot;first-letter-ref.svg&quot;/&gt;
    &lt;h:link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/fonts/ahem.css&quot; /&gt;
  &lt;/metadata&gt;
  &lt;style&gt;
    text {
      font-family: Ahem;
      font-size: 50px;
    }
    text::first-letter {
      fill: green;
    }
  &lt;/style&gt;
  &lt;text x=&quot;100&quot; y=&quot;100&quot;&gt;
    &lt;tspan&gt;XXXX&lt;/tspan&gt;
  &lt;/text&gt;
&lt;/svg&gt;
```</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>242409</attachid>
            <date>2014-12-02 08:42:57 -0800</date>
            <delta_ts>2014-12-02 08:42:57 -0800</delta_ts>
            <desc>Test first-letter style element with the svg &lt;text&gt; element.</desc>
            <filename>pseudo-first-letter.svg</filename>
            <type>image/svg+xml</type>
            <size>387</size>
            <attacher name="Said Abou-Hallawa">sabouhallawa</attacher>
            
              <data encoding="base64">PCEtLQogICAgIEFueSBjb3B5cmlnaHQgaXMgZGVkaWNhdGVkIHRvIHRoZSBQdWJsaWMgRG9tYWlu
LgogICAgIGh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL3B1YmxpY2RvbWFpbi96ZXJvLzEuMC8K
LS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNzAwIiBo
ZWlnaHQ9IjIwMCI+CiAgPHN0eWxlPgogICAgdGV4dDo6Zmlyc3QtbGV0dGVyIHsgZm9udC1zaXpl
OiAzMnB4IH0KICA8L3N0eWxlPgogIDx0ZXh0IHg9IjEwMCIgeT0iMTAwIiBzdHlsZT0iZm9udDog
MTZweCBzYW5zLXNlcmlmIj5oZWxsbyB0aGVyZSBldmVyeW9uZQogICAgPHRzcGFuIHg9IjEwMCIg
eT0iMTIwIj5hbmQgZ29vZCBuaWdodDwvdHNwYW4+PC90ZXh0Pgo8L3N2Zz4K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>242411</attachid>
            <date>2014-12-02 08:43:30 -0800</date>
            <delta_ts>2014-12-02 08:43:30 -0800</delta_ts>
            <desc>Expected file</desc>
            <filename>pseudo-first-letter-expected.svg</filename>
            <type>image/svg+xml</type>
            <size>355</size>
            <attacher name="Said Abou-Hallawa">sabouhallawa</attacher>
            
              <data encoding="base64">PCEtLQogICAgIEFueSBjb3B5cmlnaHQgaXMgZGVkaWNhdGVkIHRvIHRoZSBQdWJsaWMgRG9tYWlu
LgogICAgIGh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL3B1YmxpY2RvbWFpbi96ZXJvLzEuMC8K
LS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNzAwIiBo
ZWlnaHQ9IjIwMCI+CiAgPHRleHQgeD0iMTAwIiB5PSIxMDAiIHN0eWxlPSJmb250OiAxNnB4IHNh
bnMtc2VyaWYiPjx0c3BhbiBmb250LXNpemU9IjMycHgiPmg8L3RzcGFuPmVsbG8gdGhlcmUgZXZl
cnlvbmUKICAgIDx0c3BhbiB4PSIxMDAiIHk9IjEyMCI+YW5kIGdvb2QgbmlnaHQ8L3RzcGFuPjwv
dGV4dD4KPC9zdmc+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>