Bug 260369

Summary: Enable requestIdleCallback by default in Apple's ports
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, mcatanzaro, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=262551
Bug Depends on:    
Bug Blocks: 164193, 262358    

Ryosuke Niwa
Reported 2023-08-17 16:09:22 PDT
Enable this feature by default on Apple ports.
Attachments
Ryosuke Niwa
Comment 1 2023-08-17 16:14:20 PDT
EWS
Comment 2 2023-08-17 18:01:28 PDT
Committed 267023@main (e225f383b875): <https://commits.webkit.org/267023@main> Reviewed commits have been landed. Closing PR #16813 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2023-08-17 18:02:16 PDT
Michael Catanzaro
Comment 4 2023-08-18 06:07:22 PDT
Isn't this needed everywhere? Is there something wrong with the implementation on other ports?
Brent Fulgham
Comment 5 2023-08-18 09:47:48 PDT
(In reply to Michael Catanzaro from comment #4) > Isn't this needed everywhere? Is there something wrong with the > implementation on other ports? The current code is specific to the CoreFoundation runloop implementation. Similar changes for GTK's run loop API would be needed on that platform (and likewise for Windows).
Michael Catanzaro
Comment 6 2023-08-19 08:09:33 PDT
Can you give me some pointers to what needs implemented, please? I skimmed through all recent commits looking for platform-specific code and didn't find anything. And since the implementation is built unconditionally, we already know it doesn'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't stop the feature from working.
Ryosuke Niwa
Comment 7 2023-08-19 12:57:55 PDT
(In reply to Michael Catanzaro from comment #6) > Can you give me some pointers to what needs implemented, please? I skimmed > through all recent commits looking for platform-specific code and didn't > find anything. And since the implementation is built unconditionally, we > already know it doesn'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't stop the > 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
Michael Catanzaro
Comment 8 2023-08-21 12:27:11 PDT
Thanks! Unfortunately this looks hard, so I've created bug #260478 to track it.
Note You need to log in before you can comment on or make changes to this bug.