RemoteScrollingTree.h [plain text]
#ifndef RemoteScrollingTree_h
#define RemoteScrollingTree_h
#if ENABLE(ASYNC_SCROLLING)
#include "RemoteScrollingCoordinator.h"
#include <WebCore/ScrollingConstraints.h>
#include <WebCore/ScrollingTree.h>
namespace WebKit {
class RemoteScrollingCoordinatorProxy;
class RemoteScrollingTree final : public WebCore::ScrollingTree {
public:
static Ref<RemoteScrollingTree> create(RemoteScrollingCoordinatorProxy&);
virtual ~RemoteScrollingTree();
bool isRemoteScrollingTree() const override { return true; }
EventResult tryToHandleWheelEvent(const WebCore::PlatformWheelEvent&) override;
const RemoteScrollingCoordinatorProxy& scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy; }
void scrollingTreeNodeDidScroll(WebCore::ScrollingNodeID, const WebCore::FloatPoint& scrollPosition, const std::optional<WebCore::FloatPoint>& layoutViewportOrigin, WebCore::ScrollingLayerPositionAction = WebCore::ScrollingLayerPositionAction::Sync) override;
void scrollingTreeNodeRequestsScroll(WebCore::ScrollingNodeID, const WebCore::FloatPoint& scrollPosition, bool representsProgrammaticScroll) override;
void currentSnapPointIndicesDidChange(WebCore::ScrollingNodeID, unsigned horizontal, unsigned vertical) override;
private:
explicit RemoteScrollingTree(RemoteScrollingCoordinatorProxy&);
#if PLATFORM(MAC)
void handleWheelEventPhase(WebCore::PlatformWheelEventPhase) override;
#endif
#if PLATFORM(IOS)
WebCore::FloatRect fixedPositionRect() override;
void scrollingTreeNodeWillStartPanGesture() override;
void scrollingTreeNodeWillStartScroll() override;
void scrollingTreeNodeDidEndScroll() override;
#endif
Ref<WebCore::ScrollingTreeNode> createScrollingTreeNode(WebCore::ScrollingNodeType, WebCore::ScrollingNodeID) override;
RemoteScrollingCoordinatorProxy& m_scrollingCoordinatorProxy;
};
}
SPECIALIZE_TYPE_TRAITS_SCROLLING_TREE(WebKit::RemoteScrollingTree, isRemoteScrollingTree());
#endif // ENABLE(ASYNC_SCROLLING)
#endif // RemoteScrollingTree_h