ScrollingTreeOverflowScrollingNodeIOS.h [plain text]
#ifndef ScrollingTreeOverflowScrollingNodeIOS_h
#define ScrollingTreeOverflowScrollingNodeIOS_h
#if ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS)
#include <WebCore/ScrollingCoordinator.h>
#include <WebCore/ScrollingTreeOverflowScrollingNode.h>
OBJC_CLASS WKOverflowScrollViewDelegate;
namespace WebKit {
class ScrollingTreeOverflowScrollingNodeIOS : public WebCore::ScrollingTreeOverflowScrollingNode {
public:
static Ref<ScrollingTreeOverflowScrollingNodeIOS> create(WebCore::ScrollingTree&, WebCore::ScrollingNodeID);
virtual ~ScrollingTreeOverflowScrollingNodeIOS();
void overflowScrollWillStart();
void overflowScrollDidEnd();
void overflowScrollViewWillStartPanGesture();
void scrollViewDidScroll(const WebCore::FloatPoint&, bool inUserInteration);
void currentSnapPointIndicesDidChange(unsigned horizontal, unsigned vertical);
CALayer *scrollLayer() const { return m_scrollLayer.get(); }
private:
ScrollingTreeOverflowScrollingNodeIOS(WebCore::ScrollingTree&, WebCore::ScrollingNodeID);
virtual void updateBeforeChildren(const WebCore::ScrollingStateNode&) override;
virtual void updateAfterChildren(const WebCore::ScrollingStateNode&) override;
virtual WebCore::FloatPoint scrollPosition() const override;
virtual void setScrollLayerPosition(const WebCore::FloatPoint&) override;
virtual void updateLayersAfterViewportChange(const WebCore::FloatRect& fixedPositionRect, double scale) override { }
virtual void updateLayersAfterDelegatedScroll(const WebCore::FloatPoint& scrollPosition) override;
virtual void updateLayersAfterAncestorChange(const WebCore::ScrollingTreeNode& changedNode, const WebCore::FloatRect& fixedPositionRect, const WebCore::FloatSize& cumulativeDelta) override;
virtual void handleWheelEvent(const WebCore::PlatformWheelEvent&) override { }
void updateChildNodesAfterScroll(const WebCore::FloatPoint&);
RetainPtr<CALayer> m_scrollLayer;
RetainPtr<CALayer> m_scrolledContentsLayer;
RetainPtr<WKOverflowScrollViewDelegate> m_scrollViewDelegate;
bool m_updatingFromStateNode;
};
}
#endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS)
#endif // ScrollingTreeOverflowScrollingNodeIOS_h