<?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>287629</bug_id>
          
          <creation_ts>2025-02-13 05:38:48 -0800</creation_ts>
          <short_desc>[GTK][WPE] &lt;lang-attribute-affects-rendering.html&gt; fails</short_desc>
          <delta_ts>2025-03-06 05:01:17 -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>New Bugs</component>
          <version>Other</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=270564</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=79756</see_also>
    
    <see_also>https://github.com/web-platform-tests/wpt/pull/51158</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="Deleted User">deleted_user</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2094443</commentid>
    <comment_count>0</comment_count>
    <who name="Deleted User">deleted_user</who>
    <bug_when>2025-02-13 05:38:48 -0800</bug_when>
    <thetext>https://github.com/web-platform-tests/wpt/blob/1a5b13545a/css/css-fonts/lang-attribute-affects-rendering.html

It only fails for GTK: https://wpt.fyi/results/css?label=master&amp;product=chrome%5Bexperimental%5D&amp;product=edge%5Bexperimental%5D&amp;product=firefox%5Bexperimental%5D&amp;product=safari%5Bexperimental%5D&amp;product=webkitgtk&amp;aligned&amp;q=%2Fcss%2Fcss-fonts%2Flang-attribute-affects-rendering.html.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2094447</commentid>
    <comment_count>1</comment_count>
    <who name="Deleted User">deleted_user</who>
    <bug_when>2025-02-13 06:01:03 -0800</bug_when>
    <thetext>Some analysis, read the test-case for context:

- https://searchfox.org/wubkat/rev/eb60a003e2487c2a8f34aaf8ce8f5d5af280ed55/Source/WebCore/platform/graphics/ComplexTextController.cpp#358 is called for &quot;fi&quot;.
- `m_font.fontDescription().computedLocale()` is &quot;en&quot; (&quot;tr&quot; for the -ref.html file). That&apos;s expected.
- `FontCascade::fontForCombiningCharacterSequence` (https://searchfox.org/wubkat/rev/eb60a003e2487c2a8f34aaf8ce8f5d5af280ed55/Source/WebCore/platform/graphics/FontCascade.h#208) corresponds to different implementations: https://searchfox.org/wubkat/search?q=fontForCombiningCharacterSequence&amp;redirect=false
- Since the test passes for Safari, perhaps the implementation for Skia, which is used by GTK, is buggy: https://searchfox.org/wubkat/rev/eb60a003e2487c2a8f34aaf8ce8f5d5af280ed55/Source/WebCore/platform/graphics/skia/FontCascadeSkia.cpp#132</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2095120</commentid>
    <comment_count>2</comment_count>
    <who name="Deleted User">deleted_user</who>
    <bug_when>2025-02-17 01:46:48 -0800</bug_when>
    <thetext>Continued analysis:

https://searchfox.org/wubkat/rev/dd523ddb28deecac34400360788b2ba9cee771af/Source/WebCore/platform/graphics/ComplexTextController.cpp#462 is called.

Safari and GTK use different implementations of that method.

The test passes with Safari. Presumably, because of
&lt;https://searchfox.org/wubkat/rev/dd523ddb28deecac34400360788b2ba9cee771af/Source/WebCore/platform/graphics/coretext/ComplexTextControllerCoreText.mm#200&gt;.

The bug/missing functionality for GTK is presumably in the GTK-specific implementation: &lt;https://searchfox.org/wubkat/rev/dd523ddb28deecac34400360788b2ba9cee771af/Source/WebCore/platform/graphics/skia/ComplexTextControllerSkia.cpp#153&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2095127</commentid>
    <comment_count>3</comment_count>
    <who name="Deleted User">deleted_user</who>
    <bug_when>2025-02-17 02:41:18 -0800</bug_when>
    <thetext>`hb_language_t` (https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-language-t) might need to be set.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2095454</commentid>
    <comment_count>4</comment_count>
    <who name="Deleted User">deleted_user</who>
    <bug_when>2025-02-18 07:39:28 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/40761</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2100933</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-03-06 05:00:32 -0800</bug_when>
    <thetext>Committed 291691@main (c30953f1f00c): &lt;https://commits.webkit.org/291691@main&gt;

Reviewed commits have been landed. Closing PR #40761 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2100934</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-03-06 05:01:17 -0800</bug_when>
    <thetext>&lt;rdar://problem/146381919&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>