<?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>235656</bug_id>
          
          <creation_ts>2022-01-26 10:49:07 -0800</creation_ts>
          <short_desc>Blocked link to font source does not emit error event</short_desc>
          <delta_ts>2022-11-16 09:28:20 -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>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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>246663</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Griffis">pgriffis</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>rreno</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1834168</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Griffis">pgriffis</who>
    <bug_when>2022-01-26 10:49:07 -0800</bug_when>
    <thetext>There are a couple of WPT tests that rely on the onerror handler being called when a font source is blocked by CSP.

They can be seen here: https://wpt.fyi/results/content-security-policy/font-src?label=master&amp;label=experimental&amp;product=safari&amp;product=webkitgtk

But a snippet is:

      var link = document.createElement(&apos;link&apos;);
      link.rel=&quot;preload&quot;;
      link.as=&quot;font&quot;;
      link.href=&quot;http://{{hosts[alt][]}}:{{ports[http][0]}}/fonts/Ahem.ttf?font-none-blocked&quot;;
      link.onload = t.unreached_func(&quot;Should not have loaded the font.&quot;);
      link.onerror = t.step_func_done();
      document.getElementsByTagName(&apos;head&apos;)[0].appendChild(link);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1836528</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-02-02 10:50:18 -0800</bug_when>
    <thetext>&lt;rdar://problem/88389961&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1912899</commentid>
    <comment_count>2</comment_count>
    <who name="Ryan Reno">rreno</who>
    <bug_when>2022-11-16 09:28:20 -0800</bug_when>
    <thetext>This was fixed by https://bugs.webkit.org/show_bug.cgi?id=246663</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>