Exemplo n.º 1
0
void WKBundlePageStartMonitoringScrollOperations(WKBundlePageRef pageRef)
{
    WebKit::WebPage* webPage = toImpl(pageRef);
    WebCore::Page* page = webPage ? webPage->corePage() : nullptr;
    
    if (!page)
        return;

    page->ensureTestTrigger();
}
Exemplo n.º 2
0
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);
    });
}