void WKBundlePageStartMonitoringScrollOperations(WKBundlePageRef pageRef) { WebKit::WebPage* webPage = toImpl(pageRef); WebCore::Page* page = webPage ? webPage->corePage() : nullptr; if (!page) return; page->ensureTestTrigger(); }
void WKBundlePageRegisterScrollOperationCompletionCallback(WKBundlePageRef pageRef, WKBundlePageTestNotificationCallback callback, void* context) { if (!callback) return; WebKit::WebPage* webPage = toImpl(pageRef); WebCore::Page* page = webPage ? webPage->corePage() : nullptr; if (!page || !page->expectsWheelEventTriggers()) return; page->ensureTestTrigger().setTestCallbackAndStartNotificationTimer([=]() { callback(context); }); }