RemoteScrollingTree.h [plain text]
#pragma once
#if ENABLE(UI_SIDE_COMPOSITING)
#include "RemoteScrollingCoordinator.h"
#include <WebCore/ScrollingConstraints.h>
#include <WebCore/ScrollingTree.h>
namespace WebCore {
class PlatformMouseEvent;
};
namespace WebKit {
class RemoteScrollingCoordinatorProxy;
class RemoteScrollingTree final : public WebCore::ScrollingTree {
public:
static Ref<RemoteScrollingTree> create(RemoteScrollingCoordinatorProxy&);
virtual ~RemoteScrollingTree();
bool isRemoteScrollingTree() const override { return true; }
void handleMouseEvent(const WebCore::PlatformMouseEvent&);
const RemoteScrollingCoordinatorProxy& scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy; }
void scrollingTreeNodeDidScroll(WebCore::ScrollingTreeScrollingNode&, WebCore::ScrollingLayerPositionAction = WebCore::ScrollingLayerPositionAction::Sync) override;
void scrollingTreeNodeRequestsScroll(WebCore::ScrollingNodeID, const WebCore::FloatPoint& scrollPosition, WebCore::ScrollType, WebCore::ScrollClamping) override;
void currentSnapPointIndicesDidChange(WebCore::ScrollingNodeID, unsigned horizontal, unsigned vertical) override;
private:
explicit RemoteScrollingTree(RemoteScrollingCoordinatorProxy&);
#if PLATFORM(MAC)
void handleWheelEventPhase(WebCore::ScrollingNodeID, WebCore::PlatformWheelEventPhase) override;
#endif
#if PLATFORM(IOS_FAMILY)
void scrollingTreeNodeWillStartPanGesture(WebCore::ScrollingNodeID) override;
void scrollingTreeNodeWillStartScroll(WebCore::ScrollingNodeID) override;
void scrollingTreeNodeDidEndScroll(WebCore::ScrollingNodeID) override;
#endif
Ref<WebCore::ScrollingTreeNode> createScrollingTreeNode(WebCore::ScrollingNodeType, WebCore::ScrollingNodeID) override;
RemoteScrollingCoordinatorProxy& m_scrollingCoordinatorProxy;
};
}
SPECIALIZE_TYPE_TRAITS_SCROLLING_TREE(WebKit::RemoteScrollingTree, isRemoteScrollingTree());
#endif // ENABLE(UI_SIDE_COMPOSITING)