ScrollingStateFixedNode.h [plain text]
#ifndef ScrollingStateFixedNode_h
#define ScrollingStateFixedNode_h
#if ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
#include "ScrollingConstraints.h"
#include "ScrollingStateNode.h"
#include <wtf/Forward.h>
namespace WebCore {
class FixedPositionViewportConstraints;
class ScrollingStateFixedNode : public ScrollingStateNode {
public:
static PassOwnPtr<ScrollingStateFixedNode> create(ScrollingStateTree*, ScrollingNodeID);
virtual PassOwnPtr<ScrollingStateNode> clone();
virtual ~ScrollingStateFixedNode();
enum {
ViewportConstraints = NumStateNodeBits
};
void updateConstraints(const FixedPositionViewportConstraints&);
const FixedPositionViewportConstraints& viewportConstraints() const { return m_constraints; }
private:
ScrollingStateFixedNode(ScrollingStateTree*, ScrollingNodeID);
ScrollingStateFixedNode(const ScrollingStateFixedNode&);
virtual bool isFixedNode() OVERRIDE { return true; }
virtual void syncLayerPositionForViewportRect(const LayoutRect& viewportRect) OVERRIDE;
virtual void dumpProperties(TextStream&, int indent) const OVERRIDE;
FixedPositionViewportConstraints m_constraints;
};
inline ScrollingStateFixedNode* toScrollingStateFixedNode(ScrollingStateNode* node)
{
ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isFixedNode());
return static_cast<ScrollingStateFixedNode*>(node);
}
void toScrollingStateFixedNode(const ScrollingStateFixedNode*);
}
#endif // ENABLE(THREADED_SCROLLING) || USE(COORDINATED_GRAPHICS)
#endif // ScrollingStateFixedNode_h