<?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>260369</bug_id>
          
          <creation_ts>2023-08-17 16:09:22 -0700</creation_ts>
          <short_desc>Enable requestIdleCallback by default in Apple&apos;s ports</short_desc>
          <delta_ts>2023-10-03 09:10:09 -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>DOM</component>
          <version>WebKit Nightly Build</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=262551</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>
          
          <blocked>164193</blocked>
    
    <blocked>262358</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1971934</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2023-08-17 16:09:22 -0700</bug_when>
    <thetext>Enable this feature by default on Apple ports.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971937</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2023-08-17 16:14:20 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/16813</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971954</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-08-17 18:01:28 -0700</bug_when>
    <thetext>Committed 267023@main (e225f383b875): &lt;https://commits.webkit.org/267023@main&gt;

Reviewed commits have been landed. Closing PR #16813 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971955</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-08-17 18:02:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/114057284&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1972031</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-08-18 06:07:22 -0700</bug_when>
    <thetext>Isn&apos;t this needed everywhere? Is there something wrong with the implementation on other ports?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1972070</commentid>
    <comment_count>5</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2023-08-18 09:47:48 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #4)
&gt; Isn&apos;t this needed everywhere? Is there something wrong with the
&gt; implementation on other ports?

The current code is specific to the CoreFoundation runloop implementation. Similar changes for GTK&apos;s run loop API would be needed on that platform (and likewise for Windows).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1972237</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-08-19 08:09:33 -0700</bug_when>
    <thetext>Can you give me some pointers to what needs implemented, please? I skimmed through all recent commits looking for platform-specific code and didn&apos;t find anything. And since the implementation is built unconditionally, we already know it doesn&apos;t use any platform-specific methods of RunLoop.

GTK/WPE will have an issue where idle callbacks will be scheduled at too-high priority, which will need to be fixed, but that shouldn&apos;t stop the feature from working.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1972249</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2023-08-19 12:57:55 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #6)
&gt; Can you give me some pointers to what needs implemented, please? I skimmed
&gt; through all recent commits looking for platform-specific code and didn&apos;t
&gt; find anything. And since the implementation is built unconditionally, we
&gt; already know it doesn&apos;t use any platform-specific methods of RunLoop.
&gt; 
&gt; GTK/WPE will have an issue where idle callbacks will be scheduled at
&gt; too-high priority, which will need to be fixed, but that shouldn&apos;t stop the
&gt; feature from working.

You need to implement these functions: RunLoopObserver::schedule, RunLoopObserver::invalidate, and RunLoopObserver::isScheduled():

https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/RunLoopObserver.cpp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1972454</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-08-21 12:27:11 -0700</bug_when>
    <thetext>Thanks!

Unfortunately this looks hard, so I&apos;ve created bug #260478 to track it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>