<?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>309822</bug_id>
          
          <creation_ts>2026-03-12 12:11:56 -0700</creation_ts>
          <short_desc>Remove duplicate checks in CSSFontFaceSet::fontFace</short_desc>
          <delta_ts>2026-03-19 23:28:30 -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>New Bugs</component>
          <version>WebKit Nightly Build</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>
          <dependson>120499</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Brent Fulgham">bfulgham</assigned_to>
          <cc>sean</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2189685</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2026-03-12 12:11:56 -0700</bug_when>
    <thetext>The changes in Bug 120499 brought WebKit&apos;s font selection logic in alignment with the web standard. This allows us to make two further improvements:

1. We no longer need the `isItalic` pre-filter lines that were used when considering candidate font faces. These filters were a shortcut that unconditionally excluded italic-only faces whenever the request was non-italic. But eliminatedCapabilities() already handles this correctly via the full CSS 5.2.6 matching algorithm, so this is now redundant.

2. We can make the search for &quot;best match&quot; font work in linear time (rather than O(n log n) time) by precomputing the width/style/weight distances for each candidate face once, then sort the resulting values instead of repeated redundant calls in each comparison.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2189686</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-03-12 12:12:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/172401655&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2189688</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2026-03-12 12:17:44 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/60497</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2190050</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2026-03-13 10:15:01 -0700</bug_when>
    <thetext>The worksets involved in font matching are too small to benefit from Idea #2, so I&apos;ll revise the patch to remove that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2190722</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-03-16 15:23:49 -0700</bug_when>
    <thetext>Committed 309352@main (1eb20f29b046): &lt;https://commits.webkit.org/309352@main&gt;

Reviewed commits have been landed. Closing PR #60497 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2190837</commentid>
    <comment_count>5</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2026-03-16 20:56:35 -0700</bug_when>
    <thetext>*** Bug 63492 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2191950</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-03-19 23:28:30 -0700</bug_when>
    <thetext>Committed 305413.536@safari-7624-branch (1b2a1094c86c): &lt;https://commits.webkit.org/305413.536@safari-7624-branch&gt;

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

    </bug>

</bugzilla>