#ifndef HitTestRequest_h
#define HitTestRequest_h
namespace WebCore {
class HitTestRequest {
public:
enum RequestType {
ReadOnly = 1 << 1,
Active = 1 << 2,
Move = 1 << 3,
Release = 1 << 4,
IgnoreClipping = 1 << 5,
SVGClipContent = 1 << 6,
TouchEvent = 1 << 7
};
typedef unsigned HitTestRequestType;
HitTestRequest(HitTestRequestType requestType)
: m_requestType(requestType)
{
}
bool readOnly() const { return m_requestType & ReadOnly; }
bool active() const { return m_requestType & Active; }
bool move() const { return m_requestType & Move; }
bool release() const { return m_requestType & Release; }
bool ignoreClipping() const { return m_requestType & IgnoreClipping; }
bool svgClipContent() const { return m_requestType & SVGClipContent; }
bool touchEvent() const { return m_requestType & TouchEvent; }
bool mouseEvent() const { return !touchEvent(); }
bool touchMove() const { return move() && touchEvent(); }
bool touchRelease() const { return release() && touchEvent(); }
HitTestRequestType type() const { return m_requestType; }
private:
HitTestRequestType m_requestType;
};
}
#endif // HitTestRequest_h