Bug 260369
Summary: | Enable requestIdleCallback by default in Apple's ports | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | DOM | Assignee: | 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
Enable this feature by default on Apple ports.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ryosuke Niwa
Pull request: https://github.com/WebKit/WebKit/pull/16813
EWS
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
<rdar://problem/114057284>
Michael Catanzaro
Isn't this needed everywhere? Is there something wrong with the implementation on other ports?
Brent Fulgham
(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
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
(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
Thanks!
Unfortunately this looks hard, so I've created bug #260478 to track it.