ScrollingTreeScrollingNodeMac.h [plain text]
#ifndef ScrollingTreeScrollingNodeMac_h
#define ScrollingTreeScrollingNodeMac_h
#if ENABLE(THREADED_SCROLLING)
#include "ScrollElasticityController.h"
#include "ScrollingTreeScrollingNode.h"
#include <wtf/RetainPtr.h>
OBJC_CLASS CALayer;
namespace WebCore {
class ScrollingTreeScrollingNodeMac : public ScrollingTreeScrollingNode, private ScrollElasticityControllerClient {
public:
explicit ScrollingTreeScrollingNodeMac(ScrollingTree*, ScrollingNodeID);
virtual ~ScrollingTreeScrollingNodeMac();
private:
virtual void updateBeforeChildren(ScrollingStateNode*) OVERRIDE;
virtual void updateAfterChildren(ScrollingStateNode*) OVERRIDE;
virtual void handleWheelEvent(const PlatformWheelEvent&) OVERRIDE;
virtual bool allowsHorizontalStretching() OVERRIDE;
virtual bool allowsVerticalStretching() OVERRIDE;
virtual IntSize stretchAmount() OVERRIDE;
virtual bool pinnedInDirection(const FloatSize&) OVERRIDE;
virtual bool canScrollHorizontally() OVERRIDE;
virtual bool canScrollVertically() OVERRIDE;
virtual bool shouldRubberBandInDirection(ScrollDirection) OVERRIDE;
virtual IntPoint absoluteScrollPosition() OVERRIDE;
virtual void immediateScrollBy(const FloatSize&) OVERRIDE;
virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&) OVERRIDE;
virtual void startSnapRubberbandTimer() OVERRIDE;
virtual void stopSnapRubberbandTimer() OVERRIDE;
IntPoint scrollPosition() const;
void setScrollPosition(const IntPoint&);
void setScrollPositionWithoutContentEdgeConstraints(const IntPoint&);
void setScrollLayerPosition(const IntPoint&);
IntPoint minimumScrollPosition() const;
IntPoint maximumScrollPosition() const;
void scrollBy(const IntSize&);
void scrollByWithoutContentEdgeConstraints(const IntSize&);
void updateMainFramePinState(const IntPoint& scrollPosition);
void logExposedUnfilledArea();
ScrollElasticityController m_scrollElasticityController;
RetainPtr<CFRunLoopTimerRef> m_snapRubberbandTimer;
RetainPtr<CALayer> m_scrollLayer;
RetainPtr<CALayer> m_counterScrollingLayer;
RetainPtr<CALayer> m_headerLayer;
RetainPtr<CALayer> m_footerLayer;
IntPoint m_probableMainThreadScrollPosition;
bool m_lastScrollHadUnfilledPixels;
};
}
#endif // ENABLE(THREADED_SCROLLING)
#endif // ScrollingTreeScrollingNodeMac_h