<?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>233171</bug_id>
          
          <creation_ts>2021-11-15 22:21:01 -0800</creation_ts>
          <short_desc>SVG: Do not apply text-decoration on elements with display:contents</short_desc>
          <delta_ts>2026-06-19 23:43:50 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=257267</see_also>
    
    <see_also>https://github.com/web-platform-tests/wpt/pull/60767</see_also>
          <bug_file_loc>http://wpt.live/css/css-text-decor/text-decoration-propagation-display-contents.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BlinkMergeCandidate, InRadar, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Nguyen (:ntim)">ntim</reporter>
          <assigned_to name="Ahmad Saleem">ahmad.saleem792</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>karlcow</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1815357</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2021-11-15 22:21:01 -0800</bug_when>
    <thetext>Port https://chromium-review.googlesource.com/c/chromium/src/+/3192872

It&apos;s already done for non-SVG elements, SVG should match.

Test: imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-propagation-display-contents.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1817393</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-11-22 22:21:22 -0800</bug_when>
    <thetext>&lt;rdar://problem/85691104&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2213774</commentid>
    <comment_count>2</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-05-25 00:43:15 -0700</bug_when>
    <thetext>css-text-decor §line-decoration (https://drafts.csswg.org/css-text-decor/#line-decoration) — &quot;Line decorations are propagated through the box tree, not through inheritance&quot;

WebKit propagates text-decoration-line-in-effect from a display: contents element to its descendants. Since that element generates no box, it shouldn&apos;t  act as a decoration source.

Source/WebCore/style/StyleAdjuster.cpp:162-172 — shouldInheritTextDecorationsInEffect switches on style.display().value and returns false for InlineFlowRoot, InlineTable, InlineFlex, InlineGrid, InlineGridLanes, InlineDeprecatedFlex. DisplayType::Contents is missing from the list. As a result, line 637-640 of StyleAdjuster.cpp ORs the display:contents element&apos;s text-decoration-line into the inherited textDecorationLineInEffect, which descendants then paint.
  
Fix sketch: add case DisplayType::Contents: return false; to the switch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2217865</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-06-04 21:07:35 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/66515</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2219043</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-06-09 13:30:45 -0700</bug_when>
    <thetext>Committed 314830@main (f149be78a28f): &lt;https://commits.webkit.org/314830@main&gt;

Reviewed commits have been landed. Closing PR #66515 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2222470</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-06-19 23:43:50 -0700</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/60767</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>