<?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>290231</bug_id>
          
          <creation_ts>2025-03-21 18:30:20 -0700</creation_ts>
          <short_desc>REGRESSION(291808@main): [macOS Debug]: ASSERTION FAILED: !index in CSSFontSelector::fallbackFontAt on html5lib/generated/run-entities01-data.html (290012)</short_desc>
          <delta_ts>2025-04-09 09:49:57 -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>Text</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Vitor Roriz">vitor.roriz</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>darbinyan</cc>
    
    <cc>fantasai.bugs</cc>
    
    <cc>vitor.roriz</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2105205</commentid>
    <comment_count>0</comment_count>
    <who name="Vitor Roriz">vitor.roriz</who>
    <bug_when>2025-03-21 18:30:20 -0700</bug_when>
    <thetext>Settings control how we resolve generic font-family names.

This bug happens because we were setting setFontFallbackPrefersPictographs(true)
from another test, on the same process, before running run-entities01-data.html.

This made the cached FontCascadeFont object to have its m_lastRealizedFallbackIndex
expanded beyound effectiveFamilyCount(), making fontSelectorFallbackIndex turning 1.

When running run-entities01-data.html, m_lastRealizedFallbackIndex is still
retaining that value. However, fontSelector-&gt;fallbackFontCount() that comes from Settings
is now 0 and we won&apos;t pass the check `fontSelectorFallbackIndex == fontSelector-&gt;fallbackFontCount()`.

This lead us to a inconsistent state in which we call fallbackFontAt for resolving the pictographFontFamily,
although we are stating by the index != 0 that we already did.

We can fix this issue by considering the generic font families configuration from settings for building
FontCascadeCache key. That way, we won&apos;t have false positive hits when settings differ.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105206</commentid>
    <comment_count>1</comment_count>
    <who name="Vitor Roriz">vitor.roriz</who>
    <bug_when>2025-03-21 18:30:34 -0700</bug_when>
    <thetext>rdar://147365119</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105210</commentid>
    <comment_count>2</comment_count>
    <who name="Vitor Roriz">vitor.roriz</who>
    <bug_when>2025-03-21 18:43:21 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/42857</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105473</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-03-23 17:30:32 -0700</bug_when>
    <thetext>*** Bug 290012 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105475</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-03-23 17:30:42 -0700</bug_when>
    <thetext>*** Bug 290230 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2106474</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-03-27 09:40:54 -0700</bug_when>
    <thetext>Committed 292764@main (0d680136cb51): &lt;https://commits.webkit.org/292764@main&gt;

Reviewed commits have been landed. Closing PR #42857 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2109961</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-04-09 09:49:57 -0700</bug_when>
    <thetext>Test gardening commit 289651.418@safari-7621-branch (8fdeff9ee1d6): &lt;https://commits.webkit.org/289651.418@safari-7621-branch&gt;

Reviewed commits have been landed. Closing PR #2979 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>