<?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>228909</bug_id>
          
          <creation_ts>2021-08-09 00:33:41 -0700</creation_ts>
          <short_desc>document.fonts.ready stays unresolved</short_desc>
          <delta_ts>2021-09-13 19:06:14 -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>Page Loading</component>
          <version>Safari 14</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Roland Soos">roland</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>beidson</cc>
    
    <cc>cdumez</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1782839</commentid>
    <comment_count>0</comment_count>
    <who name="Roland Soos">roland</who>
    <bug_when>2021-08-09 00:33:41 -0700</bug_when>
    <thetext>Steps to reproduce:
1. Open https://www.soelvahof.com/kaltern/kaltern/

A lot of time the `document.fonts.ready` stays unresolved. Check its state in the console.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1782844</commentid>
    <comment_count>1</comment_count>
    <who name="Roland Soos">roland</who>
    <bug_when>2021-08-09 01:13:06 -0700</bug_when>
    <thetext>It might be related to the fact that window&apos;s load event is not happening.

`document.readyState` is &quot;complete&quot;, but 
`window.performance.timing.loadEventStart` and `window.performance.timing.loadEventEnd` is 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1784428</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-08-16 00:34:21 -0700</bug_when>
    <thetext>&lt;rdar://problem/81969526&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1792271</commentid>
    <comment_count>3</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2021-09-10 01:28:49 -0700</bug_when>
    <thetext>rdar://82962890 is stopping me from investigating this. Hopefully that bug can be fixed soon so I can investigate this document.fonts bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1792602</commentid>
    <comment_count>4</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2021-09-10 16:48:53 -0700</bug_when>
    <thetext>I modified this bit of code in n2.min.js

        fonts: new Promise((function(t) {
            &quot;fonts&quot; in s ? (s.fonts.ready.then(t), h.r(&quot;windowLoad&quot;, t)) : h.r(&quot;windowLoad&quot;, t)
        }))

to be this:

        fonts: new Promise((function(t) {
            s.fonts.ready.then(function() {debugger;});
            &quot;fonts&quot; in s ? (s.fonts.ready.then(t), h.r(&quot;windowLoad&quot;, t)) : h.r(&quot;windowLoad&quot;, t)
        }))

and the &quot;debugger&quot; line did get hit in macOS Monterey.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1792608</commentid>
    <comment_count>5</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2021-09-10 16:54:45 -0700</bug_when>
    <thetext>And, above, when the `debugger;` line gets hit,

&gt; document.readyState
&lt; &quot;complete&quot;
&gt; window.performance.timing.loadEventStart
&lt; 1631318004941
&gt; window.performance.timing.loadEventEnd
&lt; 1631318004941</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1792647</commentid>
    <comment_count>6</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2021-09-10 21:08:49 -0700</bug_when>
    <thetext>&lt;rdar://problem/81969526&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1793182</commentid>
    <comment_count>7</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2021-09-13 19:06:14 -0700</bug_when>
    <thetext>I&apos;m not able to reproduce this, given the above analysis, so I&apos;m going to mark this as &quot;configuration changed.&quot; If this is still happening, please re-open the bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>